aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-01-29 00:25:35 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-01-29 00:31:53 +0100
commitd420552f02af2ad6a15cf3a70b76bf86b222c07e (patch)
tree8ab7137ed9264312aee69292d009509e70357ea7 /community
parent78a6ed13e4b5cd182f28be18694d543ae179446b (diff)
downloadaports-d420552f02af2ad6a15cf3a70b76bf86b222c07e.tar.bz2
aports-d420552f02af2ad6a15cf3a70b76bf86b222c07e.tar.xz
Remove more stale patches from community/
Diffstat (limited to 'community')
-rw-r--r--community/abcde/fix-mp3-tagging.patch20
-rw-r--r--community/abcde/less.patch11
-rw-r--r--community/albatross-themes/commits-to-010514-since-v1.7.3.patch1012
-rw-r--r--community/backuppc/remove-deprecated-perl-defined-at.patch23
-rw-r--r--community/biber/fix-sortinithash-unicode-collate.patch1630
-rw-r--r--community/bitcoin/skip-fs-test-utf8.patch13
-rw-r--r--community/elixir/fix-release-pid-rpc-tests.patch26
-rw-r--r--community/gcc6/0001-i386-Move-struct-ix86_frame-to-machine_function.patch241
-rw-r--r--community/gcc6/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch69
-rw-r--r--community/gcc6/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch126
-rw-r--r--community/gcc6/0004-x86-Add-mindirect-branch.patch2149
-rw-r--r--community/gcc6/0005-x86-Add-mfunction-return.patch1565
-rw-r--r--community/gcc6/0006-x86-Add-mindirect-branch-register.patch941
-rw-r--r--community/gcc6/0007-x86-Add-V-register-operand-modifier.patch134
-rw-r--r--community/gcc6/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch299
-rw-r--r--community/gcc6/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch121
-rw-r--r--community/gcc6/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch41
-rw-r--r--community/gcc6/0011-i386-Update-mfunction-return-for-return-with-pop.patch456
-rw-r--r--community/gcc6/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch1003
-rw-r--r--community/gcc6/0013-i386-Don-t-generate-alias-for-function-return-thunk.patch225
-rw-r--r--community/hydrogen/hydrogen-docdir.patch11
-rw-r--r--community/irrlicht/irrlicht-1.8.3-config.patch31
-rw-r--r--community/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch357
-rw-r--r--community/kbuild/allperms.patch30
-rw-r--r--community/kbuild/getloadavg.patch32
-rw-r--r--community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch86
-rw-r--r--community/minissdpd/minissdpd-1.2-remove-initd.patch14
-rw-r--r--community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch27
-rw-r--r--community/mtd-utils/0001_mtd-2.1.0_fix_tests.patch25
-rw-r--r--community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch26
-rw-r--r--community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch29
-rw-r--r--community/pgbouncer/const_free.patch19
-rw-r--r--community/polkit-elogind/alpine-pam.patch18
-rw-r--r--community/racktables/slow-pages.patch106
-rw-r--r--community/ruby-diff-lcs/gemspec.patch16
-rw-r--r--community/ruby-mathematical/disable-test-assert-failing-on-32bit.patch17
-rw-r--r--community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch20
-rw-r--r--community/vdr/softhddevice-musl.patch19
-rw-r--r--community/virt-manager/dont-double-create-spice-display.patch26
-rw-r--r--community/vlc/fix-test-endian.patch26
-rw-r--r--community/zenity/zenity-2.32.1-libnotify-0.7.patch27
41 files changed, 0 insertions, 11067 deletions
diff --git a/community/abcde/fix-mp3-tagging.patch b/community/abcde/fix-mp3-tagging.patch
deleted file mode 100644
index e7650c9494..0000000000
--- a/community/abcde/fix-mp3-tagging.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-*** ./abcde 2010-02-15 16:04:40.000000000 -0600
---- ./abcde 2010-02-15 14:41:25.000000000 -0600
-***************
-*** 836,842 ****
- -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" \
- -y "$CDYEAR" -g "$GENREID" \
- -T "${TRACKNUM:-$1}/$TRACKS" \
-! ${TPE2:+--TPE2 "$TPE2"} \
- "$ABCDETEMPDIR/track$1.$OUTPUT"
- ;;
- esac
---- 836,842 ----
- -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" \
- -y "$CDYEAR" -g "$GENREID" \
- -T "${TRACKNUM:-$1}/$TRACKS" \
-! ${TPE2:+--TPE2 \"$TPE2\"} \
- "$ABCDETEMPDIR/track$1.$OUTPUT"
- ;;
- esac
-
diff --git a/community/abcde/less.patch b/community/abcde/less.patch
deleted file mode 100644
index 49321c6eb4..0000000000
--- a/community/abcde/less.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/abcde 2014-09-28 10:08:15.073608206 +0500
-+++ b/abcde 2014-09-28 10:07:50.817072949 +0500
-@@ -227,7 +227,7 @@
- $PAGER "$PAGEFILE"
- # If that fails, check for less
- elif [ -x /usr/bin/less ]; then
-- /usr/bin/less -f "$PAGEFILE"
-+ /usr/bin/less "$PAGEFILE"
- # more should be on all UNIX systems
- elif [ -x /bin/more ]; then
- /bin/more "$PAGEFILE"
diff --git a/community/albatross-themes/commits-to-010514-since-v1.7.3.patch b/community/albatross-themes/commits-to-010514-since-v1.7.3.patch
deleted file mode 100644
index 9cdc073ea4..0000000000
--- a/community/albatross-themes/commits-to-010514-since-v1.7.3.patch
+++ /dev/null
@@ -1,1012 +0,0 @@
---- Albatross-1.7.3/gtk-3.0/gtk-widgets-assets.css
-+++ Albatross/gtk-3.0/gtk-widgets-assets.css
-@@ -22,118 +22,118 @@
- .check,
- .check row:selected,
- .check row:selected:focus {
-- background-image: url("assets/checkbox-unchecked.png");
-+ -gtk-icon-source: url("assets/checkbox-unchecked.png");
- }
-
- .check:insensitive,
- .check row:selected:insensitive,
- .check row:selected:focus:insensitive {
-- background-image: url("assets/checkbox-unchecked-insensitive.png");
-+ -gtk-icon-source: url("assets/checkbox-unchecked-insensitive.png");
- }
-
--.check:active,
--.check row:selected:active,
--.check row:selected:focus:active {
-- background-image: url("assets/checkbox-checked.png");
-+.check:active, .check:checked,
-+.check row:selected:active, .check row:selected:checked,
-+.check row:selected:focus:active, .check row:selected:focus:checked {
-+ -gtk-icon-source: url("assets/checkbox-checked.png");
- }
-
--.check:active:insensitive,
--.check row:selected:active:insensitive,
--.check row:selected:focus:active:insensitive {
-- background-image: url("assets/checkbox-checked-insensitive.png");
-+.check:active:insensitive, .check:checked:insensitive,
-+.check row:selected:active:insensitive, .check row:selected:checked:insensitive,
-+.check row:selected:focus:active:insensitive, .check row:selected:focus:checked:insensitive {
-+ -gtk-icon-source: url("assets/checkbox-checked-insensitive.png");
- }
-
- .check:inconsistent,
- .check row:selected:inconsistent,
- .check row:selected:focus:inconsistent {
-- background-image: url("assets/checkbox-mixed.png");
-+ -gtk-icon-source: url("assets/checkbox-mixed.png");
- }
-
- .check:inconsistent:insensitive,
- .check row:selected:inconsistent:insensitive,
- .check row:selected:focus:inconsistent:insensitive {
-- background-image: url("assets/checkbox-mixed-insensitive.png");
-+ -gtk-icon-source: url("assets/checkbox-mixed-insensitive.png");
- }
-
- .radio,
- .radio row:selected,
- .radio row:selected:focus {
-- background-image: url("assets/radio-unselected.png");
-+ -gtk-icon-source: url("assets/radio-unselected.png");
- }
-
- .radio:insensitive,
- .radio row:selected:insensitive,
- .radio row:selected:focus:insensitive {
-- background-image: url("assets/radio-unselected-insensitive.png");
-+ -gtk-icon-source: url("assets/radio-unselected-insensitive.png");
- }
-
--.radio:active,
--.radio row:selected:active,
--.radio row:selected:focus:active {
-- background-image: url("assets/radio-selected.png");
-+.radio:active, .radio:checked,
-+.radio row:selected:active, .radio row:selected:checked,
-+.radio row:selected:focus:active, .radio row:selected:focus:checked {
-+ -gtk-icon-source: url("assets/radio-selected.png");
- }
-
--.radio:active:insensitive,
--.radio row:selected:active:insensitive,
--.radio row:selected:focus:active:insensitive {
-- background-image: url("assets/radio-selected-insensitive.png");
-+.radio:active:insensitive, .radio:checked:insensitive,
-+.radio row:selected:active:insensitive, .radio row:selected:checked:insensitive,
-+.radio row:selected:focus:active:insensitive, .radio row:selected:focus:checked:insensitive {
-+ -gtk-icon-source: url("assets/radio-selected-insensitive.png");
- }
-
- .radio:inconsistent,
- .radio row:selected:inconsistent,
- .radio row:selected:focus:inconsistent {
-- background-image: url("assets/radio-mixed.png");
-+ -gtk-icon-source: url("assets/radio-mixed.png");
- }
-
- .radio:inconsistent:insensitive,
- .radio row:selected:inconsistent:insensitive,
- .radio row:selected:focus:inconsistent:insensitive {
-- background-image: url("assets/radio-mixed-insensitive.png");
-+ -gtk-icon-source: url("assets/radio-mixed-insensitive.png");
- }
-
--.menuitem.check:active {
-- background-image: url("assets/menuitem-checkbox-checked.png");
-+.menuitem.check:active, .menuitem.check:checked {
-+ -gtk-icon-source: url("assets/menuitem-checkbox-checked.png");
- }
-
--.menuitem.check:active:hover {
-- background-image: url("assets/menuitem-checkbox-checked-selected.png");
-+.menuitem.check:active:hover, .menuitem.check:checked:hover {
-+ -gtk-icon-source: url("assets/menuitem-checkbox-checked-selected.png");
- }
-
--.menuitem.check:active:insensitive {
-- background-image: url("assets/menuitem-checkbox-checked-insensitive.png");
-+.menuitem.check:active:insensitive, .menuitem.check:checked:insensitive {
-+ -gtk-icon-source: url("assets/menuitem-checkbox-checked-insensitive.png");
- }
-
- .menuitem.check:inconsistent:hover,
- .menuitem.radio:inconsistent:hover {
-- background-image: url("assets/menuitem-checkbox-mixed-selected.png");
-+ -gtk-icon-source: url("assets/menuitem-checkbox-mixed-selected.png");
- }
-
- .menuitem.check:inconsistent,
- .menuitem.radio:inconsistent {
-- background-image: url("assets/menuitem-checkbox-mixed.png");
-+ -gtk-icon-source: url("assets/menuitem-checkbox-mixed.png");
- }
-
- .menuitem.check:inconsistent:insensitive,
- .menuitem.radio:inconsistent:insensitive {
-- background-image: url("assets/menuitem-checkbox-mixed-insensitive.png");
-+ -gtk-icon-source: url("assets/menuitem-checkbox-mixed-insensitive.png");
- }
-
--.menuitem.radio:active {
-- background-image: url("assets/menuitem-radio-checked.png");
-+.menuitem.radio:active, .menuitem.radio:checked {
-+ -gtk-icon-source: url("assets/menuitem-radio-checked.png");
- }
-
--.menuitem.radio:active:hover {
-- background-image: url("assets/menuitem-radio-checked-selected.png");
-+.menuitem.radio:active:hover, .menuitem.radio:checked:hover {
-+ -gtk-icon-source: url("assets/menuitem-radio-checked-selected.png");
- }
-
--.menuitem.radio:active:insensitive {
-- background-image: url("assets/menuitem-radio-checked-insensitive.png");
-+.menuitem.radio:active:insensitive, .menuitem.radio:checked:insensitive {
-+ -gtk-icon-source: url("assets/menuitem-radio-checked-insensitive.png");
- }
-
- GtkIconView.content-view.cell.check {
-- background-image: url("assets/grid-selection-unchecked.png");
-+ -gtk-icon-source: url("assets/grid-selection-unchecked.png");
- }
-
--GtkIconView.content-view.cell.check:active {
-- background-image: url("assets/grid-selection-checked.png");
-+GtkIconView.content-view.cell.check:active, GtkIconView.content-view.cell.check:checked {
-+ -gtk-icon-source: url("assets/grid-selection-checked.png");
- }
---- Albatross-1.7.3/gtk-3.0/gtk-widgets.css
-+++ Albatross/gtk-3.0/gtk-widgets.css
-@@ -148,9 +148,13 @@
- inset 1px -1px alpha(@light_shadow, 0.3);
- }
-
-+.button:checked,
- .button:active,
-+.primary-toolbar .button:checked,
- .primary-toolbar .button:active,
-+.toolbar .button:checked,
- .toolbar .button:active,
-+.header-bar .button:checked,
- .header-bar .button:active {
- box-shadow: inset 1px 1px alpha(@dark_shadow, 0.1),
- inset -1px -1px alpha(@dark_shadow, 0.1);
-@@ -179,9 +183,13 @@
- .primary-toolbar .button:insensitive,
- .toolbar .button:insensitive,
- .header-bar .button:insensitive,
-+.button:checked *:insensitive,
- .button:active *:insensitive,
-+.primary-toolbar .button:checked *:insensitive,
- .primary-toolbar .button:active *:insensitive,
-+.toolbar .button:checked *:insensitive,
- .toolbar .button:active *:insensitive,
-+.header-bar .button:checked *:insensitive,
- .header-bar .button:active *:insensitive,
- .entry:insensitive,
- .scrollbar.button,
-@@ -239,6 +247,7 @@
- to (shade(@theme_selected_bg_color, 1.09)));
- }
-
-+.button:checked,
- .button:active {
- border-color: shade(@theme_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -248,6 +257,7 @@
- to (shade(@theme_bg_color, 0.82)));
- }
-
-+.button:checked:hover,
- .button:active:hover {
- border-color: shade(@theme_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -259,7 +269,9 @@
-
- .button:focus,
- .button:hover:focus,
-+.button:checked:focus,
- .button:active:focus,
-+.button:checked:hover:focus,
- .button:active:hover:focus {
- border-color: shade(@theme_selected_bg_color, 0.8);
- }
-@@ -273,6 +285,7 @@
- to (shade(@theme_bg_color, 0.91)));
- }
-
-+.button:checked *:insensitive,
- .button:active *:insensitive {
- border-color: shade(@theme_bg_color, 0.8);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -335,14 +348,17 @@
- * column-header *
- *****************/
- column-header .button,
-+column-header .button:checked,
- column-header .button:active {
- border-width: 0 1px 1px 0;
- border-radius: 0;
- }
-
- column-header .button,
-+column-header .button:checked,
- column-header .button:active,
- column-header .button:focus,
-+column-header .button:checked:focus,
- column-header .button:active:focus {
- border-color: shade(@theme_base_color, 0.9);
- border-bottom-color: shade(@theme_base_color, 0.8);
-@@ -353,8 +369,10 @@
- }
-
- column-header .button:hover,
-+column-header .button:checked:hover,
- column-header .button:active:hover,
- column-header .button:hover:focus,
-+column-header .button:checked:hover:focus,
- column-header .button:active:hover:focus {
- border-color: shade(@theme_base_color, 0.9);
- border-bottom-color: shade(@theme_base_color, 0.8);
-@@ -488,10 +506,12 @@
-
- .primary-toolbar GtkComboBox.combobox-entry .button,
- .primary-toolbar GtkComboBox.combobox-entry .button:hover,
-+.primary-toolbar GtkComboBox.combobox-entry .button:checked,
- .primary-toolbar GtkComboBox.combobox-entry .button:active,
- .primary-toolbar GtkComboBox.combobox-entry .button:insensitive,
- GtkComboBox.combobox-entry .button,
- GtkComboBox.combobox-entry .button:hover,
-+GtkComboBox.combobox-entry .button:checked,
- GtkComboBox.combobox-entry .button:active,
- GtkComboBox.combobox-entry .button:insensitive {
- border-width: 1px 1px 1px 1px;
-@@ -665,11 +685,13 @@
- background-color: shade(@info_bg_color, 1.10);
- }
-
-+.info .button:checked,
- .info .button:active {
- border-color: shade(@info_bg_color, 0.6);
- background-color: shade(@info_bg_color, 0.95);
- }
-
-+.info .button:checked:hover,
- .info .button:active:hover {
- border-top-color: shade(@info_bg_color, 0.85);
- border-right-color: shade(@info_bg_color, 0.78);
-@@ -719,11 +741,13 @@
- background-color: shade(@warning_bg_color, 1.10);
- }
-
-+.warning .button:checked,
- .warning .button:active {
- border-color: shade(@warning_bg_color, 0.6);
- background-color: shade(@warning_bg_color, 0.95);
- }
-
-+.warning .button:checked:hover,
- .warning .button:active:hover {
- border-top-color: shade(@warning_bg_color, 0.85);
- border-right-color: shade(@warning_bg_color, 0.78);
-@@ -773,11 +797,13 @@
- background-color: shade(@question_bg_color, 1.10);
- }
-
-+.question .button:checked,
- .question .button:active {
- border-color: shade(@question_bg_color, 0.6);
- background-color: shade(@question_bg_color, 0.95);
- }
-
-+.question .button:checked:hover,
- .question .button:active:hover {
- border-top-color: shade(@question_bg_color, 0.85);
- border-right-color: shade(@question_bg_color, 0.78);
-@@ -829,11 +855,13 @@
- background-color: shade(@error_bg_color, 1.10);
- }
-
-+.error .button:checked,
- .error .button:active {
- border-color: shade(@error_bg_color, 0.6);
- background-color: shade(@error_bg_color, 0.95);
- }
-
-+.error .button:checked:hover,
- .error .button:active:hover {
- border-top-color: shade(@error_bg_color, 0.85);
- border-right-color: shade(@error_bg_color, 0.78);
-@@ -977,7 +1005,9 @@
- }
-
- .menu.button:hover,
-+.menu.button:checked,
- .menu.button:active,
-+.menu.button:checked *:insensitive,
- .menu.button:active *:insensitive,
- .menu.button:insensitive,
- .menu.button {
-@@ -1178,8 +1208,10 @@
- }
-
- GtkModelButton.button,
-+GtkModelButton.button:checked,
- GtkModelButton.button:active,
- GtkModelButton.button:insensitive,
-+GtkModelButton.button:checked:insensitive,
- GtkModelButton.button:active:insensitive {
- background-color: transparent;
- background-image: none;
-@@ -1189,6 +1221,7 @@
- color: @theme_fg_color;
- }
-
-+GtkModelButton.button:checked:hover,
- GtkModelButton.button:active:hover,
- GtkModelButton.button:hover,
- GtkModelButton.button:selected {
-@@ -1554,7 +1587,9 @@
- }
-
- .scrollbar.button,
-+.scrollbar.button:checked,
- .scrollbar.button:active,
-+.scrollbar.button:checked:hover,
- .scrollbar.button:active:hover {
- border-width: 0;
- border-radius: 0;
-@@ -1741,6 +1776,7 @@
- box-shadow: inset 1px 0 shade(@theme_bg_color, 0.95);
- }
-
-+.spinbutton .button:checked,
- .spinbutton .button:active,
- .spinbutton .button:hover {
- color: @theme_fg_color;
-@@ -1783,6 +1819,7 @@
- to (shade(@theme_selected_bg_color, 1.09)));
- }
-
-+.spinbutton.vertical .button:checked,
- .spinbutton.vertical .button:active {
- border-color: shade(@theme_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -1792,6 +1829,7 @@
- to (shade(@theme_bg_color, 0.82)));
- }
-
-+.spinbutton.vertical .button:checked:hover,
- .spinbutton.vertical .button:active:hover {
- border-color: shade(@theme_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -1803,7 +1841,9 @@
-
- .spinbutton.vertical .button:focus,
- .spinbutton.vertical .button:hover:focus,
-+.spinbutton.vertical .button:checked:focus,
- .spinbutton.vertical .button:active:focus,
-+.spinbutton.vertical .button:checked:hover:focus,
- .spinbutton.vertical .button:active:hover:focus {
- border-color: shade(@theme_selected_bg_color, 0.7);
- }
-@@ -2247,8 +2287,11 @@
- to (shade(@theme_selected_bg_color, 1.09)));
- }
-
-+.primary-toolbar .button:checked,
- .primary-toolbar .button:active,
-+.toolbar .button:checked,
- .toolbar .button:active,
-+.header-bar .button:checked,
- .header-bar .button:active {
- border-color: shade(@toolbar_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -2258,8 +2301,11 @@
- to (shade(@toolbar_bg_color, 0.82)));
- }
-
-+.primary-toolbar .button:checked:hover,
- .primary-toolbar .button:active:hover,
-+.toolbar .button:checked:hover,
- .toolbar .button:active:hover,
-+.header-bar .button:checked:hover,
- .header-bar .button:active:hover {
- border-color: shade(@toolbar_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -2271,15 +2317,21 @@
-
- .primary-toolbar .button:focus,
- .primary-toolbar .button:hover:focus,
-+.primary-toolbar .button:checked:focus,
- .primary-toolbar .button:active:focus,
-+.primary-toolbar .button:checked:hover:focus,
- .primary-toolbar .button:active:hover:focus,
- .toolbar .button:focus,
- .toolbar .button:hover:focus,
-+.toolbar .button:checked:focus,
- .toolbar .button:active:focus,
-+.toolbar .button:checked:hover:focus,
- .toolbar .button:active:hover:focus,
- .header-bar .button:focus,
- .header-bar .button:hover:focus,
-+.header-bar .button:checked:focus,
- .header-bar .button:active:focus,
-+.header-bar .button:checked:hover:focus,
- .header-bar .button:active:hover:focus {
- border-color: shade(@theme_selected_bg_color, 0.8);
- }
-@@ -2295,8 +2347,11 @@
- to (shade(@toolbar_bg_color, 0.91)));
- }
-
-+.primary-toolbar .button:checked *:insensitive,
- .primary-toolbar .button:active *:insensitive,
-+.toolbar .button:checked *:insensitive,
- .toolbar .button:active *:insensitive,
-+.header-bar .button:checked *:insensitive,
- .header-bar .button:active *:insensitive {
- border-color: shade(@toolbar_bg_color, 0.8);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -2357,19 +2412,23 @@
- background-image: none;
- }
-
-+.inline-toolbar.toolbar .button:checked,
- .inline-toolbar.toolbar .button:active {
- border-color: shade(@theme_bg_color, 0.8);
- background-color: shade(@theme_bg_color, 0.95);
- background-image: none;
- }
-
-+.inline-toolbar.toolbar .button:checked:hover,
- .inline-toolbar.toolbar .button:active:hover {
- border-color: shade(@theme_bg_color, 0.7);
- }
-
- .inline-toolbar.toolbar .button:focus,
- .inline-toolbar.toolbar .button:hover:focus,
-+.inline-toolbar.toolbar .button:checked:focus,
- .inline-toolbar.toolbar .button:active:focus,
-+.inline-toolbar.toolbar .button:checked:hover:focus,
- .inline-toolbar.toolbar .button:active:hover:focus {
- border-color: shade(@theme_bg_color, 0.7);
- }
-@@ -2394,9 +2453,13 @@
- inset -1px 1px alpha(@light_shadow, 0.3);
- }
-
-+.linked .button:checked,
- .linked .button:active,
-+.inline-toolbar.toolbar .button:checked,
- .inline-toolbar.toolbar .button:active,
-+.inline-toolbar.toolbar GtkToolButton .button:checked,
- .inline-toolbar.toolbar GtkToolButton .button:active,
-+.inline-toolbar.toolbar GtkToolButton > .button:checked,
- .inline-toolbar.toolbar GtkToolButton > .button:active {
- box-shadow: inset -1px 0 shade(@theme_bg_color, 0.8),
- inset 1px 1px alpha(@dark_shadow, 0.1),
-@@ -2411,11 +2474,17 @@
- }
-
- /* remove box shadow from last-child and only-child */
-+.linked .button:checked *:insensitive:last-child,
- .linked .button:active *:insensitive:last-child,
-+.linked .button:checked *:insensitive:only-child,
- .linked .button:active *:insensitive:only-child,
-+.inline-toolbar.toolbar .button:checked *:insensitive:last-child,
- .inline-toolbar.toolbar .button:active *:insensitive:last-child,
-+.inline-toolbar.toolbar .button:checked *:insensitive:only-child,
- .inline-toolbar.toolbar .button:active *:insensitive:only-child,
-+.inline-toolbar.toolbar GtkToolButton:last-child > .button:checked *:insensitive,
- .inline-toolbar.toolbar GtkToolButton:last-child > .button:active *:insensitive,
-+.inline-toolbar.toolbar GtkToolButton:only-child > .button:checked *:insensitive,
- .inline-toolbar.toolbar GtkToolButton:only-child > .button:active *:insensitive {
- box-shadow: none;
- }
-@@ -2437,11 +2506,17 @@
- inset -1px 1px alpha(@light_shadow, 0.3);
- }
-
-+.linked .button:checked:last-child,
- .linked .button:active:last-child,
-+.linked .button:checked:only-child,
- .linked .button:active:only-child,
-+.inline-toolbar.toolbar .button:checked:last-child,
- .inline-toolbar.toolbar .button:active:last-child,
-+.inline-toolbar.toolbar .button:checked:only-child,
- .inline-toolbar.toolbar .button:active:only-child,
-+.inline-toolbar.toolbar GtkToolButton:last-child > .button:checked,
- .inline-toolbar.toolbar GtkToolButton:last-child > .button:active,
-+.inline-toolbar.toolbar GtkToolButton:only-child > .button:checked,
- .inline-toolbar.toolbar GtkToolButton:only-child > .button:active {
- box-shadow: inset 1px 1px alpha(@dark_shadow, 0.1),
- inset -1px -1px alpha(@dark_shadow, 0.1);
-@@ -2450,13 +2525,17 @@
- /* middle button */
- .linked .entry,
- .linked .button,
-+.linked .button:checked,
- .linked .button:active,
-+.linked .button:checked:hover,
- .linked .button:active:hover,
- .linked .button:insensitive,
- .inline-toolbar.toolbar .button,
-+.inline-toolbar.toolbar .button:checked,
- .inline-toolbar.toolbar .button:active,
- .inline-toolbar.toolbar .button:insensitive,
- .inline-toolbar.toolbar GtkToolButton .button,
-+.inline-toolbar.toolbar GtkToolButton .button:checked,
- .inline-toolbar.toolbar GtkToolButton .button:active,
- .inline-toolbar.toolbar GtkToolButton .button:insensitive {
- border-width: 1px;
-@@ -2468,13 +2547,17 @@
- /*leftmost button */
- .linked .entry:first-child,
- .linked .button:first-child,
-+.linked .button:checked:first-child,
- .linked .button:active:first-child,
-+.linked .button:checked:hover:first-child,
- .linked .button:active:hover:first-child,
- .linked .button:insensitive:first-child,
- .inline-toolbar.toolbar .button:first-child,
-+.inline-toolbar.toolbar .button:checked:first-child,
- .inline-toolbar.toolbar .button:active:first-child,
- .inline-toolbar.toolbar .button:insensitive:first-child,
- .inline-toolbar.toolbar GtkToolButton:first-child .button,
-+.inline-toolbar.toolbar GtkToolButton:first-child .button:checked,
- .inline-toolbar.toolbar GtkToolButton:first-child .button:active,
- .inline-toolbar.toolbar GtkToolButton:first-child .button:insensitive {
- border-width: 1px;
-@@ -2487,13 +2570,17 @@
- /* rightmost button */
- .linked .entry:last-child,
- .linked .button:last-child,
-+.linked .button:checked:last-child,
- .linked .button:active:last-child,
-+.linked .button:checked:hover:last-child,
- .linked .button:active:hover:last-child,
- .linked .button:insensitive:last-child,
- .inline-toolbar.toolbar .button:last-child,
-+.inline-toolbar.toolbar .button:checked:last-child,
- .inline-toolbar.toolbar .button:active:last-child,
- .inline-toolbar.toolbar .button:insensitive:last-child,
- .inline-toolbar.toolbar GtkToolButton:last-child .button,
-+.inline-toolbar.toolbar GtkToolButton:last-child .button:checked,
- .inline-toolbar.toolbar GtkToolButton:last-child .button:active,
- .inline-toolbar.toolbar GtkToolButton:last-child .button:insensitive {
- border-width: 1px;
-@@ -2506,13 +2593,17 @@
- /* linked single button */
- .linked .entry:only-child,
- .linked .button:only-child,
-+.linked .button:checked:only-child,
- .linked .button:active:only-child,
-+.linked .button:checked:hover:only-child,
- .linked .button:active:hover:only-child,
- .linked .button:insensitive:only-child,
- .inline-toolbar.toolbar .button:only-child,
-+.inline-toolbar.toolbar .button:checked:only-child,
- .inline-toolbar.toolbar .button:active:only-child,
- .inline-toolbar.toolbar .button:insensitive:only-child,
- .inline-toolbar.toolbar GtkToolButton:only-child .button,
-+.inline-toolbar.toolbar GtkToolButton:only-child .button:checked,
- .inline-toolbar.toolbar GtkToolButton:only-child .button:active,
- .inline-toolbar.toolbar GtkToolButton:only-child .button:insensitive {
- border-width: 1px;
-@@ -2528,8 +2619,11 @@
- inset -1px 1px alpha(@light_shadow, 0.3);
- }
-
-+.linked.vertical .button:checked,
- .linked.vertical .button:active,
-+.inline-toolbar.toolbar.vertical .button:checked,
- .inline-toolbar.toolbar.vertical .button:active,
-+.inline-toolbar.toolbar.vertical GtkToolButton > .button:checked,
- .inline-toolbar.toolbar.vertical GtkToolButton > .button:active {
- box-shadow: inset 0 -1px shade(@theme_bg_color, 0.8),
- inset 1px 1px alpha(@dark_shadow, 0.1),
-@@ -2543,11 +2637,17 @@
- }
-
- /* remove box shadow from last-child and only-child */
-+.linked.vertical .button:checked *:insensitive:last-child,
- .linked.vertical .button:active *:insensitive:last-child,
-+.linked.vertical .button:checked *:insensitive:only-child,
- .linked.vertical .button:active *:insensitive:only-child,
-+.inline-toolbar.toolbar.vertical .button:checked *:insensitive:last-child,
- .inline-toolbar.toolbar.vertical .button:active *:insensitive:last-child,
-+.inline-toolbar.toolbar.vertical .button:checked *:insensitive:only-child,
- .inline-toolbar.toolbar.vertical .button:active *:insensitive:only-child,
-+.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:checked *:insensitive,
- .inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:active *:insensitive,
-+.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:checked *:insensitive,
- .inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active *:insensitive {
- box-shadow: none;
- }
-@@ -2569,11 +2669,17 @@
- inset -1px 1px alpha(@light_shadow, 0.3);
- }
-
-+.linked.vertical .button:checked:last-child,
- .linked.vertical .button:active:last-child,
-+.linked.vertical .button:checked:only-child,
- .linked.vertical .button:active:only-child,
-+.inline-toolbar.toolbar.vertical .button:checked:last-child,
- .inline-toolbar.toolbar.vertical .button:active:last-child,
-+.inline-toolbar.toolbar.vertical .button:checked:only-child,
- .inline-toolbar.toolbar.vertical .button:active:only-child,
-+.inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:checked,
- .inline-toolbar.toolbar.vertical GtkToolButton:last-child > .button:active,
-+.inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:checked,
- .inline-toolbar.toolbar.vertical GtkToolButton:only-child > .button:active {
- box-shadow: inset 1px 1px alpha(@dark_shadow, 0.1),
- inset -1px -1px alpha(@dark_shadow, 0.1);
-@@ -2582,7 +2688,9 @@
- /* middle button (vertical) */
- .linked.vertical .entry,
- .linked.vertical .button,
-+.linked.vertical .button:checked,
- .linked.vertical .button:active,
-+.linked.vertical .button:checked:hover,
- .linked.vertical .button:active:hover,
- .linked.vertical .button:insensitive {
- border-width: 1px;
-@@ -2594,7 +2702,9 @@
- /* top button (vertical) */
- .linked.vertical .entry:first-child,
- .linked.vertical .button:first-child,
-+.linked.vertical .button:checked:first-child,
- .linked.vertical .button:active:first-child,
-+.linked.vertical .button:checked:hover:first-child,
- .linked.vertical .button:active:hover:first-child,
- .linked.vertical .button:insensitive:first-child {
- border-width: 1px;
-@@ -2607,7 +2717,9 @@
- /* bottom button (vertical) */
- .linked.vertical .entry:last-child,
- .linked.vertical .button:last-child,
-+.linked.vertical .button:checked:last-child,
- .linked.vertical .button:active:last-child,
-+.linked.vertical .button:checked:hover:last-child,
- .linked.vertical .button:active:hover:last-child,
- .linked.vertical .button:insensitive:last-child {
- border-width: 1px;
-@@ -2620,7 +2732,9 @@
- /* linked single button (vertical) */
- .linked.vertical .entry:only-child,
- .linked.vertical .button:only-child,
-+.linked.vertical .button:checked:only-child,
- .linked.vertical .button:active:only-child,
-+.linked.vertical .button:checked:hover:only-child,
- .linked.vertical .button:active:hover:only-child,
- .linked.vertical .button:insensitive:only-child {
- border-width: 1px;
-@@ -2642,12 +2756,17 @@
- }
-
- .primary-toolbar .button.raised.linked:active,
-+.primary-toolbar .raised.linked .button:checked,
- .primary-toolbar .raised.linked .button:active,
- .toolbar .button.raised.linked:active,
-+.toolbar .raised.linked .button:checked,
- .toolbar .raised.linked .button:active,
-+.toolbar .linked .button:checked,
- .toolbar .linked .button:active,
- .header-bar .button.raised.linked:active,
-+.header-bar .raised.linked .button:checked,
- .header-bar .raised.linked .button:active,
-+.header-bar .linked .button:checked,
- .header-bar .linked .button:active {
- box-shadow: inset -1px 0 shade(@toolbar_bg_color, 0.8),
- inset 1px 1px alpha(@dark_shadow, 0.1),
-@@ -2666,21 +2785,37 @@
- }
-
- /* remove box shadow from last-child and only-child */
-+.primary-toolbar .button:checked *:insensitive.raised.linked:last-child,
- .primary-toolbar .button:active *:insensitive.raised.linked:last-child,
-+.primary-toolbar .button:checked *:insensitive.raised.linked:only-child,
- .primary-toolbar .button:active *:insensitive.raised.linked:only-child,
-+.primary-toolbar .raised.linked .button:checked *:insensitive:last-child,
- .primary-toolbar .raised.linked .button:active *:insensitive:last-child,
-+.primary-toolbar .raised.linked .button:checked *:insensitive:only-child
- .primary-toolbar .raised.linked .button:active *:insensitive:only-child
-+.toolbar .button:checked *:insensitive.raised.linked:last-child,
- .toolbar .button:active *:insensitive.raised.linked:last-child,
-+.toolbar .button:checked *:insensitive.raised.linked:only-child,
- .toolbar .button:active *:insensitive.raised.linked:only-child,
-+.toolbar .raised.linked .button:checked *:insensitive:last-child,
- .toolbar .raised.linked .button:active *:insensitive:last-child,
-+.toolbar .raised.linked .button:checked *:insensitive:only-child,
- .toolbar .raised.linked .button:active *:insensitive:only-child,
-+.toolbar .linked .button:checked *:insensitive:last-child,
- .toolbar .linked .button:active *:insensitive:last-child,
-+.toolbar .linked .button:checked *:insensitive:only-child,
- .toolbar .linked .button:active *:insensitive:only-child,
-+.header-bar .button:checked *:insensitive.raised.linked:last-child,
- .header-bar .button:active *:insensitive.raised.linked:last-child,
-+.header-bar .button:checked *:insensitive.raised.linked:only-child,
- .header-bar .button:active *:insensitive.raised.linked:only-child,
-+.header-bar .raised.linked .button:checked *:insensitive:last-child,
- .header-bar .raised.linked .button:active *:insensitive:last-child,
-+.header-bar .raised.linked .button:checked *:insensitive:only-child,
- .header-bar .raised.linked .button:active *:insensitive:only-child,
-+.header-bar .linked .button:checked *:insensitive:last-child,
- .header-bar .linked .button:active *:insensitive:last-child,
-+.header-bar .linked .button:checked *:insensitive:only-child,
- .header-bar .linked .button:active *:insensitive:only-child {
- box-shadow: none;
- }
-@@ -2722,21 +2857,37 @@
- inset -1px 1px alpha(@light_shadow, 0.3);
- }
-
-+.primary-toolbar .button:checked.raised.linked:last-child,
- .primary-toolbar .button:active.raised.linked:last-child,
-+.primary-toolbar .button:checked.raised.linked:only-child,
- .primary-toolbar .button:active.raised.linked:only-child,
-+.primary-toolbar .raised.linked .button:checked:last-child,
- .primary-toolbar .raised.linked .button:active:last-child,
-+.primary-toolbar .raised.linked .button:checked:only-child,
- .primary-toolbar .raised.linked .button:active:only-child,
-+.toolbar .button:checked.raised.linked:last-child,
- .toolbar .button:active.raised.linked:last-child,
-+.toolbar .button:checked.raised.linked:only-child,
- .toolbar .button:active.raised.linked:only-child,
-+.toolbar .raised.linked .button:checked:last-child,
- .toolbar .raised.linked .button:active:last-child,
-+.toolbar .raised.linked .button:checked:only-child,
- .toolbar .raised.linked .button:active:only-child,
-+.toolbar .linked .button:checked:last-child,
- .toolbar .linked .button:active:last-child,
-+.toolbar .linked .button:checked:only-child,
- .toolbar .linked .button:active:only-child,
-+.header-bar .button:checked.raised.linked:last-child,
- .header-bar .button:active.raised.linked:last-child,
-+.header-bar .button:checked.raised.linked:only-child,
- .header-bar .button:active.raised.linked:only-child,
-+.header-bar .raised.linked .button:checked:last-child,
- .header-bar .raised.linked .button:active:last-child,
-+.header-bar .raised.linked .button:checked:only-child,
- .header-bar .raised.linked .button:active:only-child,
-+.header-bar .linked .button:checked:last-child,
- .header-bar .linked .button:active:last-child,
-+.header-bar .linked .button:checked:only-child,
- .header-bar .linked .button:active:only-child {
- box-shadow: inset 1px 1px alpha(@dark_shadow, 0.1),
- inset -1px -1px alpha(@dark_shadow, 0.1);
-@@ -2747,26 +2898,31 @@
- .primary-toolbar .button.raised.linked:active,
- .primary-toolbar .button.raised.linked:insensitive,
- .primary-toolbar .raised.linked .button,
-+.primary-toolbar .raised.linked .button:checked,
- .primary-toolbar .raised.linked .button:active,
- .primary-toolbar .raised.linked .button:insensitive,
- .toolbar .button.raised.linked,
- .toolbar .button.raised.linked:active,
- .toolbar .button.raised.linked:insensitive,
- .toolbar .raised.linked .button,
-+.toolbar .raised.linked .button:checked,
- .toolbar .raised.linked .button:active,
- .toolbar .raised.linked .button:insensitive,
- .toolbar .linked .button,
-+.toolbar .linked .button:checked,
- .toolbar .linked .button:active,
- .toolbar .linked .button:insensitive,
- .header-bar .button.raised.linked,
- .header-bar .button.raised.linked:active,
- .header-bar .button.raised.linked:insensitive,
- .header-bar .raised.linked .button,
-+.header-bar .raised.linked .button:checked,
- .header-bar .raised.linked .button:active,
- .header-bar .raised.linked .button:insensitive,
- .header-bar .linked .button,
-+.header-bar .linked .button:checked,
- .header-bar .linked .button:active,
--.header-bar .linked .button:insensitive, {
-+.header-bar .linked .button:insensitive {
- border-width: 1px;
- border-radius: 0;
- border-right-width: 0;
-@@ -2778,24 +2934,29 @@
- .primary-toolbar .button.raised.linked:active:first-child,
- .primary-toolbar .button.raised.linked:insensitive:first-child,
- .primary-toolbar .raised.linked .button:first-child,
-+.primary-toolbar .raised.linked .button:checked:first-child,
- .primary-toolbar .raised.linked .button:active:first-child,
- .primary-toolbar .raised.linked .button:insensitive:first-child,
- .toolbar .button.raised.linked:first-child,
- .toolbar .button.raised.linked:active:first-child,
- .toolbar .button.raised.linked:insensitive:first-child,
- .toolbar .raised.linked .button:first-child,
-+.toolbar .raised.linked .button:checked:first-child,
- .toolbar .raised.linked .button:active:first-child,
- .toolbar .raised.linked .button:insensitive:first-child,
- .toolbar .linked .button:first-child,
-+.toolbar .linked .button:checked:first-child,
- .toolbar .linked .button:active:first-child,
- .toolbar .linked .button:insensitive:first-child,
- .header-bar .button.raised.linked:first-child,
- .header-bar .button.raised.linked:active:first-child,
- .header-bar .button.raised.linked:insensitive:first-child,
- .header-bar .raised.linked .button:first-child,
-+.header-bar .raised.linked .button:checked:first-child,
- .header-bar .raised.linked .button:active:first-child,
- .header-bar .raised.linked .button:insensitive:first-child,
- .header-bar .linked .button:first-child,
-+.header-bar .linked .button:checked:first-child,
- .header-bar .linked .button:active:first-child,
- .header-bar .linked .button:insensitive:first-child {
- border-width: 1px;
-@@ -2810,24 +2971,29 @@
- .primary-toolbar .button.raised.linked:active:last-child,
- .primary-toolbar .button.raised.linked:insensitive:last-child,
- .primary-toolbar .raised.linked .button:last-child,
-+.primary-toolbar .raised.linked .button:checked:last-child,
- .primary-toolbar .raised.linked .button:active:last-child,
- .primary-toolbar .raised.linked .button:insensitive:last-child,
- .toolbar .button.raised.linked:last-child,
- .toolbar .button.raised.linked:active:last-child,
- .toolbar .button.raised.linked:insensitive:last-child,
- .toolbar .raised.linked .button:last-child,
-+.toolbar .raised.linked .button:checked:last-child,
- .toolbar .raised.linked .button:active:last-child,
- .toolbar .raised.linked .button:insensitive:last-child,
- .toolbar .linked .button:last-child,
-+.toolbar .linked .button:checked:last-child,
- .toolbar .linked .button:active:last-child,
- .toolbar .linked .button:insensitive:last-child,
- .header-bar .button.raised.linked:last-child,
- .header-bar .button.raised.linked:active:last-child,
- .header-bar .button.raised.linked:insensitive:last-child,
- .header-bar .raised.linked .button:last-child,
-+.header-bar .raised.linked .button:checked:last-child,
- .header-bar .raised.linked .button:active:last-child,
- .header-bar .raised.linked .button:insensitive:last-child,
- .header-bar .linked .button:last-child,
-+.header-bar .linked .button:checked:last-child,
- .header-bar .linked .button:active:last-child,
- .header-bar .linked .button:insensitive:last-child {
- border-width: 1px;
-@@ -2842,24 +3008,29 @@
- .primary-toolbar .button.raised.linked:active:only-child,
- .primary-toolbar .button.raised.linked:insensitive:only-child,
- .primary-toolbar .raised.linked .button:only-child,
-+.primary-toolbar .raised.linked .button:checked:only-child,
- .primary-toolbar .raised.linked .button:active:only-child,
- .primary-toolbar .raised.linked .button:insensitive:only-child,
- .toolbar .button.raised.linked:only-child,
- .toolbar .button.raised.linked:active:only-child,
- .toolbar .button.raised.linked:insensitive:only-child,
- .toolbar .raised.linked .button:only-child,
-+.toolbar .raised.linked .button:checked:only-child,
- .toolbar .raised.linked .button:active:only-child,
- .toolbar .raised.linked .button:insensitive:only-child,
- .toolbar .linked .button:only-child,
-+.toolbar .linked .button:checked:only-child,
- .toolbar .linked .button:active:only-child,
- .toolbar .linked .button:insensitive:only-child,
- .header-bar .button.raised.linked:only-child,
- .header-bar .button.raised.linked:active:only-child,
- .header-bar .button.raised.linked:insensitive:only-child,
- .header-bar .raised.linked .button:only-child,
-+.header-bar .raised.linked .button:checked:only-child,
- .header-bar .raised.linked .button:active:only-child,
- .header-bar .raised.linked .button:insensitive:only-child,
- .header-bar .linked .button:only-child,
-+.header-bar .linked .button:checked:only-child,
- .header-bar .linked .button:active:only-child,
- .header-bar .linked .button:insensitive:only-child {
- border-width: 1px;
-@@ -2991,16 +3162,22 @@
- background-image: none;
- }
-
-+.osd.button:checked,
- .osd.button:active,
-+.osd .button:checked,
- .osd .button:active,
-+.osd GtkMenuButton.button:checked,
- .osd GtkMenuButton.button:active {
- border-color: shade(@osd_bg, 0.8);
- background-color: shade(@osd_bg, 0.95);
- background-image: none;
- }
-
-+.osd.button:checked:hover,
- .osd.button:active:hover,
-+.osd .button:checked:hover,
- .osd .button:active:hover,
-+.osd GtkMenuButton.button:checked:hover,
- .osd GtkMenuButton.button:active:hover {
- border-color: shade(@osd_bg, 0.7);
- }
-@@ -3012,7 +3189,9 @@
- background-image: none;
- }
-
-+.osd.button:checked *:insensitive,
- .osd.button:active *:insensitive,
-+.osd .button:checked *:insensitive,
- .osd .button:active *:insensitive {
- background-color: shade(@osd_bg, 0.80);
- background-image: none;
-@@ -3048,19 +3227,23 @@
- background-image: none;
- }
-
-+.osd.toolbar .button:checked,
- .osd.toolbar .button:active {
- border-color: shade(@osd_bg, 0.8);
- background-color: shade(@osd_bg, 0.95);
- background-image: none;
- }
-
-+.osd.toolbar .button:checked:hover,
- .osd.toolbar .button:active:hover {
- border-color: shade(@osd_bg, 0.7);
- }
-
- .osd.toolbar .button:focus,
- .osd.toolbar .button:hover:focus,
-+.osd.toolbar .button:checked:focus,
- .osd.toolbar .button:active:focus,
-+.osd.toolbar .button:checked:hover:focus,
- .osd.toolbar .button:active:hover:focus {
- border-color: shade(@osd_bg, 0.7);
- }
-@@ -3071,6 +3254,7 @@
- background-image: none;
- }
-
-+.osd.toolbar .button:checked *:insensitive,
- .osd.toolbar .button:active *:insensitive {
- border-color: shade(@osd_bg, 0.75);
- background-color: shade(@osd_bg, 0.80);
-@@ -3255,6 +3439,7 @@
- to (shade(@error_color, 1.09)));
- }
-
-+.destructive-action.button:checked,
- .destructive-action.button:active {
- border-color: shade(@error_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -3323,8 +3508,11 @@
- to (shade(@theme_selected_bg_color, 1.09)));
- }
-
-+.selection-mode.header-bar .button:checked,
- .selection-mode.header-bar .button:active,
-+.selection-mode.toolbar .button:checked,
- .selection-mode.toolbar .button:active,
-+.selection-mode.toolbar GtkToolButton .button:checked,
- .selection-mode.toolbar GtkToolButton .button:active {
- border-color: shade(@theme_selected_bg_color, 0.7);
- background-image: -gtk-gradient(linear, left top, left bottom,
-@@ -3373,7 +3561,9 @@
- to (shade(@theme_selected_bg_color, 1.09)));
- }
-
-+.selection-mode.header-bar .suggested-action.button:checked,
- .selection-mode.header-bar .suggested-action.button:active,
-+.selection-mode.toolbar .suggested-action.button:checked,
- .selection-mode.toolbar .suggested-action.button:active,
- .selection-mode.toolbar GtkToolButton.suggested-action:active {
- border-color: shade(@theme_selected_bg_color, 0.7);
-@@ -3417,7 +3607,9 @@
- color: shade(@theme_selected_bg_color, 0.5);
- }
-
-+.selection-mode.header-bar .selection-menu.button:checked,
- .selection-mode.header-bar .selection-menu.button:active,
-+.selection-mode.toolbar .selection-menu.button:checked,
- .selection-mode.toolbar .selection-menu.button:active {
- color: shade(@theme_selected_bg_color, 0.6);
- box-shadow: none;
diff --git a/community/backuppc/remove-deprecated-perl-defined-at.patch b/community/backuppc/remove-deprecated-perl-defined-at.patch
deleted file mode 100644
index 471c767569..0000000000
--- a/community/backuppc/remove-deprecated-perl-defined-at.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 1261ba6d7a7ba0c973f25b8a63987360a639e16c Mon Sep 17 00:00:00 2001
-From: Alexander Moisseev <moiseev@mezonplus.ru>
-Date: Wed, 7 Jan 2015 15:11:49 +0300
-Subject: [PATCH] Browse.pm: - Remove deprecated defined(@array) perl5160delta:
- http://perldoc.perl.org/perldiag.html#defined(@array)-is-deprecated
-
----
- lib/BackupPC/CGI/Browse.pm | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/BackupPC/CGI/Browse.pm b/lib/BackupPC/CGI/Browse.pm
-index 7309955..fea400f 100644
---- a/lib/BackupPC/CGI/Browse.pm
-+++ b/lib/BackupPC/CGI/Browse.pm
-@@ -65,7 +65,7 @@ sub action
- #
- # default to the newest backup
- #
-- if ( !defined($In{num}) && defined(@Backups) && @Backups > 0 ) {
-+ if ( !defined($In{num}) && @Backups > 0 ) {
- $i = @Backups - 1;
- $num = $Backups[$i]{num};
- }
diff --git a/community/biber/fix-sortinithash-unicode-collate.patch b/community/biber/fix-sortinithash-unicode-collate.patch
deleted file mode 100644
index db046224a4..0000000000
--- a/community/biber/fix-sortinithash-unicode-collate.patch
+++ /dev/null
@@ -1,1630 +0,0 @@
-diff --git a/t/annotations.t b/t/annotations.t
-index b4f641eb..c6f86c7f 100644
---- a/t/annotations.t
-+++ b/t/annotations.t
-@@ -73,7 +73,7 @@ my $ann1 = q| \entry{ann1}{misc}{}
- \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c}
- \field{extraname}{1}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{title}{The Title}
-@@ -116,7 +116,7 @@ my $ann2 = q| \entry{ann2}{misc}{}
- \strng{authorfullhash}{90ae96c82de92e36949bc64254bbde0c}
- \field{extraname}{2}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{title}{The Title}
-diff --git a/t/basic-misc.t b/t/basic-misc.t
-index 3da513a1..c9622693 100644
---- a/t/basic-misc.t
-+++ b/t/basic-misc.t
-@@ -97,7 +97,7 @@ my $u1 = q| \entry{u1}{misc}{}
- \strng{authorfullhash}{b78abdc838d79b6576f2ed0021642766}
- \field{labelalpha}{AAA\textbf{+}00}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -231,7 +231,7 @@ my $murray1 = q| \entry{murray}{article}{}
- \strng{authorfullhash}{1572cc3fd324f560e5e71d041a6bd764}
- \field{labelalpha}{Hos\textbf{+}98}
- \field{sortinit}{H}
-- \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681}
-+ \field{sortinithash}{6db6145dae8dc9e1271a8d556090b50a}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -348,7 +348,7 @@ my $murray2 = q| \entry{murray}{article}{}
- \strng{authorfullhash}{1572cc3fd324f560e5e71d041a6bd764}
- \field{labelalpha}{Hos98}
- \field{sortinit}{H}
-- \field{sortinithash}{5f15a7bc777ad49ff15aa4d2831b1681}
-+ \field{sortinithash}{6db6145dae8dc9e1271a8d556090b50a}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -389,7 +389,7 @@ my $t1 = q+ \entry{t1}{misc}{}
- \field{extraname}{1}
- \field{labelalpha}{Bro92}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquework}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -419,7 +419,7 @@ my $t2 = q| \entry{t2}{misc}{}
- \field{extraname}{2}
- \field{labelalpha}{Bro94}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquework}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -452,7 +452,7 @@ my $anon1 = q| \entry{anon1}{unpublished}{}
- \strng{shortauthorfullhash}{9873a6cc65c553faa2b21aaad626fe4b}
- \field{labelalpha}{XAn35}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{shortauthor}
-@@ -491,7 +491,7 @@ my $anon2 = q| \entry{anon2}{unpublished}{}
- \strng{shortauthorfullhash}{f64c29e89ea49402b997956610b58ef6}
- \field{labelalpha}{YAn39}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquework}
- \field{labelnamesource}{shortauthor}
-@@ -526,7 +526,7 @@ my $url1 = q| \entry{url1}{misc}{}
- \field{extraname}{4}
- \field{labelalpha}{Ali05}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{extraalpha}{4}
- \field{labelnamesource}{author}
- \field{year}{2005}
-@@ -710,7 +710,7 @@ my $isbn1 = q| \entry{isbn1}{misc}{}
- \field{extraname}{1}
- \field{labelalpha}{Flu}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{isbn}{978-0-8165-2066-4}
-@@ -735,7 +735,7 @@ my $isbn2 = q| \entry{isbn2}{misc}{}
- \field{extraname}{2}
- \field{labelalpha}{Flu}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{isbn}{978-0-8165-2066-4}
-@@ -778,7 +778,7 @@ my $clone1 = q| \entry{snk1}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{vDoe}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \endentry
-@@ -807,7 +807,7 @@ my $clone2 = q| \entry{clone-snk1}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{vDoe}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{addendum}{add}
-@@ -839,7 +839,7 @@ my $ent1 = q| \entry{ent1}{book}{}
- \strng{authorfullhash}{b2536a425d549b46de5f21c4d468050a}
- \field{labelalpha}{SdB}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \field{labelnamesource}{author}
- \endentry
-@@ -862,7 +862,7 @@ my $verb1 = q| \entry{verb1}{book}{}
- \strng{authorfullhash}{cac5a25f503e71f5ef28f474e14007b6}
- \field{labelalpha}{All}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \verb{verba}
-diff --git a/t/biblatexml.t b/t/biblatexml.t
-index ad9ad259..0959bfa5 100644
---- a/t/biblatexml.t
-+++ b/t/biblatexml.t
-@@ -111,7 +111,7 @@ my $l1 = q| \entry{bltx1}{misc}{useprefix=false}
- \strng{translatornamehash}{b44eba830fe9817fbe8e53c82f1cbe04}
- \strng{translatorfullhash}{b44eba830fe9817fbe8e53c82f1cbe04}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -158,7 +158,7 @@ my $l1 = q| \entry{bltx1}{misc}{useprefix=false}
-
- my $l2 = q| \entry{loopkey:a}{book}{}
- \field{sortinit}{0}
-- \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03}
-+ \field{sortinithash}{bcf7a1f4afb88b7299f988caccb80d1c}
- \endentry
- |;
-
-diff --git a/t/crossrefs.t b/t/crossrefs.t
-index 915b52b2..b6191c62 100644
---- a/t/crossrefs.t
-+++ b/t/crossrefs.t
-@@ -82,7 +82,7 @@ my $cr1 = q| \entry{cr1}{inbook}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{G}
-- \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f}
-+ \field{sortinithash}{62eb2aa29549e4fdbd3cb154ec5711cb}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -131,7 +131,7 @@ my $cr2 = q| \entry{cr2}{inbook}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -165,7 +165,7 @@ my $cr_m = q| \entry{cr_m}{book}{}
- \strng{editornamehash}{c129df5593fdaa7475548811bfbb227d}
- \strng{editorfullhash}{c129df5593fdaa7475548811bfbb227d}
- \field{sortinit}{G}
-- \field{sortinithash}{5e8d2bf9d38de41b1528bd307546008f}
-+ \field{sortinithash}{62eb2aa29549e4fdbd3cb154ec5711cb}
- \true{crossrefsource}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
-@@ -203,7 +203,7 @@ my $cr3 = q| \entry{cr3}{inbook}{}
- \strng{editornamehash}{a1f5c22413396d599ec766725b226735}
- \strng{editorfullhash}{a1f5c22413396d599ec766725b226735}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -248,7 +248,7 @@ my $cr4 = q| \entry{cr4}{inbook}{}
- \strng{editornamehash}{6ea89bd4958743a20b70fe17647d6af5}
- \strng{editorfullhash}{6ea89bd4958743a20b70fe17647d6af5}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -279,7 +279,7 @@ my $crt = q| \entry{crt}{book}{}
- \strng{editornamehash}{a1f5c22413396d599ec766725b226735}
- \strng{editorfullhash}{a1f5c22413396d599ec766725b226735}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{title}{Beasts of the Burbling Burns}
-@@ -315,7 +315,7 @@ my $cr6 = q| \entry{cr6}{inproceedings}{}
- \strng{editorfullhash}{344a7f427fb765610ef96eb7bce95257}
- \field{extraname}{2}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -366,7 +366,7 @@ my $cr7 = q| \entry{cr7}{inbook}{}
- \strng{bookauthorfullhash}{91a1dd4aeed3c4ec29ca74c4e778be5f}
- \field{extraname}{1}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -401,7 +401,7 @@ my $cr8 = q| \entry{cr8}{incollection}{}
- \strng{authorfullhash}{3d449e56eb3ca1ae80dc99a18d689795}
- \field{extraname}{4}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -431,7 +431,7 @@ my $xr1 = q| \entry{xr1}{inbook}{}
- \strng{authornamehash}{e0ecc4fc668ee499d1afba44e1ac064d}
- \strng{authorfullhash}{e0ecc4fc668ee499d1afba44e1ac064d}
- \field{sortinit}{Z}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -460,7 +460,7 @@ my $xr2 = q| \entry{xr2}{inbook}{}
- \strng{authornamehash}{6afa09374ecfd6b394ce714d2d9709c7}
- \strng{authorfullhash}{6afa09374ecfd6b394ce714d2d9709c7}
- \field{sortinit}{I}
-- \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8}
-+ \field{sortinithash}{9417e9a1288a9371e2691d999083ed39}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -491,7 +491,7 @@ my $xrm = q| \entry{xrm}{book}{}
- \strng{editornamehash}{809950f9b59ae207092b909a19dcb27b}
- \strng{editorfullhash}{809950f9b59ae207092b909a19dcb27b}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \true{xrefsource}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
-@@ -516,7 +516,7 @@ my $xr3 = q| \entry{xr3}{inbook}{}
- \strng{authornamehash}{9788055665b9bb4b37c776c3f6b74f16}
- \strng{authorfullhash}{9788055665b9bb4b37c776c3f6b74f16}
- \field{sortinit}{N}
-- \field{sortinithash}{f7242c3ed3dc50029fca1be76c497c7c}
-+ \field{sortinithash}{98cf339a479c0454fe09153a08675a15}
- \true{singletitle}
- \true{uniquetitle}
- \true{uniquework}
-@@ -546,7 +546,7 @@ my $xrt = q| \entry{xrt}{book}{}
- \strng{editornamehash}{bf7d6b02f3e073913e5bfe5059508dd5}
- \strng{editorfullhash}{bf7d6b02f3e073913e5bfe5059508dd5}
- \field{sortinit}{K}
-- \field{sortinithash}{9fd838a31ba64d981e8f44562bd33f89}
-+ \field{sortinithash}{d3edc18d54b9438a72c24c925bfb38f4}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{title}{Kings, Cork and Calculation}
-@@ -572,7 +572,7 @@ my $xr4 = q| \entry{xr4}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{1}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -600,7 +600,7 @@ my $mxr = q| \entry{mxr}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{2}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -625,7 +625,7 @@ my $mcr = q| \entry{mcr}{inbook}{}
- \strng{authorfullhash}{7804ffef086c0c4686c235807f5cb502}
- \field{extraname}{3}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
- \field{origyear}{1933}
-@@ -660,7 +660,7 @@ my $ccr1 = q| \entry{ccr2}{book}{}
- \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a}
- \field{extraname}{1}
- \field{sortinit}{V}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \true{uniquetitle}
- \true{uniquework}
- \field{labelnamesource}{author}
-@@ -694,7 +694,7 @@ my $ccr2 = q| \entry{ccr3}{inbook}{}
- \strng{editornamehash}{cfee758a1c82df2e26af1985e061bb0a}
- \strng{editorfullhash}{cfee758a1c82df2e26af1985e061bb0a}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \field{booktitle}{Misc etc.}
-@@ -726,7 +726,7 @@ my $ccr3 = q| \entry{ccr4}{inbook}{}
-
- my $s1 = q| \entry{s1}{inbook}{}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{uniquetitle}
- \field{labeltitlesource}{title}
- \strng{crossref}{s2}
-@@ -760,7 +760,7 @@ my $xc2 = q| \entry{xc2}{inbook}{}
- \strng{bookauthorfullhash}{1a0f7d518cccdad859a74412ef956474}
- \field{extraname}{2}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \true{xrefsource}
- \field{labelnamesource}{author}
- \field{booktitle}{Title}
-@@ -769,7 +769,7 @@ my $xc2 = q| \entry{xc2}{inbook}{}
-
- my $b1 = q| \entry{b1}{inbook}{}
- \field{sortinit}{2}
-- \field{sortinithash}{cbff857e587bcb4635511624d773949e}
-+ \field{sortinithash}{ed39bb39cf854d5250e95b1c1f94f4ed}
- \strng{crossref}{b2}
- \field{day}{3}
- \field{month}{3}
-@@ -803,7 +803,7 @@ my $sup1 = q| \entry{sup1}{mvbook}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{crossrefsource}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -828,7 +828,7 @@ my $sup2 = q| \entry{sup2}{book}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/datalists.t b/t/datalists.t
-index 3081cc49..4855e3d9 100644
---- a/t/datalists.t
-+++ b/t/datalists.t
-@@ -187,7 +187,7 @@ my $K11 = q| \entry{K11}{book}{}
- \strng{authornamehash}{4edc280a0ef229f9c061e3b121b17482}
- \strng{authorfullhash}{4edc280a0ef229f9c061e3b121b17482}
- \field{sortinit}{a}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -219,7 +219,7 @@ my $K12 = q| \entry{K12}{book}{}
- \strng{authornamehash}{a846a485fc9cbb59b0ebeedd6ac637e4}
- \strng{authorfullhash}{a846a485fc9cbb59b0ebeedd6ac637e4}
- \field{sortinit}{Z}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/dateformats.t b/t/dateformats.t
-index f941cde8..2c01de8d 100644
---- a/t/dateformats.t
-+++ b/t/dateformats.t
-@@ -88,7 +88,7 @@ my $l13c = q| \entry{L13}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{3}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -126,7 +126,7 @@ my $l14 = q| \entry{L14}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{4}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{3}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -168,7 +168,7 @@ my $l15 = q| \entry{L15}{book}{}
- \strng{authorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{12}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -201,7 +201,7 @@ my $l16 = q| \entry{L16}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{13}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{7}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{event}
-@@ -240,7 +240,7 @@ my $l17 = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -299,7 +299,7 @@ my $l17c = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{orig}
- \field{labelnamesource}{editor}
-@@ -357,7 +357,7 @@ my $l17e = q| \entry{L17}{proceedings}{}
- \strng{editorfullhash}{8c77336299b25bdada7bf8038f46722f}
- \field{extraname}{5}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{event}
- \field{labelnamesource}{editor}
-@@ -479,7 +479,7 @@ my $era1 = q| \entry{era1}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{9}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -512,7 +512,7 @@ my $era2 = q| \entry{era2}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{10}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -546,7 +546,7 @@ my $era3 = q| \entry{era3}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{11}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -580,7 +580,7 @@ my $era4 = q| \entry{era4}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{6}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -622,7 +622,7 @@ my $time1 = q| \entry{time1}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{2}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -671,7 +671,7 @@ my $range1 = q| \entry{range1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{7}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{1}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -712,7 +712,7 @@ my $range2 = q| \entry{range2}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{8}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{2}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -753,7 +753,7 @@ my $season1 = q| \entry{season1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -785,7 +785,7 @@ my $unspec1 = q| \entry{unspec1}{inproceedings}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{4}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -838,7 +838,7 @@ my $unspec2 = q| \entry{unspec2}{article}{}
- \strng{authorfullhash}{556c8dba145b472e6a8598d506f7cbe2}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/encoding.t b/t/encoding.t
-index a150b4f5..36d99558 100644
---- a/t/encoding.t
-+++ b/t/encoding.t
-@@ -52,7 +52,7 @@ my $encode1 = q| \entry{testŠ}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -82,7 +82,7 @@ my $encode2 = q| \entry{test1}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -112,7 +112,7 @@ my $encode3 = q| \entry{test1}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -142,7 +142,7 @@ my $encode5 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -172,7 +172,7 @@ my $encode6 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-@@ -202,7 +202,7 @@ my $encode7 = q| \entry{test}{book}{}
- \strng{authorfullhash}{06a47edae2e847800cfd78323a0e6be8}
- \field{labelalpha}{Enc99}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{labeldatesource}{year}
- \true{singletitle}
- \field{labelnamesource}{author}
-diff --git a/t/names.t b/t/names.t
-index 7b9a59a3..4908bea1 100644
---- a/t/names.t
-+++ b/t/names.t
-@@ -188,7 +188,7 @@ my $l1 = q| \entry{L1}{book}{}
- \strng{authornamehash}{72287a68c1714cb1b9f4ab9e03a88b96}
- \strng{authorfullhash}{72287a68c1714cb1b9f4ab9e03a88b96}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -208,7 +208,7 @@ my $l2 = q| \entry{L2}{book}{}
- \strng{authornamehash}{2098d59d0f19a2e003ee06c1aa750d57}
- \strng{authorfullhash}{2098d59d0f19a2e003ee06c1aa750d57}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -228,7 +228,7 @@ my $l3 = q| \entry{L3}{book}{}
- \strng{authornamehash}{c8b06fe88bde128b25eb0b3b1cc5837c}
- \strng{authorfullhash}{c8b06fe88bde128b25eb0b3b1cc5837c}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -248,7 +248,7 @@ my $l4 = q| \entry{L4}{book}{}
- \strng{authornamehash}{5ec958b850c0c2de7de7c42c84b9c419}
- \strng{authorfullhash}{5ec958b850c0c2de7de7c42c84b9c419}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -270,7 +270,7 @@ my $l5 = q| \entry{L5}{book}{}
- \strng{authornamehash}{c6b9d281cc1ff3f35570f76f463d4244}
- \strng{authorfullhash}{c6b9d281cc1ff3f35570f76f463d4244}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -292,7 +292,7 @@ my $l6 = q| \entry{L6}{book}{}
- \strng{authornamehash}{5fd24d3d1608a310ec205a6b201a5495}
- \strng{authorfullhash}{5fd24d3d1608a310ec205a6b201a5495}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -314,7 +314,7 @@ my $l7 = q| \entry{L7}{book}{}
- \strng{authornamehash}{98edb0b90251df22b74328d9227eceb7}
- \strng{authorfullhash}{98edb0b90251df22b74328d9227eceb7}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -336,7 +336,7 @@ my $l8 = q| \entry{L8}{book}{}
- \strng{authornamehash}{1211dc8dbbc191cbcab4da3c3c1fc48a}
- \strng{authorfullhash}{1211dc8dbbc191cbcab4da3c3c1fc48a}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -356,7 +356,7 @@ my $l9 = q| \entry{L9}{book}{}
- \strng{authornamehash}{bae61a889ab149a6deafe45333204cf0}
- \strng{authorfullhash}{bae61a889ab149a6deafe45333204cf0}
- \field{sortinit}{I}
-- \field{sortinithash}{320bc8fe8101b9376f9f21cd507de0e8}
-+ \field{sortinithash}{9417e9a1288a9371e2691d999083ed39}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -379,7 +379,7 @@ my $l10 = q| \entry{L10}{book}{}
- \strng{authornamehash}{37b4325752e394ddfb2fc810f6c88e27}
- \strng{authorfullhash}{37b4325752e394ddfb2fc810f6c88e27}
- \field{sortinit}{J}
-- \field{sortinithash}{fce5f8d0bd05e8d93f3dbe21c78897ca}
-+ \field{sortinithash}{c45040a764d616897e7f5b30174d7b92}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -402,7 +402,7 @@ my $l10a = q| \entry{L10a}{book}{}
- \strng{authornamehash}{7bf2c9d8b89a1930ee91bfddcaf20c9c}
- \strng{authorfullhash}{7bf2c9d8b89a1930ee91bfddcaf20c9c}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -427,7 +427,7 @@ my $l11 = q| \entry{L11}{book}{}
- \strng{authornamehash}{9f48d231be68c9435fab4faca55a5caf}
- \strng{authorfullhash}{9f48d231be68c9435fab4faca55a5caf}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -449,7 +449,7 @@ my $l12 = q| \entry{L12}{book}{}
- \strng{authornamehash}{d7ca88c13a8f7ce1c23e920010a31f83}
- \strng{authorfullhash}{d7ca88c13a8f7ce1c23e920010a31f83}
- \field{sortinit}{d}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-@@ -470,7 +470,7 @@ my $l13 = q| \entry{L13}{book}{}
- \strng{authornamehash}{227ac48bb788a658cfaa4eefc71ff0cc}
- \strng{authorfullhash}{227ac48bb788a658cfaa4eefc71ff0cc}
- \field{sortinit}{V}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -490,7 +490,7 @@ my $l14 = q| \entry{L14}{book}{}
- \strng{authornamehash}{779475052c17ed56dc3be900d0dfdf87}
- \strng{authorfullhash}{779475052c17ed56dc3be900d0dfdf87}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -513,7 +513,7 @@ my $l15 = q| \entry{L15}{book}{}
- \strng{authorfullhash}{783c636e853e47a854ae034ebe9dde62}
- \field{extraname}{1}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -536,7 +536,7 @@ my $l16 = q| \entry{L16}{book}{}
- \strng{authorfullhash}{783c636e853e47a854ae034ebe9dde62}
- \field{extraname}{2}
- \field{sortinit}{v}
-- \field{sortinithash}{75dd7385c90b2252c3ae853a80ca853b}
-+ \field{sortinithash}{02432525618c08e2b03cac47c19764af}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -557,7 +557,7 @@ my $l17 = q| \entry{L17}{book}{}
- \strng{authorfullhash}{b51f667a3384d92ea5458ba80716bff7}
- \field{extraname}{1}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -578,7 +578,7 @@ my $l18 = q| \entry{L18}{book}{}
- \strng{authorfullhash}{b51f667a3384d92ea5458ba80716bff7}
- \field{extraname}{2}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -598,7 +598,7 @@ my $l19 = q| \entry{L19}{book}{}
- \strng{authornamehash}{83caa52f21f97e572dd3267bdf62978a}
- \strng{authorfullhash}{83caa52f21f97e572dd3267bdf62978a}
- \field{sortinit}{M}
-- \field{sortinithash}{cfd219b90152c06204fab207bc6c7cab}
-+ \field{sortinithash}{2e5c2f51f7fa2d957f3206819bf86dc3}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -618,7 +618,7 @@ my $l19a = q| \entry{L19a}{book}{}
- \strng{authornamehash}{0963f6904ccfeaac2770c5882a587001}
- \strng{authorfullhash}{0963f6904ccfeaac2770c5882a587001}
- \field{sortinit}{L}
-- \field{sortinithash}{2c7981aaabc885868aba60f0c09ee20f}
-+ \field{sortinithash}{dad3efd0836470093a7b4a7bb756eb8c}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -639,7 +639,7 @@ my $l20 = q| \entry{L20}{book}{}
- \strng{authornamehash}{5f26c2f3b33095d5b005714893f4d698}
- \strng{authorfullhash}{5f26c2f3b33095d5b005714893f4d698}
- \field{sortinit}{F}
-- \field{sortinithash}{669c706c6f1fbf3b5a83d26f1d9e9e72}
-+ \field{sortinithash}{fb0c0faa89eb6abae8213bf60e6799ea}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -660,7 +660,7 @@ my $l21 = q| \entry{L21}{book}{}
- \strng{authorfullhash}{4389a3c0dc7da74487b50808ba9436ad}
- \field{extraname}{1}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -681,7 +681,7 @@ my $l22u = q| \entry{L22}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{1}
- \field{sortinit}{Š}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -703,7 +703,7 @@ my $l22 = q| \entry{L22}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{1}
- \field{sortinit}{\v{S}}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-@@ -726,7 +726,7 @@ my $l23 = q| \entry{L23}{book}{}
- \strng{authorfullhash}{4389a3c0dc7da74487b50808ba9436ad}
- \field{extraname}{3}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -747,7 +747,7 @@ my $l24 = q| \entry{L24}{book}{}
- \strng{authorfullhash}{e58b861545799d0eaf883402a882126e}
- \field{extraname}{2}
- \field{sortinit}{Š}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -765,7 +765,7 @@ my $l25 = q| \entry{L25}{book}{}
- \strng{authornamehash}{d7cd2c5ea0848abc3e90609558b84a45}
- \strng{authorfullhash}{d7cd2c5ea0848abc3e90609558b84a45}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -783,7 +783,7 @@ my $l26 = q| \entry{L26}{book}{}
- \strng{authornamehash}{8eee1dbafdbd0a4b73157e60f18b4784}
- \strng{authorfullhash}{8eee1dbafdbd0a4b73157e60f18b4784}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -791,7 +791,7 @@ my $l26 = q| \entry{L26}{book}{}
- # Malformed anyway but a decent test
- my $l28 = q| \entry{L28}{book}{}
- \field{sortinit}{0}
-- \field{sortinithash}{168ad0c7c5ed09f1d28c6675717b5b03}
-+ \field{sortinithash}{bcf7a1f4afb88b7299f988caccb80d1c}
- \warn{\item Name "Deux et al.,, O." is malformed (consecutive commas): skipping name}
- \endentry
- |;
-@@ -810,7 +810,7 @@ my $l29 = q| \entry{L29}{book}{}
- \strng{authornamehash}{27ad192a3a715aa89152b2a4ee392e8c}
- \strng{authorfullhash}{27ad192a3a715aa89152b2a4ee392e8c}
- \field{sortinit}{U}
-- \field{sortinithash}{36a2444f5238e0dcf4bb59704df6624d}
-+ \field{sortinithash}{77a6935510e008adcf5b555e7b4f0711}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -850,7 +850,7 @@ my $l31 = q| \entry{L31}{book}{}
- \strng{translatornamehash}{29c3ff92fff79d09a8b44d2f775de0b1}
- \strng{translatorfullhash}{29c3ff92fff79d09a8b44d2f775de0b1}
- \field{sortinit}{\~{Z}}
-- \field{sortinithash}{156173bd08b075d7295bc3e0f4735a04}
-+ \field{sortinithash}{8f7b480688e809b50b6f6577b16f3db5}
- \true{uniqueprimaryauthor}
- \field{labelnamesource}{author}
- \endentry
-diff --git a/t/options.t b/t/options.t
-index 8cb3b612..7e4c1f20 100644
---- a/t/options.t
-+++ b/t/options.t
-@@ -100,7 +100,7 @@ my $l1 = q| \entry{L1}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -137,7 +137,7 @@ my $l2 = q| \entry{L2}{book}{maxcitenames=3,maxbibnames=3,maxsortnames=3,maxi
- \strng{authornamehash}{19eec87c959944d6d9c72434a42856ba}
- \strng{authorfullhash}{19eec87c959944d6d9c72434a42856ba}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -169,7 +169,7 @@ my $l3 = q| \entry{L3}{book}{blah=10}
- \strng{authornamehash}{490250da1f3b92580d97563dc96c6c84}
- \strng{authorfullhash}{490250da1f3b92580d97563dc96c6c84}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-diff --git a/t/related-entries.t b/t/related-entries.t
-index 53dce64b..b38ac79f 100644
---- a/t/related-entries.t
-+++ b/t/related-entries.t
-@@ -56,7 +56,7 @@ my $k1 = q| \entry{key1}{article}{}
- \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5}
- \field{extraname}{1}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -95,7 +95,7 @@ my $k2 = q| \entry{key2}{inbook}{}
- \strng{authorfullhash}{a517747c3d12f99244ae598910d979c5}
- \field{extraname}{2}
- \field{sortinit}{2}
-- \field{sortinithash}{cbff857e587bcb4635511624d773949e}
-+ \field{sortinithash}{ed39bb39cf854d5250e95b1c1f94f4ed}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -243,7 +243,7 @@ my $kck4 = q| \entry{caf8e34be07426ae7127c1b4829983c1}{inbook}{dataonly,useed
-
- my $c1 = q| \entry{c1}{book}{}
- \field{sortinit}{3}
-- \field{sortinithash}{a4b52e5432884761f50fb9571273b93e}
-+ \field{sortinithash}{a37a8ef248a93c322189792c34fc68c9}
- \field{related}{9ab62b5ef34a985438bfdf7ee0102229}
- \endentry
- |;
-@@ -330,7 +330,7 @@ my $un1 = q| \entry{kullback}{book}{}
- \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198}
- \field{extraname}{1}
- \field{sortinit}{5}
-- \field{sortinithash}{3c19c3776b658b3558e9e2e4840c01e2}
-+ \field{sortinithash}{5dd416adbafacc8226114bc0202d5fdd}
- \field{extradatescope}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -364,7 +364,7 @@ my $un2 = q| \entry{kullback:related}{book}{}
- \strng{authorfullhash}{34c5bbf9876c37127c3abe4e7d7a7198}
- \field{extraname}{2}
- \field{sortinit}{6}
-- \field{sortinithash}{57e57fb8451e7fcfa45d1e069f6d3136}
-+ \field{sortinithash}{7851c86048328b027313775d8fbd2131}
- \field{extradatescope}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/set-legacy.t b/t/set-legacy.t
-index 4e56991e..9d40acb7 100644
---- a/t/set-legacy.t
-+++ b/t/set-legacy.t
-@@ -45,7 +45,7 @@ my $out = $biber->get_output_obj;
- my $string1 = q| \entry{Elias1955}{set}{}
- \set{Elias1955a,Elias1955b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \endentry
- |;
-
-diff --git a/t/skips.t b/t/skips.t
-index 7c80d391..caa835fb 100644
---- a/t/skips.t
-+++ b/t/skips.t
-@@ -50,7 +50,7 @@ my $set1 = q| \entry{seta}{set}{}
- \field{labelalpha}{Doe10}
- \field{extraalpha}{1}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \endentry
- |;
-
-@@ -70,7 +70,7 @@ my $set2 = q| \entry{set:membera}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -97,7 +97,7 @@ my $set3 = q| \entry{set:memberb}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -123,7 +123,7 @@ my $set4 = q| \entry{set:memberc}{book}{}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -150,7 +150,7 @@ my $noset1 = q| \entry{noseta}{book}{}
- \field{extraname}{3}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{2}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -180,7 +180,7 @@ my $noset2 = q| \entry{nosetb}{book}{}
- \field{extraname}{4}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{3}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -210,7 +210,7 @@ my $noset3 = q| \entry{nosetc}{book}{}
- \field{extraname}{5}
- \field{labelalpha}{Doe10}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extradate}{4}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
-@@ -244,7 +244,7 @@ my $sk4 = q| \entry{skip4}{article}{dataonly}
- \strng{authornamehash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/sort-complex.t b/t/sort-complex.t
-index 75061f1c..8c1fabea 100644
---- a/t/sort-complex.t
-+++ b/t/sort-complex.t
-@@ -123,7 +123,7 @@ my $l4 = q| \entry{L4}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{Doe\textbf{+}95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -155,7 +155,7 @@ my $l1 = q| \entry{L1}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -187,7 +187,7 @@ my $l2 = q| \entry{L2}{book}{}
- \field{extraname}{3}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{3}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -219,7 +219,7 @@ my $l3 = q| \entry{L3}{book}{}
- \field{extraname}{2}
- \field{labelalpha}{Doe95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{2}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -253,7 +253,7 @@ my $l5 = q| \entry{L5}{book}{}
- \field{extraname}{1}
- \field{labelalpha}{Doe\textbf{+}95}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{extraalpha}{1}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/tdata/full-bbl.bbl b/t/tdata/full-bbl.bbl
-index 4f168de8..07c2fab4 100644
---- a/t/tdata/full-bbl.bbl
-+++ b/t/tdata/full-bbl.bbl
-@@ -36,7 +36,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -63,7 +63,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{A}
-- \field{sortinithash}{d77c7cdd82ff690d4c3ef13216f92f0b}
-+ \field{sortinithash}{a3dcedd53b04d1adfd5ac303ecd5e6fa}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -90,7 +90,7 @@
- \strng{authorfullhash}{bd051a2f7a5f377e3a62581b0e0f8577}
- \field{labelalpha}{\emph{A}}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \true{singletitle}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-diff --git a/t/tdata/full-bblxml.bblxml b/t/tdata/full-bblxml.bblxml
-index 9eea7d18..a39a7872 100644
---- a/t/tdata/full-bblxml.bblxml
-+++ b/t/tdata/full-bblxml.bblxml
-@@ -47,7 +47,7 @@
- <bbl:field name="authorbibnamehash">860705eb8ffac6e40507746c7ede79ca</bbl:field>
- <bbl:field name="labelalpha">Aks\textbf{+}06</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="indextitle">Effect of immobilization on catalytic characteristics</bbl:field>
-@@ -79,7 +79,7 @@
- <bbl:field name="authorbibnamehash">9717d2d959a4b18727868ca7928c34b4</bbl:field>
- <bbl:field name="labelalpha">Ang02</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
- <bbl:field name="annotation">A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field</bbl:field>
-@@ -109,7 +109,7 @@
- </bbl:set>
- <bbl:field name="labelalpha">Gla61</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="annotation">A set entry with three members discussing the standard model of particle physics.</bbl:field>
- </bbl:entry>
- <bbl:entry key="stdmodel:glashow" type="article">
-@@ -129,7 +129,7 @@
- <bbl:field name="authorfullhash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="authorbibnamehash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Nucl. Phys.</bbl:field>
-@@ -168,7 +168,7 @@
- <bbl:field name="extraname">1</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">1</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -207,7 +207,7 @@
- <bbl:field name="extraname">2</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">2</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -236,7 +236,7 @@
- <bbl:field name="authorbibnamehash">d52f05e0199eae563725b4165f4b2520</bbl:field>
- <bbl:field name="labelalpha">Ree58</bbl:field>
- <bbl:field name="sortinit">R</bbl:field>
-- <bbl:field name="sortinithash">da6b42bd3ab22fee61abed031ee405f7</bbl:field>
-+ <bbl:field name="sortinithash">b9c68a358aea118dfa887b6e902414a7</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically</bbl:field>
-@@ -286,7 +286,7 @@
- <bbl:field name="editorfullhash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="editorbibnamehash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="booksubtitle">Relativistic groups and analyticity</bbl:field>
-@@ -317,7 +317,7 @@
- <bbl:field name="authorbibnamehash">93f17724cbd884231ef39a73755ef5bb</bbl:field>
- <bbl:field name="labelalpha">Sho91</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with series, volume, and number fields. Note the format of the series which is a localization key</bbl:field>
-@@ -353,7 +353,7 @@
- <bbl:field name="authorfullhash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="authorbibnamehash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="sortinit">W</bbl:field>
-- <bbl:field name="sortinithash">ecb89ff85896a47dc313960773ac311d</bbl:field>
-+ <bbl:field name="sortinithash">1af34bd8c148ffb32de1494636b49713</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Phys. Rev. Lett.</bbl:field>
-@@ -411,7 +411,7 @@
- <bbl:field name="authorbibnamehash">860705eb8ffac6e40507746c7ede79ca</bbl:field>
- <bbl:field name="labelalpha">Aks\textbf{+}06</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="indextitle">Effect of immobilization on catalytic characteristics</bbl:field>
-@@ -443,7 +443,7 @@
- <bbl:field name="authorbibnamehash">9717d2d959a4b18727868ca7928c34b4</bbl:field>
- <bbl:field name="labelalpha">Ang02</bbl:field>
- <bbl:field name="sortinit">A</bbl:field>
-- <bbl:field name="sortinithash">d77c7cdd82ff690d4c3ef13216f92f0b</bbl:field>
-+ <bbl:field name="sortinithash">a3dcedd53b04d1adfd5ac303ecd5e6fa</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
- <bbl:field name="annotation">A German article in a French journal. Apart from that, a typical article entry. Note the indextitle field</bbl:field>
-@@ -473,7 +473,7 @@
- </bbl:set>
- <bbl:field name="labelalpha">Gla61</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="annotation">A set entry with three members discussing the standard model of particle physics.</bbl:field>
- </bbl:entry>
- <bbl:entry key="stdmodel:glashow" type="article">
-@@ -493,7 +493,7 @@
- <bbl:field name="authorfullhash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="authorbibnamehash">eb3f242602109f5bdbeb41fdd990fcc0</bbl:field>
- <bbl:field name="sortinit">G</bbl:field>
-- <bbl:field name="sortinithash">5e8d2bf9d38de41b1528bd307546008f</bbl:field>
-+ <bbl:field name="sortinithash">62eb2aa29549e4fdbd3cb154ec5711cb</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Nucl. Phys.</bbl:field>
-@@ -532,7 +532,7 @@
- <bbl:field name="extraname">1</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">1</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -571,7 +571,7 @@
- <bbl:field name="extraname">2</bbl:field>
- <bbl:field name="labelalpha">Knu86</bbl:field>
- <bbl:field name="sortinit">K</bbl:field>
-- <bbl:field name="sortinithash">9fd838a31ba64d981e8f44562bd33f89</bbl:field>
-+ <bbl:field name="sortinithash">d3edc18d54b9438a72c24c925bfb38f4</bbl:field>
- <bbl:field name="extraalpha">2</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">shorttitle</bbl:field>
-@@ -600,7 +600,7 @@
- <bbl:field name="authorbibnamehash">d52f05e0199eae563725b4165f4b2520</bbl:field>
- <bbl:field name="labelalpha">Ree58</bbl:field>
- <bbl:field name="sortinit">R</bbl:field>
-- <bbl:field name="sortinithash">da6b42bd3ab22fee61abed031ee405f7</bbl:field>
-+ <bbl:field name="sortinithash">b9c68a358aea118dfa887b6e902414a7</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with a series and a volume field. Note the format of the series. If the value of the series field is an integer, this number is printed as an ordinal and the string *series is appended automatically</bbl:field>
-@@ -650,7 +650,7 @@
- <bbl:field name="editorfullhash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="editorbibnamehash">d0ec890e59163c24c111a08d2a4be982</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="booksubtitle">Relativistic groups and analyticity</bbl:field>
-@@ -681,7 +681,7 @@
- <bbl:field name="authorbibnamehash">93f17724cbd884231ef39a73755ef5bb</bbl:field>
- <bbl:field name="labelalpha">Sho91</bbl:field>
- <bbl:field name="sortinit">S</bbl:field>
-- <bbl:field name="sortinithash">322b1d5276f2f6c1bccdcd15920dbee6</bbl:field>
-+ <bbl:field name="sortinithash">c319cff79d99c853d775f88277d4e45f</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="annotation">An article entry with series, volume, and number fields. Note the format of the series which is a localization key</bbl:field>
-@@ -717,7 +717,7 @@
- <bbl:field name="authorfullhash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="authorbibnamehash">15e144c72b0b9d10db00ddc6d37a19e6</bbl:field>
- <bbl:field name="sortinit">W</bbl:field>
-- <bbl:field name="sortinithash">ecb89ff85896a47dc313960773ac311d</bbl:field>
-+ <bbl:field name="sortinithash">1af34bd8c148ffb32de1494636b49713</bbl:field>
- <bbl:field name="labelnamesource">author</bbl:field>
- <bbl:field name="labeltitlesource">title</bbl:field>
- <bbl:field name="journaltitle">Phys. Rev. Lett.</bbl:field>
-diff --git a/t/tdata/remote-files.bcf b/t/tdata/remote-files.bcf
-index c2d784b6..a2a1842b 100644
---- a/t/tdata/remote-files.bcf
-+++ b/t/tdata/remote-files.bcf
-@@ -1853,12 +1853,12 @@
- <bcf:datasource type="file" datatype="bibtex">http://www.citeulike.org/bibtex/group/8082</bcf:datasource>
- <bcf:datasource type="file" datatype="bibtex">http://people.cs.uu.nl/hansb/graphs-bib/definitions.bib</bcf:datasource>
- <bcf:datasource type="file" datatype="bibtex">http://people.cs.uu.nl/hansb/graphs-bib/papers.bib</bcf:datasource>
-- <bcf:datasource type="file" datatype="bibtex">https://api.zotero.org/groups/9097/items/II22KQ7D?format=bibtex&amp;limit=1</bcf:datasource>
-+ <bcf:datasource type="file" datatype="bibtex">https://api.zotero.org/groups/9097/items/8VITAT46?format=bibtex&amp;limit=1</bcf:datasource>
- </bcf:bibdata>
- <bcf:section number="0">
- <bcf:citekey order="1">citeulike:8283461</bcf:citekey>
- <bcf:citekey order="2">AbdelbarH98</bcf:citekey>
-- <bcf:citekey order="3">merleau-ponty_philosophe_2010</bcf:citekey>
-+ <bcf:citekey order="3">crossley_politics_1994</bcf:citekey>
- </bcf:section>
- <!-- SORTING TEMPLATES -->
- <bcf:sortingtemplate name="nty">
-diff --git a/t/uniqueness-nameparts.t b/t/uniqueness-nameparts.t
-index 08d8d97c..09e18a8b 100644
---- a/t/uniqueness-nameparts.t
-+++ b/t/uniqueness-nameparts.t
-@@ -81,7 +81,7 @@ my $un1 = q| \entry{un1}{article}{}
- \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -106,7 +106,7 @@ my $un2 = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -131,7 +131,7 @@ my $un3 = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -156,7 +156,7 @@ my $un4 = q| \entry{un4}{article}{}
- \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -181,7 +181,7 @@ my $un1a = q| \entry{un1}{article}{}
- \strng{authorfullhash}{329d8f9192ea3349d700160c9ddb505d}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -206,7 +206,7 @@ my $un2a = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -231,7 +231,7 @@ my $un3a = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -257,7 +257,7 @@ my $un4a = q| \entry{un4}{article}{}
- \strng{authorfullhash}{f6038a264619efefd49c7daac56424ca}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -285,7 +285,7 @@ my $un1b = q| \entry{un1}{article}{}
- \field{extraname}{5}
- \field{labelalpha}{SmiJohSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{5}
- \field{labelnamesource}{author}
- \endentry
-@@ -311,7 +311,7 @@ my $un2b = q| \entry{un2}{article}{}
- \strng{authorfullhash}{7551114aede4ef69e4b3683039801706}
- \field{labelalpha}{SmiJohAla}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -336,7 +336,7 @@ my $un3b = q| \entry{un3}{article}{}
- \strng{authorfullhash}{401aebda288799a7c757526242d8c9fc}
- \field{labelalpha}{SmiJohArt}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{labelnamesource}{author}
- \endentry
- |;
-@@ -364,7 +364,7 @@ my $un4b = q| \entry{un4}{article}{}
- \field{extraname}{1}
- \field{labelalpha}{SmiAlaSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{1}
- \field{labelnamesource}{author}
- \endentry
-@@ -393,7 +393,7 @@ my $un5 = q| \entry{un5}{article}{uniquenametemplatename=test3}
- \field{extraname}{2}
- \field{labelalpha}{SmiArtSim}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{2}
- \field{labelnamesource}{author}
- \endentry
-@@ -422,7 +422,7 @@ my $un6 = q| \entry{un6}{article}{}
- \field{extraname}{3}
- \field{labelalpha}{SmiArtSmy}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{3}
- \field{labelnamesource}{author}
- \\endentry
-@@ -451,7 +451,7 @@ my $un7 = q| \entry{un7}{article}{}
- \field{extraname}{4}
- \field{labelalpha}{SmiArtSme}
- \field{sortinit}{S}
-- \field{sortinithash}{322b1d5276f2f6c1bccdcd15920dbee6}
-+ \field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
- \field{extradate}{4}
- \field{labelnamesource}{author}
- \endentry
-diff --git a/t/xdata.t b/t/xdata.t
-index 7411b1dd..73dcb8b1 100644
---- a/t/xdata.t
-+++ b/t/xdata.t
-@@ -75,7 +75,7 @@ my $xd1 = q| \entry{xd1}{book}{}
- \strng{authorfullhash}{51db4bfd331cba22959ce2d224c517cd}
- \field{extraname}{2}
- \field{sortinit}{E}
-- \field{sortinithash}{f615fb9c6fba11c6f962fb3fd599810e}
-+ \field{sortinithash}{c554bd1a0b76ea92b9f105fe36d9c7b0}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
-@@ -107,7 +107,7 @@ my $xd2 = q| \entry{xd2}{book}{}
- \strng{authornamehash}{68539e0ce4922cc4957c6cabf35e6fc8}
- \strng{authorfullhash}{68539e0ce4922cc4957c6cabf35e6fc8}
- \field{sortinit}{P}
-- \field{sortinithash}{8d51b3d5b78d75b54308d706b9bbe285}
-+ \field{sortinithash}{bb5b15f2db90f7aef79bb9e83defefcb}
- \field{extradatescope}{labelyear}
- \field{labeldatesource}{}
- \field{labelnamesource}{author}
---- a/t/set-static.t.orig
-+++ b/t/set-static.t
-@@ -47,7 +47,7 @@
- my $string1 = q| \entry{Static1}{set}{}
- \set{Static2,Static4,Static3}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{annotation}{Some notes}
- \endentry
- |;
-@@ -68,7 +68,7 @@
- \strng{authornamehash}{43874d80d7ce68027102819f16c47df1}
- \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1}
- \field{sortinit}{B}
-- \field{sortinithash}{276475738cc058478c1677046f857703}
-+ \field{sortinithash}{8de16967003c7207dae369d874f1456e}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -94,7 +94,7 @@
- \strng{authornamehash}{22dafa5cd57bb5dd7f3e3bab98fd539c}
- \strng{authorfullhash}{22dafa5cd57bb5dd7f3e3bab98fd539c}
- \field{sortinit}{D}
-- \field{sortinithash}{2ef1bd9a78cc71eb74d7231c635177b8}
-+ \field{sortinithash}{c438b3d5d027251ba63f5ed538d98af5}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -119,7 +119,7 @@
- \strng{authornamehash}{da80091c8cd89e5269bd55af1bd5d2fa}
- \strng{authorfullhash}{da80091c8cd89e5269bd55af1bd5d2fa}
- \field{sortinit}{C}
-- \field{sortinithash}{963e9d84a3da2344e8833203de5aed05}
-+ \field{sortinithash}{4c244ceae61406cdc0cc2ce1cb1ff703}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -145,7 +145,7 @@
- \strng{authornamehash}{43874d80d7ce68027102819f16c47df1}
- \strng{authorfullhash}{43874d80d7ce68027102819f16c47df1}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
---- a/t/set-dynamic.t
-+++ b/t/set-dynamic.t
-@@ -51,7 +51,7 @@
- my $string1 = q| \entry{DynSet}{set}{}
- \set{Dynamic1,Dynamic2,Dynamic3}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \endentry
- |;
-
-@@ -71,7 +71,7 @@
- \strng{authornamehash}{252caa7921a061ca92087a1a52f15b78}
- \strng{authorfullhash}{252caa7921a061ca92087a1a52f15b78}
- \field{sortinit}{8}
-- \field{sortinithash}{07edf88d4ea82509b9c4b4d13f41c452}
-+ \field{sortinithash}{1b24cab5087933ef0826a7cd3b99e994}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -98,7 +98,7 @@
- \strng{authornamehash}{894a5fe6de820f5dcce84a65581667f4}
- \strng{authorfullhash}{894a5fe6de820f5dcce84a65581667f4}
- \field{sortinit}{9}
-- \field{sortinithash}{1dd72ab054147731c9d824b49aba0534}
-+ \field{sortinithash}{54047ffb55bdefa0694bbd554c1b11a0}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -124,7 +124,7 @@
- \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
-@@ -151,7 +151,7 @@
- \strng{authornamehash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \strng{authorfullhash}{fc3cc97631ceaecdde2aee6cc60ab42b}
- \field{sortinit}{1}
-- \field{sortinithash}{2174f786c6195e7fe2ee1c229b416e29}
-+ \field{sortinithash}{50c6687d7fc80f50136d75228e3c59ba}
- \field{labeldatesource}{year}
- \field{labelnamesource}{author}
- \field{labeltitlesource}{title}
diff --git a/community/bitcoin/skip-fs-test-utf8.patch b/community/bitcoin/skip-fs-test-utf8.patch
deleted file mode 100644
index 3a6f8a102e..0000000000
--- a/community/bitcoin/skip-fs-test-utf8.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/test/fs_tests.cpp b/src/test/fs_tests.cpp
-index 6d5a6641f..b504a3cbb 100644
---- a/src/test/fs_tests.cpp
-+++ b/src/test/fs_tests.cpp
-@@ -15,7 +15,7 @@ BOOST_AUTO_TEST_CASE(fsbridge_fstream)
- fs::path tmpfolder = GetDataDir();
- // tmpfile1 should be the same as tmpfile2
- fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃";
-- fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃";
-+ fs::path tmpfile2 = tmpfolder / "fs_tests_₿_🏃";
- {
- fsbridge::ofstream file(tmpfile1);
- file << "bitcoin";
diff --git a/community/elixir/fix-release-pid-rpc-tests.patch b/community/elixir/fix-release-pid-rpc-tests.patch
deleted file mode 100644
index 230c1272fd..0000000000
--- a/community/elixir/fix-release-pid-rpc-tests.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2b48cc1e78dc29ecaef0f21598491fa2df373ff8 Mon Sep 17 00:00:00 2001
-From: Wouter <git@wouterklijn.com>
-Date: Tue, 30 Jul 2019 21:08:43 +0200
-Subject: [PATCH] Fix release pid RPC tests
-
----
- lib/mix/test/mix/tasks/release_test.exs | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/mix/test/mix/tasks/release_test.exs b/lib/mix/test/mix/tasks/release_test.exs
-index f200c3ea4b..793347d737 100644
---- a/lib/mix/test/mix/tasks/release_test.exs
-+++ b/lib/mix/test/mix/tasks/release_test.exs
-@@ -281,10 +281,11 @@ defmodule Mix.Tasks.ReleaseTest do
- open_port(script, ['start'])
- wait_until_decoded(Path.join(root, "RELEASE_BOOTED"))
- assert System.cmd(script, ["rpc", "ReleaseTest.hello_world"]) == {"hello world\n", 0}
-- assert System.cmd(script, ["stop"]) == {"", 0}
-
- assert {pid, 0} = System.cmd(script, ["pid"])
- assert pid != "\n"
-+
-+ assert System.cmd(script, ["stop"]) == {"", 0}
- end)
- end)
- end
diff --git a/community/gcc6/0001-i386-Move-struct-ix86_frame-to-machine_function.patch b/community/gcc6/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
deleted file mode 100644
index ecec2bad66..0000000000
--- a/community/gcc6/0001-i386-Move-struct-ix86_frame-to-machine_function.patch
+++ /dev/null
@@ -1,241 +0,0 @@
-From b1d2df5090abc9202a7bf2d224ac90de22908d21 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:27:24 +0000
-Subject: [PATCH 01/13] i386: Move struct ix86_frame to machine_function
-
-Make ix86_frame available to i386 code generation. This is needed to
-backport the patch set of -mindirect-branch= to mitigate variant #2 of
-the speculative execution vulnerabilities on x86 processors identified
-by CVE-2017-5715, aka Spectre.
-
- Backport from mainline
- 2017-06-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
-
- * config/i386/i386.c (ix86_frame): Moved to ...
- * config/i386/i386.h (ix86_frame): Here.
- (machine_function): Add frame.
- * config/i386/i386.c (ix86_compute_frame_layout): Repace the
- frame argument with &cfun->machine->frame.
- (ix86_can_use_return_insn_p): Don't pass &frame to
- ix86_compute_frame_layout. Copy frame from cfun->machine->frame.
- (ix86_can_eliminate): Likewise.
- (ix86_expand_prologue): Likewise.
- (ix86_expand_epilogue): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
----
- gcc/config/i386/i386.c | 68 ++++++++++----------------------------------------
- gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 65 insertions(+), 56 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 8b5faac5129..a1ff32b648b 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -2434,53 +2434,6 @@ struct GTY(()) stack_local_entry {
- struct stack_local_entry *next;
- };
-
--/* Structure describing stack frame layout.
-- Stack grows downward:
--
-- [arguments]
-- <- ARG_POINTER
-- saved pc
--
-- saved static chain if ix86_static_chain_on_stack
--
-- saved frame pointer if frame_pointer_needed
-- <- HARD_FRAME_POINTER
-- [saved regs]
-- <- regs_save_offset
-- [padding0]
--
-- [saved SSE regs]
-- <- sse_regs_save_offset
-- [padding1] |
-- | <- FRAME_POINTER
-- [va_arg registers] |
-- |
-- [frame] |
-- |
-- [padding2] | = to_allocate
-- <- STACK_POINTER
-- */
--struct ix86_frame
--{
-- int nsseregs;
-- int nregs;
-- int va_arg_size;
-- int red_zone_size;
-- int outgoing_arguments_size;
--
-- /* The offsets relative to ARG_POINTER. */
-- HOST_WIDE_INT frame_pointer_offset;
-- HOST_WIDE_INT hard_frame_pointer_offset;
-- HOST_WIDE_INT stack_pointer_offset;
-- HOST_WIDE_INT hfp_save_offset;
-- HOST_WIDE_INT reg_save_offset;
-- HOST_WIDE_INT sse_reg_save_offset;
--
-- /* When save_regs_using_mov is set, emit prologue using
-- move instead of push instructions. */
-- bool save_regs_using_mov;
--};
--
- /* Which cpu are we scheduling for. */
- enum attr_cpu ix86_schedule;
-
-@@ -2572,7 +2525,7 @@ static unsigned int ix86_function_arg_boundary (machine_mode,
- const_tree);
- static rtx ix86_static_chain (const_tree, bool);
- static int ix86_function_regparm (const_tree, const_tree);
--static void ix86_compute_frame_layout (struct ix86_frame *);
-+static void ix86_compute_frame_layout (void);
- static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
- rtx, rtx, int);
- static void ix86_add_new_builtins (HOST_WIDE_INT);
-@@ -10944,7 +10897,8 @@ ix86_can_use_return_insn_p (void)
- if (crtl->args.pops_args && crtl->args.size >= 32768)
- return 0;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11355,8 +11309,8 @@ ix86_can_eliminate (const int from, const int to)
- HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
-- struct ix86_frame frame;
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ struct ix86_frame frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -11395,8 +11349,9 @@ ix86_builtin_setjmp_frame_value (void)
- /* Fill structure ix86_frame about frame of currently computed function. */
-
- static void
--ix86_compute_frame_layout (struct ix86_frame *frame)
-+ix86_compute_frame_layout (void)
- {
-+ struct ix86_frame *frame = &cfun->machine->frame;
- unsigned HOST_WIDE_INT stack_alignment_needed;
- HOST_WIDE_INT offset;
- unsigned HOST_WIDE_INT preferred_alignment;
-@@ -12702,7 +12657,8 @@ ix86_expand_prologue (void)
- m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
- m->fs.sp_valid = true;
-
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13379,7 +13335,8 @@ ix86_expand_epilogue (int style)
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = m->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13876,7 +13833,8 @@ ix86_expand_split_stack_prologue (void)
- gcc_assert (flag_split_stack && reload_completed);
-
- ix86_finalize_stack_realign_flags ();
-- ix86_compute_frame_layout (&frame);
-+ ix86_compute_frame_layout ();
-+ frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 8113f83c7fd..54144166172 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2427,9 +2427,56 @@ enum avx_u128_state
-
- #define FASTCALL_PREFIX '@'
-
-+#ifndef USED_FOR_TARGET
-+/* Structure describing stack frame layout.
-+ Stack grows downward:
-+
-+ [arguments]
-+ <- ARG_POINTER
-+ saved pc
-+
-+ saved static chain if ix86_static_chain_on_stack
-+
-+ saved frame pointer if frame_pointer_needed
-+ <- HARD_FRAME_POINTER
-+ [saved regs]
-+ <- regs_save_offset
-+ [padding0]
-+
-+ [saved SSE regs]
-+ <- sse_regs_save_offset
-+ [padding1] |
-+ | <- FRAME_POINTER
-+ [va_arg registers] |
-+ |
-+ [frame] |
-+ |
-+ [padding2] | = to_allocate
-+ <- STACK_POINTER
-+ */
-+struct GTY(()) ix86_frame
-+{
-+ int nsseregs;
-+ int nregs;
-+ int va_arg_size;
-+ int red_zone_size;
-+ int outgoing_arguments_size;
-+
-+ /* The offsets relative to ARG_POINTER. */
-+ HOST_WIDE_INT frame_pointer_offset;
-+ HOST_WIDE_INT hard_frame_pointer_offset;
-+ HOST_WIDE_INT stack_pointer_offset;
-+ HOST_WIDE_INT hfp_save_offset;
-+ HOST_WIDE_INT reg_save_offset;
-+ HOST_WIDE_INT sse_reg_save_offset;
-+
-+ /* When save_regs_using_mov is set, emit prologue using
-+ move instead of push instructions. */
-+ bool save_regs_using_mov;
-+};
-+
- /* Machine specific frame tracking during prologue/epilogue generation. */
-
--#ifndef USED_FOR_TARGET
- struct GTY(()) machine_frame_state
- {
- /* This pair tracks the currently active CFA as reg+offset. When reg
-@@ -2475,6 +2522,9 @@ struct GTY(()) machine_function {
- int varargs_fpr_size;
- int optimize_mode_switching[MAX_386_ENTITIES];
-
-+ /* Cached initial frame layout for the current function. */
-+ struct ix86_frame frame;
-+
- /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
- has been computed for. */
- int use_fast_prologue_epilogue_nregs;
-@@ -2554,6 +2604,7 @@ struct GTY(()) machine_function {
- #define ix86_current_function_calls_tls_descriptor \
- (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
- #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
-+#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
-
- /* Control behavior of x86_file_start. */
- #define X86_FILE_START_VERSION_DIRECTIVE false
---
-2.16.3
-
diff --git a/community/gcc6/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch b/community/gcc6/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
deleted file mode 100644
index 79219e8582..0000000000
--- a/community/gcc6/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From b1fc91cda7c15264116f3dde6944ead149123653 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 15 Jan 2018 11:28:44 +0000
-Subject: [PATCH 02/13] i386: Use reference of struct ix86_frame to avoid copy
-
-When there is no need to make a copy of ix86_frame, we can use reference
-of struct ix86_frame to avoid copy.
-
- Backport from mainline
- 2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
- of struct ix86_frame.
- (ix86_initial_elimination_offset): Likewise.
- (ix86_expand_split_stack_prologue): Likewise.
----
- gcc/config/i386/i386.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index a1ff32b648b..13ebf107e90 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -10887,7 +10887,6 @@ symbolic_reference_mentioned_p (rtx op)
- bool
- ix86_can_use_return_insn_p (void)
- {
-- struct ix86_frame frame;
-
- if (! reload_completed || frame_pointer_needed)
- return 0;
-@@ -10898,7 +10897,7 @@ ix86_can_use_return_insn_p (void)
- return 0;
-
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- return (frame.stack_pointer_offset == UNITS_PER_WORD
- && (frame.nregs + frame.nsseregs) == 0);
- }
-@@ -11310,7 +11309,7 @@ HOST_WIDE_INT
- ix86_initial_elimination_offset (int from, int to)
- {
- ix86_compute_frame_layout ();
-- struct ix86_frame frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
-
- if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
- return frame.hard_frame_pointer_offset;
-@@ -13821,7 +13820,6 @@ static GTY(()) rtx split_stack_fn_large;
- void
- ix86_expand_split_stack_prologue (void)
- {
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- unsigned HOST_WIDE_INT args_size;
- rtx_code_label *label;
-@@ -13834,7 +13832,7 @@ ix86_expand_split_stack_prologue (void)
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = cfun->machine->frame;
-+ struct ix86_frame &frame = cfun->machine->frame;
- allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
-
- /* This is the label we will branch to if we have enough stack
---
-2.16.3
-
diff --git a/community/gcc6/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch b/community/gcc6/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
deleted file mode 100644
index 2f293946ff..0000000000
--- a/community/gcc6/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 3e39c0a8053b3e960cf4c3aea3c814e7dc97cfd6 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Sat, 27 Jan 2018 13:10:24 +0000
-Subject: [PATCH 03/13] i386: Use const reference of struct ix86_frame to avoid
- copy
-
-We can use const reference of struct ix86_frame to avoid making a local
-copy of ix86_frame. ix86_expand_epilogue makes a local copy of struct
-ix86_frame and uses the reg_save_offset field as a local variable. This
-patch uses a separate local variable for reg_save_offset.
-
-Tested on x86-64 with ada.
-
- Backport from mainline
- PR target/83905
- * config/i386/i386.c (ix86_expand_prologue): Use cost reference
- of struct ix86_frame.
- (ix86_expand_epilogue): Likewise. Add a local variable for
- the reg_save_offset field in struct ix86_frame.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257123 138bc75d-0d04-0410-961f-82ee72b054a4
----
- gcc/config/i386/i386.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 13ebf107e90..6c98f7581e2 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -12633,7 +12633,6 @@ ix86_expand_prologue (void)
- {
- struct machine_function *m = cfun->machine;
- rtx insn, t;
-- struct ix86_frame frame;
- HOST_WIDE_INT allocate;
- bool int_registers_saved;
- bool sse_registers_saved;
-@@ -12657,7 +12656,7 @@ ix86_expand_prologue (void)
- m->fs.sp_valid = true;
-
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
- {
-@@ -13329,13 +13328,12 @@ ix86_expand_epilogue (int style)
- {
- struct machine_function *m = cfun->machine;
- struct machine_frame_state frame_state_save = m->fs;
-- struct ix86_frame frame;
- bool restore_regs_via_mov;
- bool using_drap;
-
- ix86_finalize_stack_realign_flags ();
- ix86_compute_frame_layout ();
-- frame = m->frame;
-+ const struct ix86_frame &frame = cfun->machine->frame;
-
- m->fs.sp_valid = (!frame_pointer_needed
- || (crtl->sp_is_unchanging
-@@ -13377,11 +13375,13 @@ ix86_expand_epilogue (int style)
- + UNITS_PER_WORD);
- }
-
-+ HOST_WIDE_INT reg_save_offset = frame.reg_save_offset;
-+
- /* Special care must be taken for the normal return case of a function
- using eh_return: the eax and edx registers are marked as saved, but
- not restored along this path. Adjust the save location to match. */
- if (crtl->calls_eh_return && style != 2)
-- frame.reg_save_offset -= 2 * UNITS_PER_WORD;
-+ reg_save_offset -= 2 * UNITS_PER_WORD;
-
- /* EH_RETURN requires the use of moves to function properly. */
- if (crtl->calls_eh_return)
-@@ -13397,11 +13397,11 @@ ix86_expand_epilogue (int style)
- else if (TARGET_EPILOGUE_USING_MOVE
- && cfun->machine->use_fast_prologue_epilogue
- && (frame.nregs > 1
-- || m->fs.sp_offset != frame.reg_save_offset))
-+ || m->fs.sp_offset != reg_save_offset))
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && !frame.nregs
-- && m->fs.sp_offset != frame.reg_save_offset)
-+ && m->fs.sp_offset != reg_save_offset)
- restore_regs_via_mov = true;
- else if (frame_pointer_needed
- && TARGET_USE_LEAVE
-@@ -13439,7 +13439,7 @@ ix86_expand_epilogue (int style)
- rtx t;
-
- if (frame.nregs)
-- ix86_emit_restore_regs_using_mov (frame.reg_save_offset, style == 2);
-+ ix86_emit_restore_regs_using_mov (reg_save_offset, style == 2);
-
- /* eh_return epilogues need %ecx added to the stack pointer. */
- if (style == 2)
-@@ -13529,19 +13529,19 @@ ix86_expand_epilogue (int style)
- epilogues. */
- if (!m->fs.sp_valid
- || (TARGET_SEH
-- && (m->fs.sp_offset - frame.reg_save_offset
-+ && (m->fs.sp_offset - reg_save_offset
- >= SEH_MAX_FRAME_SIZE)))
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, hard_frame_pointer_rtx,
- GEN_INT (m->fs.fp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style, false);
- }
-- else if (m->fs.sp_offset != frame.reg_save_offset)
-+ else if (m->fs.sp_offset != reg_save_offset)
- {
- pro_epilogue_adjust_stack (stack_pointer_rtx, stack_pointer_rtx,
- GEN_INT (m->fs.sp_offset
-- - frame.reg_save_offset),
-+ - reg_save_offset),
- style,
- m->fs.cfa_reg == stack_pointer_rtx);
- }
---
-2.16.3
-
diff --git a/community/gcc6/0004-x86-Add-mindirect-branch.patch b/community/gcc6/0004-x86-Add-mindirect-branch.patch
deleted file mode 100644
index db5fe2f48b..0000000000
--- a/community/gcc6/0004-x86-Add-mindirect-branch.patch
+++ /dev/null
@@ -1,2149 +0,0 @@
-From 64da0f4b794672ae14350b09c276422f79f78fc0 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:55 -0800
-Subject: [PATCH 04/13] x86: Add -mindirect-branch=
-
-Add -mindirect-branch= option to convert indirect call and jump to call
-and return thunks. The default is 'keep', which keeps indirect call and
-jump unmodified. 'thunk' converts indirect call and jump to call and
-return thunk. 'thunk-inline' converts indirect call and jump to inlined
-call and return thunk. 'thunk-extern' converts indirect call and jump to
-external call and return thunk provided in a separate object file. You
-can control this behavior for a specific function by using the function
-attribute indirect_branch.
-
-2 kinds of thunks are geneated. Memory thunk where the function address
-is at the top of the stack:
-
-__x86_indirect_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-Indirect jmp via memory, "jmp mem", is converted to
-
- push memory
- jmp __x86_indirect_thunk
-
-Indirect call via memory, "call mem", is converted to
-
- jmp L2
-L1:
- push [mem]
- jmp __x86_indirect_thunk
-L2:
- call L1
-
-Register thunk where the function address is in a register, reg:
-
-__x86_indirect_thunk_reg:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- movq %reg, (%rsp)|movl %reg, (%esp)
- ret
-
-where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
-(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
-
-Indirect jmp via register, "jmp reg", is converted to
-
- jmp __x86_indirect_thunk_reg
-
-Indirect call via register, "call reg", is converted to
-
- call __x86_indirect_thunk_reg
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-opts.h (indirect_branch): New.
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
- * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
- with local indirect jump when converting indirect call and jump.
- (ix86_set_indirect_branch_type): New.
- (ix86_set_current_function): Call ix86_set_indirect_branch_type.
- (indirectlabelno): New.
- (indirect_thunk_needed): Likewise.
- (indirect_thunk_bnd_needed): Likewise.
- (indirect_thunks_used): Likewise.
- (indirect_thunks_bnd_used): Likewise.
- (INDIRECT_LABEL): Likewise.
- (indirect_thunk_name): Likewise.
- (output_indirect_thunk): Likewise.
- (output_indirect_thunk_function): Likewise.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (ix86_output_indirect_branch): Likewise.
- (ix86_output_indirect_jmp): Likewise.
- (ix86_code_end): Call output_indirect_thunk_function if needed.
- (ix86_output_call_insn): Call ix86_output_indirect_branch if
- needed.
- (ix86_handle_fndecl_attribute): Handle indirect_branch.
- (ix86_attribute_table): Add indirect_branch.
- * config/i386/i386.h (machine_function): Add indirect_branch_type
- and has_local_indirect_jump.
- * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
- to true.
- (tablejump): Likewise.
- (*indirect_jump): Use ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_indirect_internal): Likewise.
- * config/i386/i386.opt (mindirect-branch=): New option.
- (indirect_branch): New.
- (keep): Likewise.
- (thunk): Likewise.
- (thunk-inline): Likewise.
- (thunk-extern): Likewise.
- * doc/extend.texi: Document indirect_branch function attribute.
- * doc/invoke.texi: Document -mindirect-branch= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c: New test.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
----
- gcc/config/i386/i386-opts.h | 13 +
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 639 ++++++++++++++++++++-
- gcc/config/i386/i386.h | 7 +
- gcc/config/i386/i386.md | 26 +-
- gcc/config/i386/i386.opt | 20 +
- gcc/doc/extend.texi | 10 +
- gcc/doc/invoke.texi | 13 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 17 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 18 +
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-1.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-3.c | 23 +
- .../gcc.target/i386/indirect-thunk-attr-4.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-5.c | 22 +
- .../gcc.target/i386/indirect-thunk-attr-6.c | 21 +
- .../gcc.target/i386/indirect-thunk-attr-7.c | 44 ++
- .../gcc.target/i386/indirect-thunk-attr-8.c | 42 ++
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 21 +
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 19 +
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-1.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-2.c | 19 +
- .../gcc.target/i386/indirect-thunk-extern-3.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-4.c | 20 +
- .../gcc.target/i386/indirect-thunk-extern-5.c | 16 +
- .../gcc.target/i386/indirect-thunk-extern-6.c | 17 +
- .../gcc.target/i386/indirect-thunk-extern-7.c | 43 ++
- .../gcc.target/i386/indirect-thunk-inline-1.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-2.c | 20 +
- .../gcc.target/i386/indirect-thunk-inline-3.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-4.c | 21 +
- .../gcc.target/i386/indirect-thunk-inline-5.c | 17 +
- .../gcc.target/i386/indirect-thunk-inline-6.c | 18 +
- .../gcc.target/i386/indirect-thunk-inline-7.c | 44 ++
- 41 files changed, 1486 insertions(+), 17 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-
-diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
-index b7f92e3bea1..cc21152875f 100644
---- a/gcc/config/i386/i386-opts.h
-+++ b/gcc/config/i386/i386-opts.h
-@@ -99,4 +99,17 @@ enum stack_protector_guard {
- SSP_GLOBAL /* global canary */
- };
-
-+/* This is used to mitigate variant #2 of the speculative execution
-+ vulnerabilities on x86 processors identified by CVE-2017-5715, aka
-+ Spectre. They convert indirect branches and function returns to
-+ call and return thunks to avoid speculative execution via indirect
-+ call, jmp and ret. */
-+enum indirect_branch {
-+ indirect_branch_unset = 0,
-+ indirect_branch_keep,
-+ indirect_branch_thunk,
-+ indirect_branch_thunk_inline,
-+ indirect_branch_thunk_extern
-+};
-+
- #endif
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index ff47bc15600..eca4cbf0776 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,6 +311,7 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
-+extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 6c98f7581e2..0b9fc4d3026 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -3662,12 +3662,23 @@ make_pass_stv (gcc::context *ctxt)
- return new pass_stv (ctxt);
- }
-
--/* Return true if a red-zone is in use. */
-+/* Return true if a red-zone is in use. We can't use red-zone when
-+ there are local indirect jumps, like "indirect_jump" or "tablejump",
-+ which jumps to another place in the function, since "call" in the
-+ indirect thunk pushes the return address onto stack, destroying
-+ red-zone.
-+
-+ TODO: If we can reserve the first 2 WORDs, for PUSH and, another
-+ for CALL, in red-zone, we can allow local indirect jumps with
-+ indirect thunk. */
-
- bool
- ix86_using_red_zone (void)
- {
-- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
-+ return (TARGET_RED_ZONE
-+ && !TARGET_64BIT_MS_ABI
-+ && (!cfun->machine->has_local_indirect_jump
-+ || cfun->machine->indirect_branch_type == indirect_branch_keep));
- }
-
- /* Return a string that documents the current -m options. The caller is
-@@ -6350,6 +6361,37 @@ ix86_reset_previous_fndecl (void)
- ix86_previous_fndecl = NULL_TREE;
- }
-
-+/* Set the indirect_branch_type field from the function FNDECL. */
-+
-+static void
-+ix86_set_indirect_branch_type (tree fndecl)
-+{
-+ if (cfun->machine->indirect_branch_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("indirect_branch",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+ }
-+}
-+
- /* Establish appropriate back-end context for processing the function
- FNDECL. The argument might be NULL to indicate processing at top
- level, outside of any function scope. */
-@@ -6360,7 +6402,13 @@ ix86_set_current_function (tree fndecl)
- several times in the course of compiling a function, and we don't want to
- slow things down too much or call target_reinit when it isn't safe. */
- if (fndecl == ix86_previous_fndecl)
-- return;
-+ {
-+ /* There may be 2 function bodies for the same function FNDECL,
-+ one is extern inline and one isn't. */
-+ if (fndecl != NULL_TREE)
-+ ix86_set_indirect_branch_type (fndecl);
-+ return;
-+ }
-
- tree old_tree;
- if (ix86_previous_fndecl == NULL_TREE)
-@@ -6377,6 +6425,8 @@ ix86_set_current_function (tree fndecl)
- return;
- }
-
-+ ix86_set_indirect_branch_type (fndecl);
-+
- tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
- if (new_tree == NULL_TREE)
- new_tree = target_option_default_node;
-@@ -10962,6 +11012,220 @@ ix86_setup_frame_addresses (void)
- # endif
- #endif
-
-+/* Label count for call and return thunks. It is used to make unique
-+ labels in call and return thunks. */
-+static int indirectlabelno;
-+
-+/* True if call and return thunk functions are needed. */
-+static bool indirect_thunk_needed = false;
-+/* True if call and return thunk functions with the BND prefix are
-+ needed. */
-+static bool indirect_thunk_bnd_needed = false;
-+
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions. */
-+static int indirect_thunks_used;
-+/* Bit masks of integer registers, which contain branch target, used
-+ by call and return thunks functions with the BND prefix. */
-+static int indirect_thunks_bnd_used;
-+
-+#ifndef INDIRECT_LABEL
-+# define INDIRECT_LABEL "LIND"
-+#endif
-+
-+/* Fills in the label name that should be used for the indirect thunk. */
-+
-+static void
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+{
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ const char *bnd = need_bnd_p ? "_bnd" : "";
-+ if (regno >= 0)
-+ {
-+ const char *reg_prefix;
-+ if (LEGACY_INT_REGNO_P (regno))
-+ reg_prefix = TARGET_64BIT ? "r" : "e";
-+ else
-+ reg_prefix = "";
-+ sprintf (name, "__x86_indirect_thunk%s_%s%s",
-+ bnd, reg_prefix, reg_names[regno]);
-+ }
-+ else
-+ sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ }
-+ else
-+ {
-+ if (regno >= 0)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
-+ }
-+ else
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
-+ }
-+}
-+
-+/* Output a call and return thunk for indirect branch. If BND_P is
-+ true, the BND prefix is needed. If REGNO != -1, the function
-+ address is in REGNO and the call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ mov %REG, (%sp)
-+ ret
-+
-+ Otherwise, the function address is on the top of stack and the
-+ call and return thunk looks like:
-+
-+ call L2
-+ L1:
-+ pause
-+ jmp L1
-+ L2:
-+ lea WORD_SIZE(%sp), %sp
-+ ret
-+ */
-+
-+static void
-+output_indirect_thunk (bool need_bnd_p, int regno)
-+{
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Call */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* Pause + lfence. */
-+ fprintf (asm_out_file, "\tpause\n\tlfence\n");
-+
-+ /* Jump. */
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ if (regno >= 0)
-+ {
-+ /* MOV. */
-+ rtx xops[2];
-+ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
-+ xops[1] = gen_rtx_REG (word_mode, regno);
-+ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
-+ }
-+ else
-+ {
-+ /* LEA. */
-+ rtx xops[2];
-+ xops[0] = stack_pointer_rtx;
-+ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
-+ }
-+
-+ if (need_bnd_p)
-+ fputs ("\tbnd ret\n", asm_out_file);
-+ else
-+ fputs ("\tret\n", asm_out_file);
-+}
-+
-+/* Output a funtion with a call and return thunk for indirect branch.
-+ If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-+ function address is in REGNO. Otherwise, the function address is
-+ on the top of stack. */
-+
-+static void
-+output_indirect_thunk_function (bool need_bnd_p, int regno)
-+{
-+ char name[32];
-+ tree decl;
-+
-+ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-+ indirect_thunk_name (name, regno, need_bnd_p);
-+ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
-+ get_identifier (name),
-+ build_function_type_list (void_type_node, NULL_TREE));
-+ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
-+ NULL_TREE, void_type_node);
-+ TREE_PUBLIC (decl) = 1;
-+ TREE_STATIC (decl) = 1;
-+ DECL_IGNORED_P (decl) = 1;
-+
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ switch_to_section (darwin_sections[picbase_thunk_section]);
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ DECL_WEAK (decl) = 1;
-+ }
-+ else
-+#endif
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
-+
-+ targetm.asm_out.unique_section (decl, 0);
-+ switch_to_section (get_named_section (decl, NULL, 0));
-+
-+ targetm.asm_out.globalize_label (asm_out_file, name);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, name);
-+ putc ('\n', asm_out_file);
-+ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
-+ }
-+ else
-+ {
-+ switch_to_section (text_section);
-+ ASM_OUTPUT_LABEL (asm_out_file, name);
-+ }
-+
-+ DECL_INITIAL (decl) = make_node (BLOCK);
-+ current_function_decl = decl;
-+ allocate_struct_function (decl, false);
-+ init_function_start (decl);
-+ /* We're about to hide the function body from callees of final_* by
-+ emitting it directly; tell them we're a thunk, if they care. */
-+ cfun->is_thunk = true;
-+ first_function_block_is_cold = false;
-+ /* Make sure unwind info is emitted for the thunk if needed. */
-+ final_start_function (emit_barrier (), asm_out_file, 1);
-+
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ final_end_function ();
-+ init_insn_lengths ();
-+ free_after_compilation (cfun);
-+ set_cfun (NULL);
-+ current_function_decl = NULL;
-+}
-+
- static int pic_labels_used;
-
- /* Fills in the label name that should be used for a pc thunk for
-@@ -10988,11 +11252,32 @@ ix86_code_end (void)
- rtx xops[2];
- int regno;
-
-+ if (indirect_thunk_needed)
-+ output_indirect_thunk_function (false, -1);
-+ if (indirect_thunk_bnd_needed)
-+ output_indirect_thunk_function (true, -1);
-+
-+ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
-+ {
-+ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ if ((indirect_thunks_used & (1 << i)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << i)))
-+ output_indirect_thunk_function (true, regno);
-+ }
-+
- for (regno = AX_REG; regno <= SP_REG; regno++)
- {
- char name[32];
- tree decl;
-
-+ if ((indirect_thunks_used & (1 << regno)))
-+ output_indirect_thunk_function (false, regno);
-+
-+ if ((indirect_thunks_bnd_used & (1 << regno)))
-+ output_indirect_thunk_function (true, regno);
-+
- if (!(pic_labels_used & (1 << regno)))
- continue;
-
-@@ -27369,12 +27654,292 @@ ix86_nopic_noplt_attribute_p (rtx call_op)
- return false;
- }
-
-+/* Output indirect branch via a call and return thunk. CALL_OP is a
-+ register which contains the branch target. XASM is the assembly
-+ template for CALL_OP. Branch is a tail call if SIBCALL_P is true.
-+ A normal call is converted to:
-+
-+ call __x86_indirect_thunk_reg
-+
-+ and a tail call is converted to:
-+
-+ jmp __x86_indirect_thunk_reg
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = REGNO (call_op);
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ int i = regno;
-+ if (i >= FIRST_REX_INT_REG)
-+ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
-+ if (need_bnd_p)
-+ indirect_thunks_bnd_used |= 1 << i;
-+ else
-+ indirect_thunks_used |= 1 << i;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ if (sibcall_p)
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
-+ return;
-+ }
-+
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. A normal call is
-+ converted to:
-+
-+ jmp L2
-+ L1:
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ L2:
-+ call L1
-+
-+ and a tail call is converted to:
-+
-+ push CALL_OP
-+ jmp __x86_indirect_thunk
-+ */
-+
-+static void
-+ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ char thunk_name_buf[32];
-+ char *thunk_name;
-+ char push_buf[64];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ int regno = -1;
-+
-+ if (cfun->machine->indirect_branch_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
-+ {
-+ if (need_bnd_p)
-+ indirect_thunk_bnd_needed = true;
-+ else
-+ indirect_thunk_needed = true;
-+ }
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ thunk_name = thunk_name_buf;
-+ }
-+ else
-+ thunk_name = NULL;
-+
-+ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
-+ TARGET_64BIT ? 'q' : 'l', xasm);
-+
-+ if (sibcall_p)
-+ {
-+ output_asm_insn (push_buf, &call_op);
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+ }
-+ else
-+ {
-+ char indirectlabel1[32];
-+ char indirectlabel2[32];
-+
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
-+ INDIRECT_LABEL,
-+ indirectlabelno++);
-+
-+ /* Jump. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd jmp\t", asm_out_file);
-+ else
-+ fputs ("\tjmp\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel2);
-+ fputc ('\n', asm_out_file);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
-+
-+ /* An external function may be called via GOT, instead of PLT. */
-+ if (MEM_P (call_op))
-+ {
-+ struct ix86_address parts;
-+ rtx addr = XEXP (call_op, 0);
-+ if (ix86_decompose_address (addr, &parts)
-+ && parts.base == stack_pointer_rtx)
-+ {
-+ /* Since call will adjust stack by -UNITS_PER_WORD,
-+ we must convert "disp(stack, index, scale)" to
-+ "disp+UNITS_PER_WORD(stack, index, scale)". */
-+ if (parts.index)
-+ {
-+ addr = gen_rtx_MULT (Pmode, parts.index,
-+ GEN_INT (parts.scale));
-+ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
-+ addr);
-+ }
-+ else
-+ addr = stack_pointer_rtx;
-+
-+ rtx disp;
-+ if (parts.disp != NULL_RTX)
-+ disp = plus_constant (Pmode, parts.disp,
-+ UNITS_PER_WORD);
-+ else
-+ disp = GEN_INT (UNITS_PER_WORD);
-+
-+ addr = gen_rtx_PLUS (Pmode, addr, disp);
-+ call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
-+ }
-+ }
-+
-+ output_asm_insn (push_buf, &call_op);
-+
-+ if (thunk_name != NULL)
-+ {
-+ if (need_bnd_p)
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ else
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-+
-+ /* Call. */
-+ if (need_bnd_p)
-+ fputs ("\tbnd call\t", asm_out_file);
-+ else
-+ fputs ("\tcall\t", asm_out_file);
-+ assemble_name_raw (asm_out_file, indirectlabel1);
-+ fputc ('\n', asm_out_file);
-+ }
-+}
-+
-+/* Output indirect branch via a call and return thunk. CALL_OP is
-+ the branch target. XASM is the assembly template for CALL_OP.
-+ Branch is a tail call if SIBCALL_P is true. */
-+
-+static void
-+ix86_output_indirect_branch (rtx call_op, const char *xasm,
-+ bool sibcall_p)
-+{
-+ if (REG_P (call_op))
-+ ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
-+ else
-+ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
-+}
-+/* Output indirect jump. CALL_OP is the jump target. Jump is a
-+ function return if RET_P is true. */
-+
-+const char *
-+ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+{
-+ if (cfun->machine->indirect_branch_type != indirect_branch_keep)
-+ {
-+ /* We can't have red-zone if this isn't a function return since
-+ "call" in the indirect thunk pushes the return address onto
-+ stack, destroying red-zone. */
-+ if (!ret_p && ix86_red_zone_size != 0)
-+ gcc_unreachable ();
-+
-+ ix86_output_indirect_branch (call_op, "%0", true);
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
- ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- {
- bool direct_p = constant_call_address_operand (call_op, VOIDmode);
-+ bool output_indirect_p
-+ = (!TARGET_SEH
-+ && cfun->machine->indirect_branch_type != indirect_branch_keep);
- bool seh_nop_p = false;
- const char *xasm;
-
-@@ -27383,7 +27948,13 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!jmp\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!jmp\t%P0";
- }
-@@ -27392,9 +27963,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- else if (TARGET_SEH)
- xasm = "%!rex.W jmp\t%A0";
- else
-- xasm = "%!jmp\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!jmp\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, true);
-+ else
-+ output_asm_insn (xasm, &call_op);
- return "";
- }
-
-@@ -27431,14 +28010,28 @@ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
- if (direct_p)
- {
- if (ix86_nopic_noplt_attribute_p (call_op))
-- xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ {
-+ direct_p = false;
-+ if (output_indirect_p)
-+ xasm = "{%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ else
-+ xasm = "%!call\t{*%p0@GOTPCREL(%%rip)|[QWORD PTR %p0@GOTPCREL[rip]]}";
-+ }
- else
- xasm = "%!call\t%P0";
- }
- else
-- xasm = "%!call\t%A0";
-+ {
-+ if (output_indirect_p)
-+ xasm = "%0";
-+ else
-+ xasm = "%!call\t%A0";
-+ }
-
-- output_asm_insn (xasm, &call_op);
-+ if (output_indirect_p && !direct_p)
-+ ix86_output_indirect_branch (call_op, xasm, false);
-+ else
-+ output_asm_insn (xasm, &call_op);
-
- if (seh_nop_p)
- return "nop";
-@@ -44836,7 +45429,7 @@ ix86_handle_struct_attribute (tree *node, tree name, tree, int,
- }
-
- static tree
--ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
-+ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- bool *no_add_attrs)
- {
- if (TREE_CODE (*node) != FUNCTION_DECL)
-@@ -44845,6 +45438,29 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
- name);
- *no_add_attrs = true;
- }
-+
-+ if (is_attribute_p ("indirect_branch", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49072,6 +49688,9 @@ static const struct attribute_spec ix86_attribute_table[] =
- false },
- { "callee_pop_aggregate_return", 1, 1, false, true, true,
- ix86_handle_callee_pop_aggregate_return, true },
-+ { "indirect_branch", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-+
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
- };
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 54144166172..9dccdb0351e 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2572,6 +2572,13 @@ struct GTY(()) machine_function {
- /* If true, it is safe to not save/restore DRAP register. */
- BOOL_BITFIELD no_drap_save_restore : 1;
-
-+ /* How to generate indirec branch. */
-+ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
-+
-+ /* If true, the current function has local indirect jumps, like
-+ "indirect_jump" or "tablejump". */
-+ BOOL_BITFIELD has_local_indirect_jump : 1;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index d2bfe314f71..153e1622b2d 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11807,13 +11807,18 @@
- {
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -11856,14 +11861,19 @@
-
- if (TARGET_X32)
- operands[0] = convert_memory_address (word_mode, operands[0]);
-+ cfun->machine->has_local_indirect_jump = true;
- })
-
- (define_insn "*tablejump_1"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], false);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-@@ -12520,8 +12530,12 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "%!jmp\t%A0"
-- [(set_attr "type" "ibr")
-+ "* return ix86_output_indirect_jmp (operands[0], true);"
-+ [(set (attr "type")
-+ (if_then_else (match_test "(cfun->machine->indirect_branch_type
-+ != indirect_branch_keep)")
-+ (const_string "multi")
-+ (const_string "ibr")))
- (set_attr "length_immediate" "0")
- (set_attr "maybe_prefix_bnd" "1")])
-
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index f304b621e6a..5ffa3349a30 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -897,3 +897,23 @@ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
- mmitigate-rop
- Target Var(flag_mitigate_rop) Init(0)
- Attempt to avoid generating instruction sequences containing ret bytes.
-+
-+mindirect-branch=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
-+Convert indirect call and jump to call and return thunks.
-+
-+Enum
-+Name(indirect_branch) Type(enum indirect_branch)
-+Known indirect branch choices (for use with the -mindirect-branch= option):
-+
-+EnumValue
-+Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-+
-+EnumValue
-+Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8cc4f7e1f6a..8668dae9e99 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5419,6 +5419,16 @@ Specify which floating-point unit to use. You must specify the
- @code{target("fpmath=sse,387")} option as
- @code{target("fpmath=sse+387")} because the comma would separate
- different options.
-+
-+@item indirect_branch("@var{choice}")
-+@cindex @code{indirect_branch} function attribute, x86
-+On x86 targets, the @code{indirect_branch} attribute causes the compiler
-+to convert indirect call and jump with @var{choice}. @samp{keep}
-+keeps indirect call and jump unmodified. @samp{thunk} converts indirect
-+call and jump to call and return thunk. @samp{thunk-inline} converts
-+indirect call and jump to inlined call and return thunk.
-+@samp{thunk-extern} converts indirect call and jump to external call
-+and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 1d3a824d7b8..6f60339a56a 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,7 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop}
-+-mmitigate-rop -mindirect-branch=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24230,6 +24230,17 @@ opcodes, to mitigate against certain forms of attack. At the moment,
- this option is limited in what it can do and should not be relied
- on to provide serious protection.
-
-+@item -mindirect-branch=@var{choice}
-+@opindex -mindirect-branch
-+Convert indirect call and jump with @var{choice}. The default is
-+@samp{keep}, which keeps indirect call and jump unmodified.
-+@samp{thunk} converts indirect call and jump to call and return thunk.
-+@samp{thunk-inline} converts indirect call and jump to inlined call
-+and return thunk. @samp{thunk-extern} converts indirect call and jump
-+to external call and return thunk provided in a separate object file.
-+You can control this behavior for a specific function by using the
-+function attribute @code{indirect_branch}. @xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-new file mode 100644
-index 00000000000..d983e1c3e26
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-new file mode 100644
-index 00000000000..58f09b42d8a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-new file mode 100644
-index 00000000000..f20d35c19b6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-new file mode 100644
-index 00000000000..0eff8fb658a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-new file mode 100644
-index 00000000000..a25b20dd808
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-new file mode 100644
-index 00000000000..cff114a6c29
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-new file mode 100644
-index 00000000000..afdb6007986
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-new file mode 100644
-index 00000000000..d64d978b699
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+extern void male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk")));
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-new file mode 100644
-index 00000000000..93067454d3d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-new file mode 100644
-index 00000000000..97744d65729
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-inline")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-new file mode 100644
-index 00000000000..bfce3ea5cb2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-new file mode 100644
-index 00000000000..0833606046b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+extern int male_indirect_jump (long)
-+ __attribute__ ((indirect_branch("thunk-extern")));
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-new file mode 100644
-index 00000000000..2eba0fbd9b2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-new file mode 100644
-index 00000000000..f58427eae11
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-new file mode 100644
-index 00000000000..564ed39547c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -0,0 +1,42 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+__attribute__ ((indirect_branch("keep")))
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-new file mode 100644
-index 00000000000..50fbee20a5a
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ dispatch (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-new file mode 100644
-index 00000000000..2976e67adce
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile { target { ! x32 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+void (*dispatch) (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ dispatch (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-new file mode 100644
-index 00000000000..da4bc98ef23
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+void
-+foo (void)
-+{
-+ bar (buf);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-new file mode 100644
-index 00000000000..c64d12ef989
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+
-+void bar (char *);
-+char buf[10];
-+
-+int
-+foo (void)
-+{
-+ bar (buf);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "bnd ret" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-new file mode 100644
-index 00000000000..49f27b49465
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-new file mode 100644
-index 00000000000..a1e3eb6fc74
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-new file mode 100644
-index 00000000000..395634e7e5c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-new file mode 100644
-index 00000000000..fd3f63379a1
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-new file mode 100644
-index 00000000000..ba2f92b6f34
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -0,0 +1,16 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-new file mode 100644
-index 00000000000..0c5a2d472c6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-new file mode 100644
-index 00000000000..665252327aa
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -0,0 +1,43 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-new file mode 100644
-index 00000000000..68c0ff713b3
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-new file mode 100644
-index 00000000000..e2da1fcb683
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-new file mode 100644
-index 00000000000..244fec708d6
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-new file mode 100644
-index 00000000000..107ebe32f54
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -0,0 +1,21 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch[256];
-+
-+int
-+male_indirect_jump (long offset)
-+{
-+ dispatch[offset](offset);
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-new file mode 100644
-index 00000000000..17b04ef2229
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -0,0 +1,17 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+void
-+foo (void)
-+{
-+ bar ();
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-new file mode 100644
-index 00000000000..d9eb11285aa
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile { target *-*-linux* } } */
-+/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+
-+extern void bar (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-new file mode 100644
-index 00000000000..d02b1dcb1b9
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -0,0 +1,44 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+void func0 (void);
-+void func1 (void);
-+void func2 (void);
-+void func3 (void);
-+void func4 (void);
-+void func4 (void);
-+void func5 (void);
-+
-+void
-+bar (int i)
-+{
-+ switch (i)
-+ {
-+ default:
-+ func0 ();
-+ break;
-+ case 1:
-+ func1 ();
-+ break;
-+ case 2:
-+ func2 ();
-+ break;
-+ case 3:
-+ func3 ();
-+ break;
-+ case 4:
-+ func4 ();
-+ break;
-+ case 5:
-+ func5 ();
-+ break;
-+ }
-+}
-+
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
---
-2.16.3
-
diff --git a/community/gcc6/0005-x86-Add-mfunction-return.patch b/community/gcc6/0005-x86-Add-mfunction-return.patch
deleted file mode 100644
index f311d06780..0000000000
--- a/community/gcc6/0005-x86-Add-mfunction-return.patch
+++ /dev/null
@@ -1,1565 +0,0 @@
-From 3b946bffc536481a484d9a2b98b829f3d71b5519 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 05/13] x86: Add -mfunction-return=
-
-Add -mfunction-return= option to convert function return to call and
-return thunks. The default is 'keep', which keeps function return
-unmodified. 'thunk' converts function return to call and return thunk.
-'thunk-inline' converts function return to inlined call and return thunk.
-'thunk-extern' converts function return to external call and return
-thunk provided in a separate object file. You can control this behavior
-for a specific function by using the function attribute function_return.
-
-Function return thunk is the same as memory thunk for -mindirect-branch=
-where the return address is at the top of the stack:
-
-__x86_return_thunk:
- call L2
-L1:
- pause
- lfence
- jmp L1
-L2:
- lea 8(%rsp), %rsp|lea 4(%esp), %esp
- ret
-
-and function return becomes
-
- jmp __x86_return_thunk
-
--mindirect-branch= tests are updated with -mfunction-return=keep to
-avoid false test failures when -mfunction-return=thunk is added to
-RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386-protos.h (ix86_output_function_return): New.
- * config/i386/i386.c (ix86_set_indirect_branch_type): Also
- set function_return_type.
- (indirect_thunk_name): Add ret_p to indicate thunk for function
- return.
- (output_indirect_thunk_function): Pass false to
- indirect_thunk_name.
- (ix86_output_indirect_branch_via_reg): Likewise.
- (ix86_output_indirect_branch_via_push): Likewise.
- (output_indirect_thunk_function): Create alias for function
- return thunk if regno < 0.
- (ix86_output_function_return): New function.
- (ix86_handle_fndecl_attribute): Handle function_return.
- (ix86_attribute_table): Add function_return.
- * config/i386/i386.h (machine_function): Add
- function_return_type.
- * config/i386/i386.md (simple_return_internal): Use
- ix86_output_function_return.
- (simple_return_internal_long): Likewise.
- * config/i386/i386.opt (mfunction-return=): New option.
- (indirect_branch): Mention -mfunction-return=.
- * doc/extend.texi: Document function_return function attribute.
- * doc/invoke.texi: Document -mfunction-return= option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mfunction-return=keep.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-1.c: New test.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-16.c: Likewise.
- * gcc.target/i386/ret-thunk-2.c: Likewise.
- * gcc.target/i386/ret-thunk-3.c: Likewise.
- * gcc.target/i386/ret-thunk-4.c: Likewise.
- * gcc.target/i386/ret-thunk-5.c: Likewise.
- * gcc.target/i386/ret-thunk-6.c: Likewise.
- * gcc.target/i386/ret-thunk-7.c: Likewise.
- * gcc.target/i386/ret-thunk-8.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
-
-i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
-
-ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
-generate the __x86_return_thunk label, instead of the set directive.
-Update testcase to remove the __x86_return_thunk label check. Since
--fno-pic is ignored on Darwin, update testcases to sscan or "push"
-only on Linux.
-
-gcc/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * config/i386/i386.c (output_indirect_thunk_function): Use
- ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
- for __x86.return_thunk.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/83839
- * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
- Linux.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Don't check the
- __x86_return_thunk label.
- Scan for "push" only for Linux.
----
- gcc/config/i386/i386-protos.h | 1 +
- gcc/config/i386/i386.c | 152 +++++++++++++++++++--
- gcc/config/i386/i386.h | 3 +
- gcc/config/i386/i386.md | 9 +-
- gcc/config/i386/i386.opt | 6 +-
- gcc/doc/extend.texi | 9 ++
- gcc/doc/invoke.texi | 14 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-attr-8.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 4 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +++
- gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 ++
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 ++++
- 56 files changed, 516 insertions(+), 74 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index eca4cbf0776..620d70ef9f6 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -312,6 +312,7 @@ extern enum attr_cpu ix86_schedule;
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
- extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_function_return (bool long_p);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 0b9fc4d3026..34e26a3a3c7 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6390,6 +6390,31 @@ ix86_set_indirect_branch_type (tree fndecl)
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
- }
-+
-+ if (cfun->machine->function_return_type == indirect_branch_unset)
-+ {
-+ tree attr = lookup_attribute ("function_return",
-+ DECL_ATTRIBUTES (fndecl));
-+ if (attr != NULL)
-+ {
-+ tree args = TREE_VALUE (attr);
-+ if (args == NULL)
-+ gcc_unreachable ();
-+ tree cst = TREE_VALUE (args);
-+ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
-+ cfun->machine->function_return_type = indirect_branch_keep;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_inline;
-+ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
-+ cfun->machine->function_return_type = indirect_branch_thunk_extern;
-+ else
-+ gcc_unreachable ();
-+ }
-+ else
-+ cfun->machine->function_return_type = ix86_function_return;
-+ }
- }
-
- /* Establish appropriate back-end context for processing the function
-@@ -11036,8 +11061,12 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
-+indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-+ bool ret_p)
- {
-+ if (regno >= 0 && ret_p)
-+ gcc_unreachable ();
-+
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-@@ -11052,7 +11081,10 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- bnd, reg_prefix, reg_names[regno]);
- }
- else
-- sprintf (name, "__x86_indirect_thunk%s", bnd);
-+ {
-+ const char *ret = ret_p ? "return" : "indirect";
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-+ }
- }
- else
- {
-@@ -11065,10 +11097,20 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
- }
- else
- {
-- if (need_bnd_p)
-- ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ if (ret_p)
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
-+ }
- else
-- ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ {
-+ if (need_bnd_p)
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
-+ else
-+ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
-+ }
- }
- }
- }
-@@ -11163,7 +11205,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- tree decl;
-
- /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-- indirect_thunk_name (name, regno, need_bnd_p);
-+ indirect_thunk_name (name, regno, need_bnd_p, false);
- decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
- get_identifier (name),
- build_function_type_list (void_type_node, NULL_TREE));
-@@ -11206,6 +11248,36 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ if (regno < 0)
-+ {
-+ /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
-+ char alias[32];
-+
-+ indirect_thunk_name (alias, regno, need_bnd_p, true);
-+#if TARGET_MACHO
-+ if (TARGET_MACHO)
-+ {
-+ fputs ("\t.weak_definition\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ fputs ("\n\t.private_extern\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ ASM_OUTPUT_LABEL (asm_out_file, alias);
-+ }
-+#else
-+ ASM_OUTPUT_DEF (asm_out_file, alias, name);
-+ if (USE_HIDDEN_LINKONCE)
-+ {
-+ fputs ("\t.globl\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ fputs ("\t.hidden\t", asm_out_file);
-+ assemble_name (asm_out_file, alias);
-+ putc ('\n', asm_out_file);
-+ }
-+#endif
-+ }
-+
- DECL_INITIAL (decl) = make_node (BLOCK);
- current_function_decl = decl;
- allocate_struct_function (decl, false);
-@@ -27687,7 +27759,7 @@ ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
- else
- indirect_thunks_used |= 1 << i;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27796,7 +27868,7 @@ ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
- else
- indirect_thunk_needed = true;
- }
-- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
-+ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
- thunk_name = thunk_name_buf;
- }
- else
-@@ -27931,6 +28003,46 @@ ix86_output_indirect_jmp (rtx call_op, bool ret_p)
- return "%!jmp\t%A0";
- }
-
-+/* Output function return. CALL_OP is the jump target. Add a REP
-+ prefix to RET if LONG_P is true and function return is kept. */
-+
-+const char *
-+ix86_output_function_return (bool long_p)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ indirect_thunk_bnd_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ indirect_thunk_needed |= need_thunk;
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, -1);
-+
-+ return "";
-+ }
-+
-+ if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
-+ return "%!ret";
-+
-+ return "rep%; ret";
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-@@ -45461,6 +45573,28 @@ ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
- }
- }
-
-+ if (is_attribute_p ("function_return", name))
-+ {
-+ tree cst = TREE_VALUE (args);
-+ if (TREE_CODE (cst) != STRING_CST)
-+ {
-+ warning (OPT_Wattributes,
-+ "%qE attribute requires a string constant argument",
-+ name);
-+ *no_add_attrs = true;
-+ }
-+ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
-+ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
-+ {
-+ warning (OPT_Wattributes,
-+ "argument to %qE attribute is not "
-+ "(keep|thunk|thunk-inline|thunk-extern)", name);
-+ *no_add_attrs = true;
-+ }
-+ }
-+
- return NULL_TREE;
- }
-
-@@ -49690,6 +49824,8 @@ static const struct attribute_spec ix86_attribute_table[] =
- ix86_handle_callee_pop_aggregate_return, true },
- { "indirect_branch", 1, 1, true, false, false,
- ix86_handle_fndecl_attribute, false },
-+ { "function_return", 1, 1, true, false, false,
-+ ix86_handle_fndecl_attribute, false },
-
- /* End element. */
- { NULL, 0, 0, false, false, false, NULL, false }
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index 9dccdb0351e..b34bc117c34 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2579,6 +2579,9 @@ struct GTY(()) machine_function {
- "indirect_jump" or "tablejump". */
- BOOL_BITFIELD has_local_indirect_jump : 1;
-
-+ /* How to generate function return. */
-+ ENUM_BITFIELD(indirect_branch) function_return_type : 3;
-+
- /* If true, there is register available for argument passing. This
- is used only in ix86_function_ok_for_sibcall by 32-bit to determine
- if there is scratch register available for indirect sibcall. In
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 153e1622b2d..2da671e9f2d 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -12489,7 +12489,7 @@
- (define_insn "simple_return_internal"
- [(simple_return)]
- "reload_completed"
-- "%!ret"
-+ "* return ix86_output_function_return (false);"
- [(set_attr "length" "1")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-@@ -12503,12 +12503,7 @@
- [(simple_return)
- (unspec [(const_int 0)] UNSPEC_REP)]
- "reload_completed"
--{
-- if (ix86_bnd_prefixed_insn_p (insn))
-- return "%!ret";
--
-- return "rep%; ret";
--}
-+ "* return ix86_output_function_return (true);"
- [(set_attr "length" "2")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "0")
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index 5ffa3349a30..ad5916fb643 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -902,9 +902,13 @@ mindirect-branch=
- Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
- Convert indirect call and jump to call and return thunks.
-
-+mfunction-return=
-+Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
-+Convert function return to call and return thunk.
-+
- Enum
- Name(indirect_branch) Type(enum indirect_branch)
--Known indirect branch choices (for use with the -mindirect-branch= option):
-+Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
-
- EnumValue
- Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 8668dae9e99..2cb6bd1ef3e 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -5429,6 +5429,15 @@ call and jump to call and return thunk. @samp{thunk-inline} converts
- indirect call and jump to inlined call and return thunk.
- @samp{thunk-extern} converts indirect call and jump to external call
- and return thunk provided in a separate object file.
-+
-+@item function_return("@var{choice}")
-+@cindex @code{function_return} function attribute, x86
-+On x86 targets, the @code{function_return} attribute causes the compiler
-+to convert function return with @var{choice}. @samp{keep} keeps function
-+return unmodified. @samp{thunk} converts function return to call and
-+return thunk. @samp{thunk-inline} converts function return to inlined
-+call and return thunk. @samp{thunk-extern} converts function return to
-+external call and return thunk provided in a separate object file.
- @end table
-
- On the x86, the inliner does not inline a
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 6f60339a56a..337a761015a 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1169,7 +1169,8 @@ See RS/6000 and PowerPC Options.
- -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
---mmitigate-rop -mindirect-branch=@var{choice}}
-+-mmitigate-rop -mindirect-branch=@var{choice} @gol
-+-mfunction-return=@var{choice}}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24241,6 +24242,17 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+@item -mfunction-return=@var{choice}
-+@opindex -mfunction-return
-+Convert function return with @var{choice}. The default is @samp{keep},
-+which keeps function return unmodified. @samp{thunk} converts function
-+return to call and return thunk. @samp{thunk-inline} converts function
-+return to inlined call and return thunk. @samp{thunk-extern} converts
-+function return to external call and return thunk provided in a separate
-+object file. You can control this behavior for a specific function by
-+using the function attribute @code{function_return}.
-+@xref{Function Attributes}.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index d983e1c3e26..e365ef5698a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 58f09b42d8a..05a51ad9157 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index f20d35c19b6..3c0d4c39f0b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 0eff8fb658a..14d4ef6dd98 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index a25b20dd808..b4836c38d6c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index cff114a6c29..1f06bd1af74 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index afdb6007986..bc6b47a636e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index d64d978b699..2257be3affa 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index 93067454d3d..e9cfdc5879e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 97744d65729..f938db050f7 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index bfce3ea5cb2..4e58599692a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 0833606046b..b8d50249d8b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 2eba0fbd9b2..455adabfe0e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index f58427eae11..4595b841ec0 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -36,7 +36,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-index 564ed39547c..d730d31bda1 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 50fbee20a5a..5e3e118e9bd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -10,7 +10,7 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2976e67adce..2801aa4192e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-@@ -11,7 +11,7 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
- /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index da4bc98ef23..70b4fb36eea 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index c64d12ef989..3baf03ee77c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 49f27b49465..edeb264218c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index a1e3eb6fc74..1d00413a76a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 395634e7e5c..06ebf1c9063 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index fd3f63379a1..1c8f9446636 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index ba2f92b6f34..21740ac5b7f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 0c5a2d472c6..a77c1f470b8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 665252327aa..86e9fd1f1e4 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 68c0ff713b3..3ecde878867 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index e2da1fcb683..df32a19a2b5 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 244fec708d6..9540996de01 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index 107ebe32f54..f3db6e2441f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 17b04ef2229..0f687c3b027 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index d9eb11285aa..b27c6fc96a2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index d02b1dcb1b9..764a375fc37 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-@@ -35,7 +35,7 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-1.c b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-new file mode 100644
-index 00000000000..7223f67ba5e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-new file mode 100644
-index 00000000000..3a6727b5c54
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-new file mode 100644
-index 00000000000..b8f68188313
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -0,0 +1,23 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-new file mode 100644
-index 00000000000..01b0a02f80b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-new file mode 100644
-index 00000000000..4b497b5f8af
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+
-+extern void (*bar) (void);
-+extern int foo (void) __attribute__ ((function_return("thunk")));
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-new file mode 100644
-index 00000000000..4ae4c44a3fd
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-inline")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-new file mode 100644
-index 00000000000..5b5bc765a7e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-16.c b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-new file mode 100644
-index 00000000000..a16cad16aaa
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
-@@ -0,0 +1,18 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+__attribute__ ((function_return("keep"), indirect_branch("keep")))
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-2.c b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-new file mode 100644
-index 00000000000..c6659e3ad09
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-3.c b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-new file mode 100644
-index 00000000000..0f7f388f459
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-4.c b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-new file mode 100644
-index 00000000000..9ae37e835a0
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-5.c b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-new file mode 100644
-index 00000000000..4bd0d2a27bc
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
-@@ -0,0 +1,15 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+extern void foo (void) __attribute__ ((function_return("thunk")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-6.c b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-new file mode 100644
-index 00000000000..053841f6f7d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-7.c b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-new file mode 100644
-index 00000000000..262e6780112
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=keep" } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-8.c b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-new file mode 100644
-index 00000000000..c1658e96673
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
-@@ -0,0 +1,14 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+extern void foo (void) __attribute__ ((function_return("keep")));
-+
-+void
-+foo (void)
-+{
-+}
-+
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-new file mode 100644
-index 00000000000..fa24a1f7365
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -0,0 +1,24 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+
-+extern void (*bar) (void);
-+
-+int
-+foo (void)
-+{
-+ bar ();
-+ return 0;
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
-+/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
---
-2.16.3
-
diff --git a/community/gcc6/0006-x86-Add-mindirect-branch-register.patch b/community/gcc6/0006-x86-Add-mindirect-branch-register.patch
deleted file mode 100644
index 111e6e43d4..0000000000
--- a/community/gcc6/0006-x86-Add-mindirect-branch-register.patch
+++ /dev/null
@@ -1,941 +0,0 @@
-From 61bb7f0e152ce5be700a44007d036ea0de4b254d Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 06/13] x86: Add -mindirect-branch-register
-
-Add -mindirect-branch-register to force indirect branch via register.
-This is implemented by disabling patterns of indirect branch via memory,
-similar to TARGET_X32.
-
--mindirect-branch= and -mfunction-return= tests are updated with
--mno-indirect-branch-register to avoid false test failures when
--mindirect-branch-register is added to RUNTESTFLAGS for "make check".
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Disallow memory operand for
- -mindirect-branch-register.
- (Bw): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.md (indirect_jump): Call convert_memory_address
- for -mindirect-branch-register.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Disallow peepholes of indirect call and jump via memory for
- -mindirect-branch-register.
- (*call_pop): Replace m with Bw.
- (*call_value_pop): Likewise.
- (*sibcall_pop_memory): Replace m with Bs.
- * config/i386/i386.opt (mindirect-branch-register): New option.
- * doc/invoke.texi: Document -mindirect-branch-register option.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
- -mno-indirect-branch-register.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-1.c: New test.
- * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
-
-i386: Rename to ix86_indirect_branch_register
-
-Rename the variable for -mindirect-branch-register to
-ix86_indirect_branch_register to match the command-line option name.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_thunk_register with
- ix86_indirect_branch_register.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- * config/i386/i386.opt: Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
-
-x86: Rewrite ix86_indirect_branch_register logic
-
-Rewrite ix86_indirect_branch_register logic with
-
-(and (not (match_test "ix86_indirect_branch_register"))
- (original condition before r256662))
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (constant_call_address_operand):
- Rewrite ix86_indirect_branch_register logic.
- (sibcall_insn_operand): Likewise.
-
-Don't check ix86_indirect_branch_register for GOT operand
-
-Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
-matches, don't check ix86_indirect_branch_register here. If needed,
--mindirect-branch= will convert indirect branch via GOT slot to a call
-and return thunk.
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/constraints.md (Bs): Update
- ix86_indirect_branch_register check. Don't check
- ix86_indirect_branch_register with GOT_memory_operand.
- (Bw): Likewise.
- * config/i386/predicates.md (GOT_memory_operand): Don't check
- ix86_indirect_branch_register here.
- (GOT32_symbol_operand): Likewise.
-
-i386: Rewrite indirect_branch_operand logic
-
- Backport from mainline
- 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/predicates.md (indirect_branch_operand): Rewrite
- ix86_indirect_branch_register logic.
----
- gcc/config/i386/constraints.md | 6 ++--
- gcc/config/i386/i386.md | 34 ++++++++++++++--------
- gcc/config/i386/i386.opt | 4 +++
- gcc/config/i386/predicates.md | 21 +++++++------
- gcc/doc/invoke.texi | 6 +++-
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 2 +-
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-attr-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-extern-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 2 +-
- .../gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++++++++++
- .../gcc.target/i386/indirect-thunk-register-2.c | 20 +++++++++++++
- .../gcc.target/i386/indirect-thunk-register-3.c | 19 ++++++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2 +-
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2 +-
- 47 files changed, 147 insertions(+), 63 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 1a4c701ad13..9204c8e8487 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,14 +172,16 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "TARGET_X32"))
-+ (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
- (match_operand 0 "GOT_memory_operand"))))
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 2da671e9f2d..05a88fff356 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32)
-+ if (TARGET_X32 || ix86_indirect_branch_register)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12048,7 +12048,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12057,7 +12057,9 @@
- (match_operand:W 1 "memory_operand"))
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(call (mem:QI (match_dup 1))
-@@ -12070,7 +12072,9 @@
- (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12092,7 +12096,7 @@
- })
-
- (define_insn "*call_pop"
-- [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
-+ [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12112,7 +12116,7 @@
- [(set_attr "type" "call")])
-
- (define_insn "*sibcall_pop_memory"
-- [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
-+ [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
- (match_operand 1))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-@@ -12166,7 +12170,9 @@
- [(set (match_operand:W 0 "register_operand")
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
-- "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
- ;; Call subroutine, returning value in operand 0
-@@ -12244,7 +12250,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32"
-+ "!TARGET_X32 && !ix86_indirect_branch_register"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12254,7 +12260,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
- [(parallel [(set (match_dup 2)
-@@ -12269,7 +12277,9 @@
- (set (match_operand 2)
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
-- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
-+ "!TARGET_X32
-+ && !ix86_indirect_branch_register
-+ && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
- [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
-@@ -12294,7 +12304,7 @@
-
- (define_insn "*call_value_pop"
- [(set (match_operand 0)
-- (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
-+ (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
- (match_operand 2)))
- (set (reg:SI SP_REG)
- (plus:SI (reg:SI SP_REG)
-diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
-index ad5916fb643..a97f84f68f2 100644
---- a/gcc/config/i386/i386.opt
-+++ b/gcc/config/i386/i386.opt
-@@ -921,3 +921,7 @@ Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
-
- EnumValue
- Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
-+
-+mindirect-branch-register
-+Target Report Var(ix86_indirect_branch_register) Init(0)
-+Force indirect call and jump via register.
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index 93dda7bb0e7..d1f0a7dbf61 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,8 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "TARGET_X32"))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
- ;; Return true if OP is a memory operands that can be used in sibcalls.
-@@ -636,20 +637,22 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Similarly, but for tail calls, in which we cannot allow memory references.
- (define_special_predicate "sibcall_insn_operand"
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (ior (and (not (match_test "TARGET_X32"))
-- (match_operand 0 "sibcall_memory_operand"))
-- (and (match_test "TARGET_X32 && Pmode == DImode")
-- (match_operand 0 "GOT_memory_operand")))))
-+ (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_X32"))
-+ (match_operand 0 "sibcall_memory_operand"))
-+ (and (match_test "TARGET_X32 && Pmode == DImode")
-+ (match_operand 0 "GOT_memory_operand"))))))
-
- ;; Return true if OP is a 32-bit GOT symbol operand.
- (define_predicate "GOT32_symbol_operand"
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 337a761015a..94374661f2d 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -1170,7 +1170,7 @@ See RS/6000 and PowerPC Options.
- -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
- -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
- -mmitigate-rop -mindirect-branch=@var{choice} @gol
---mfunction-return=@var{choice}}
-+-mfunction-return=@var{choice} -mindirect-branch-register}
-
- @emph{x86 Windows Options}
- @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
-@@ -24253,6 +24253,10 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+@item -mindirect-branch-register
-+@opindex -mindirect-branch-register
-+Force indirect call and jump via register.
-+
- @end table
-
- These @samp{-m} switches are supported in addition to the above
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index e365ef5698a..60d09881a99 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index 05a51ad9157..aac75163794 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 3c0d4c39f0b..9e24a385387 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 14d4ef6dd98..127b5d94523 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index b4836c38d6c..fcaa18d10b7 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index 1f06bd1af74..e4649283d10 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index bc6b47a636e..17c2d0faf88 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 2257be3affa..9194ccf3cbc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e9cfdc5879e..e51f261a612 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index f938db050f7..4aeec1833cd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index 4e58599692a..ac0e5999f63 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index b8d50249d8b..573cf1ef09e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index 455adabfe0e..b2b37fc6e2e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4595b841ec0..4a43e199931 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index 5e3e118e9bd..ac84ab623fa 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index 2801aa4192e..ce655e8be1c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { ! x32 } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-
- void (*dispatch) (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index 70b4fb36eea..d34485a0010 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 3baf03ee77c..0e19830de4d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target { *-*-linux* && { ! x32 } } } } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fpic -fno-plt" } */
-
- void bar (char *);
- char buf[10];
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index edeb264218c..579441f250e 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index 1d00413a76a..c92e6f2b02d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index 06ebf1c9063..d9964c25bbd 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index 1c8f9446636..d4dca4dc5fe 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 21740ac5b7f..5c07e02df6a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index a77c1f470b8..3eb440693a0 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-extern" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index 86e9fd1f1e4..aece9383697 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3ecde878867..3aba5e8c81f 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index df32a19a2b5..0f0181d6672 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 9540996de01..2eef6f35a75 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index f3db6e2441f..e825a10f14c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- typedef void (*dispatch_t)(long offset);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index 0f687c3b027..c6d77e10352 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index b27c6fc96a2..6454827b780 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile { target *-*-linux* } } */
--/* { dg-options "-O2 -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk-inline" } */
-
- extern void bar (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index 764a375fc37..c67066cf197 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- void func0 (void);
- void func1 (void);
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-new file mode 100644
-index 00000000000..7d396a31953
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
-@@ -0,0 +1,22 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-new file mode 100644
-index 00000000000..e7e616bb271
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
-@@ -0,0 +1,20 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-new file mode 100644
-index 00000000000..5320e923be2
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
-@@ -0,0 +1,19 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
-+
-+typedef void (*dispatch_t)(long offset);
-+
-+dispatch_t dispatch;
-+
-+void
-+male_indirect_jump (long offset)
-+{
-+ dispatch(offset);
-+}
-+
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-+/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index 3a6727b5c54..e6fea84a4d9 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index b8f68188313..e239ec4542f 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index 01b0a02f80b..fa3181303c9 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index 4b497b5f8af..fd5b41fdd3f 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
-
- extern void (*bar) (void);
- extern int foo (void) __attribute__ ((function_return("thunk")));
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index 4ae4c44a3fd..d606373ead1 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 5b5bc765a7e..75e45e226b8 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
-
- extern void (*bar) (void);
-
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index fa24a1f7365..d1db41cc128 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -1,5 +1,5 @@
- /* { dg-do compile } */
--/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-+/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
-
- extern void (*bar) (void);
-
---
-2.16.3
-
diff --git a/community/gcc6/0007-x86-Add-V-register-operand-modifier.patch b/community/gcc6/0007-x86-Add-V-register-operand-modifier.patch
deleted file mode 100644
index f75b2133c8..0000000000
--- a/community/gcc6/0007-x86-Add-V-register-operand-modifier.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From 92308185917678406afee3c165ea5e71b53b3cc1 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 6 Jan 2018 22:29:56 -0800
-Subject: [PATCH 07/13] x86: Add 'V' register operand modifier
-
-Add 'V', a special modifier which prints the name of the full integer
-register without '%'. For
-
-extern void (*func_p) (void);
-
-void
-foo (void)
-{
- asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-}
-
-it generates:
-
-foo:
- movq func_p(%rip), %rax
- call __x86_indirect_thunk_rax
- ret
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (print_reg): Print the name of the full
- integer register without '%'.
- (ix86_print_operand): Handle 'V'.
- * doc/extend.texi: Document 'V' modifier.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-register-4.c: New test.
----
- gcc/config/i386/i386.c | 13 ++++++++++++-
- gcc/doc/extend.texi | 3 +++
- gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
- 3 files changed, 28 insertions(+), 1 deletion(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 34e26a3a3c7..eeca7e5e490 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -16869,6 +16869,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
- If CODE is 'h', pretend the reg is the 'high' byte register.
- If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
- If CODE is 'd', duplicate the operand for AVX instruction.
-+ If CODE is 'V', print naked full integer register name without %.
- */
-
- void
-@@ -16879,7 +16880,7 @@ print_reg (rtx x, int code, FILE *file)
- unsigned int regno;
- bool duplicated;
-
-- if (ASSEMBLER_DIALECT == ASM_ATT)
-+ if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
- putc ('%', file);
-
- if (x == pc_rtx)
-@@ -16922,6 +16923,14 @@ print_reg (rtx x, int code, FILE *file)
- && regno != FPSR_REG
- && regno != FPCR_REG);
-
-+ if (code == 'V')
-+ {
-+ if (GENERAL_REGNO_P (regno))
-+ msize = GET_MODE_SIZE (word_mode);
-+ else
-+ error ("'V' modifier on non-integer register");
-+ }
-+
- duplicated = code == 'd' && TARGET_AVX;
-
- switch (msize)
-@@ -17035,6 +17044,7 @@ print_reg (rtx x, int code, FILE *file)
- & -- print some in-use local-dynamic symbol name.
- H -- print a memory address offset by 8; used for sse high-parts
- Y -- print condition for XOP pcom* instruction.
-+ V -- print naked full integer register name without %.
- + -- print a branch hint as 'cs' or 'ds' prefix
- ; -- print a semicolon (after prefixes due to bug in older gas).
- ~ -- print "i" if TARGET_AVX2, "f" otherwise.
-@@ -17259,6 +17269,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
- case 'X':
- case 'P':
- case 'p':
-+ case 'V':
- break;
-
- case 's':
-diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
-index 2cb6bd1ef3e..76ba1d4f913 100644
---- a/gcc/doc/extend.texi
-+++ b/gcc/doc/extend.texi
-@@ -8511,6 +8511,9 @@ The table below shows the list of supported modifiers and their effects.
- @tab @code{2}
- @end multitable
-
-+@code{V} is a special modifier which prints the name of the full integer
-+register without @code{%}.
-+
- @anchor{x86floatingpointasmoperands}
- @subsubsection x86 Floating-Point @code{asm} Operands
-
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-new file mode 100644
-index 00000000000..f0cd9b75be8
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
-@@ -0,0 +1,13 @@
-+/* { dg-do compile } */
-+/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
-+
-+extern void (*func_p) (void);
-+
-+void
-+foo (void)
-+{
-+ asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
-+}
-+
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
---
-2.16.3
-
diff --git a/community/gcc6/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch b/community/gcc6/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
deleted file mode 100644
index 73a58bf86e..0000000000
--- a/community/gcc6/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch
+++ /dev/null
@@ -1,299 +0,0 @@
-From 087b12213a5b4b8654c70320c671bb05c1b1b012 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 13 Jan 2018 18:01:54 -0800
-Subject: [PATCH 08/13] x86: Disallow -mindirect-branch=/-mfunction-return=
- with -mcmodel=large
-
-Since the thunk function may not be reachable in large code model,
--mcmodel=large is incompatible with -mindirect-branch=thunk,
--mindirect-branch=thunk-extern, -mfunction-return=thunk and
--mfunction-return=thunk-extern. Issue an error when they are used with
--mcmodel=large.
-
-gcc/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
- -mcmodel=large with -mindirect-branch=thunk,
- -mindirect-branch=thunk-extern, -mfunction-return=thunk and
- -mfunction-return=thunk-extern.
- * doc/invoke.texi: Document -mcmodel=large is incompatible with
- -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
- -mfunction-return=thunk and -mfunction-return=thunk-extern.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
-
- * gcc.target/i386/indirect-thunk-10.c: New test.
- * gcc.target/i386/indirect-thunk-8.c: Likewise.
- * gcc.target/i386/indirect-thunk-9.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
- * gcc.target/i386/ret-thunk-17.c: Likewise.
- * gcc.target/i386/ret-thunk-18.c: Likewise.
- * gcc.target/i386/ret-thunk-19.c: Likewise.
- * gcc.target/i386/ret-thunk-20.c: Likewise.
- * gcc.target/i386/ret-thunk-21.c: Likewise.
----
- gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
- gcc/doc/invoke.texi | 11 +++++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
- .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
- .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
- gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
- 13 files changed, 126 insertions(+)
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
- create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index eeca7e5e490..9c038bee000 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -6389,6 +6389,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->indirect_branch_type = ix86_indirect_branch;
-+
-+ /* -mcmodel=large is not compatible with -mindirect-branch=thunk
-+ nor -mindirect-branch=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->indirect_branch_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
-
- if (cfun->machine->function_return_type == indirect_branch_unset)
-@@ -6414,6 +6427,19 @@ ix86_set_indirect_branch_type (tree fndecl)
- }
- else
- cfun->machine->function_return_type = ix86_function_return;
-+
-+ /* -mcmodel=large is not compatible with -mfunction-return=thunk
-+ nor -mfunction-return=thunk-extern. */
-+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
-+ && ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ || (cfun->machine->function_return_type
-+ == indirect_branch_thunk)))
-+ error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
-+ "compatible",
-+ ((cfun->machine->function_return_type
-+ == indirect_branch_thunk_extern)
-+ ? "thunk-extern" : "thunk"));
- }
- }
-
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 94374661f2d..1dee495c86b 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -24242,6 +24242,11 @@ to external call and return thunk provided in a separate object file.
- You can control this behavior for a specific function by using the
- function attribute @code{indirect_branch}. @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mindirect-branch=thunk} nor
-+@option{-mindirect-branch=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
- @item -mfunction-return=@var{choice}
- @opindex -mfunction-return
- Convert function return with @var{choice}. The default is @samp{keep},
-@@ -24253,6 +24258,12 @@ object file. You can control this behavior for a specific function by
- using the function attribute @code{function_return}.
- @xref{Function Attributes}.
-
-+Note that @option{-mcmodel=large} is incompatible with
-+@option{-mfunction-return=thunk} nor
-+@option{-mfunction-return=thunk-extern} since the thunk function may
-+not be reachable in large code model.
-+
-+
- @item -mindirect-branch-register
- @opindex -mindirect-branch-register
- Force indirect call and jump via register.
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-new file mode 100644
-index 00000000000..a0674bd2363
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-new file mode 100644
-index 00000000000..7a80a8986e8
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-new file mode 100644
-index 00000000000..d4d45c5114d
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-new file mode 100644
-index 00000000000..3a2aeaddbc5
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-new file mode 100644
-index 00000000000..8e52f032b6c
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-new file mode 100644
-index 00000000000..bdaa4f6911b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((indirect_branch("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-new file mode 100644
-index 00000000000..0605e2c6542
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
-@@ -0,0 +1,7 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-new file mode 100644
-index 00000000000..307019dc242
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-new file mode 100644
-index 00000000000..772617f4010
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
-@@ -0,0 +1,8 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+
-+__attribute__ ((function_return("thunk")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-new file mode 100644
-index 00000000000..1e9f9bd5a66
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-extern")))
-+void
-+bar (void)
-+{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
-+}
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-new file mode 100644
-index 00000000000..eea07f7abe1
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
-@@ -0,0 +1,9 @@
-+/* { dg-do compile { target { lp64 } } } */
-+/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
-+/* { dg-additional-options "-fPIC" { target fpic } } */
-+
-+__attribute__ ((function_return("thunk-inline")))
-+void
-+bar (void)
-+{
-+}
---
-2.16.3
-
diff --git a/community/gcc6/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch b/community/gcc6/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
deleted file mode 100644
index f33946c157..0000000000
--- a/community/gcc6/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 07857bd9fb9ccab67a932ad9df3e53f3f0c2c617 Mon Sep 17 00:00:00 2001
-From: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 25 Jan 2018 19:39:01 +0000
-Subject: [PATCH 09/13] Use INVALID_REGNUM in indirect thunk processing
-
- Backport from mainline
- 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
-
- * config/i386/i386.c (indirect_thunk_name): Declare regno
- as unsigned int. Compare regno with INVALID_REGNUM.
- (output_indirect_thunk): Ditto.
- (output_indirect_thunk_function): Ditto.
- (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
- in the call to output_indirect_thunk_function.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257067 138bc75d-0d04-0410-961f-82ee72b054a4
----
- gcc/config/i386/i386.c | 30 +++++++++++++++---------------
- 1 file changed, 15 insertions(+), 15 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 9c038bee000..40126579c22 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11087,16 +11087,16 @@ static int indirect_thunks_bnd_used;
- /* Fills in the label name that should be used for the indirect thunk. */
-
- static void
--indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
-- bool ret_p)
-+indirect_thunk_name (char name[32], unsigned int regno,
-+ bool need_bnd_p, bool ret_p)
- {
-- if (regno >= 0 && ret_p)
-+ if (regno != INVALID_REGNUM && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
- if (LEGACY_INT_REGNO_P (regno))
-@@ -11114,7 +11114,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- }
- else
- {
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- if (need_bnd_p)
- ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
-@@ -11166,7 +11166,7 @@ indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
- */
-
- static void
--output_indirect_thunk (bool need_bnd_p, int regno)
-+output_indirect_thunk (bool need_bnd_p, unsigned int regno)
- {
- char indirectlabel1[32];
- char indirectlabel2[32];
-@@ -11196,7 +11196,7 @@ output_indirect_thunk (bool need_bnd_p, int regno)
-
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
-
-- if (regno >= 0)
-+ if (regno != INVALID_REGNUM)
- {
- /* MOV. */
- rtx xops[2];
-@@ -11220,12 +11220,12 @@ output_indirect_thunk (bool need_bnd_p, int regno)
- }
-
- /* Output a funtion with a call and return thunk for indirect branch.
-- If BND_P is true, the BND prefix is needed. If REGNO != -1, the
-- function address is in REGNO. Otherwise, the function address is
-+ If BND_P is true, the BND prefix is needed. If REGNO != INVALID_REGNUM,
-+ the function address is in REGNO. Otherwise, the function address is
- on the top of stack. */
-
- static void
--output_indirect_thunk_function (bool need_bnd_p, int regno)
-+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- {
- char name[32];
- tree decl;
-@@ -11274,7 +11274,7 @@ output_indirect_thunk_function (bool need_bnd_p, int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-- if (regno < 0)
-+ if (regno == INVALID_REGNUM)
- {
- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-@@ -11348,16 +11348,16 @@ static void
- ix86_code_end (void)
- {
- rtx xops[2];
-- int regno;
-+ unsigned int regno;
-
- if (indirect_thunk_needed)
-- output_indirect_thunk_function (false, -1);
-+ output_indirect_thunk_function (false, INVALID_REGNUM);
- if (indirect_thunk_bnd_needed)
-- output_indirect_thunk_function (true, -1);
-+ output_indirect_thunk_function (true, INVALID_REGNUM);
-
- for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
- {
-- int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
-+ unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
- if ((indirect_thunks_used & (1 << i)))
- output_indirect_thunk_function (false, regno);
-
---
-2.16.3
-
diff --git a/community/gcc6/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch b/community/gcc6/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
deleted file mode 100644
index 08593c2b3e..0000000000
--- a/community/gcc6/0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 3815e98f0f46b6c4c41e6810bad987bd083691aa Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Fri, 2 Feb 2018 16:47:02 +0000
-Subject: [PATCH 10/13] i386: Pass INVALID_REGNUM as invalid register number
-
- Backport from mainline
- * config/i386/i386.c (ix86_output_function_return): Pass
- INVALID_REGNUM, instead of -1, as invalid register number to
- indirect_thunk_name and output_indirect_thunk.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@257341 138bc75d-0d04-0410-961f-82ee72b054a4
----
- gcc/config/i386/i386.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 40126579c22..66502ee6da6 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -28056,7 +28056,8 @@ ix86_output_function_return (bool long_p)
- {
- bool need_thunk = (cfun->machine->function_return_type
- == indirect_branch_thunk);
-- indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
-+ indirect_thunk_name (thunk_name, INVALID_REGNUM, need_bnd_p,
-+ true);
- if (need_bnd_p)
- {
- indirect_thunk_bnd_needed |= need_thunk;
-@@ -28069,7 +28070,7 @@ ix86_output_function_return (bool long_p)
- }
- }
- else
-- output_indirect_thunk (need_bnd_p, -1);
-+ output_indirect_thunk (need_bnd_p, INVALID_REGNUM);
-
- return "";
- }
---
-2.16.3
-
diff --git a/community/gcc6/0011-i386-Update-mfunction-return-for-return-with-pop.patch b/community/gcc6/0011-i386-Update-mfunction-return-for-return-with-pop.patch
deleted file mode 100644
index 3d528395b9..0000000000
--- a/community/gcc6/0011-i386-Update-mfunction-return-for-return-with-pop.patch
+++ /dev/null
@@ -1,456 +0,0 @@
-From 771535dec733e4b85924f00a3a94c29683d614e5 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 15:29:30 +0000
-Subject: [PATCH 11/13] i386: Update -mfunction-return= for return with pop
-
-When -mfunction-return= is used, simple_return_pop_internal should pop
-return address into ECX register, adjust stack by bytes to pop from stack
-and jump to the return thunk via ECX register.
-
-Revision 257992 removed the bool argument from ix86_output_indirect_jmp.
-Update comments to reflect it.
-
-Tested on i686 and x86-64.
-
-gcc/
-
- Backport from mainline
- 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
-
- 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/84530
- * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
- the bool argument.
- (ix86_output_indirect_function_return): New prototype.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.c (indirect_return_via_cx): New.
- (indirect_return_via_cx_bnd): Likewise.
- (indirect_thunk_name): Handle return va CX_REG.
- (output_indirect_thunk_function): Create alias for
- __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
- (ix86_output_indirect_jmp): Remove the bool argument.
- (ix86_output_indirect_function_return): New function.
- (ix86_split_simple_return_pop_internal): Likewise.
- * config/i386/i386.md (*indirect_jump): Don't pass false
- to ix86_output_indirect_jmp.
- (*tablejump_1): Likewise.
- (simple_return_pop_internal): Change it to define_insn_and_split.
- Call ix86_split_simple_return_pop_internal to split it for
- -mfunction-return=.
- (simple_return_indirect_internal): Call
- ix86_output_indirect_function_return instead of
- ix86_output_indirect_jmp.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/84530
- * gcc.target/i386/ret-thunk-22.c: New test.
- * gcc.target/i386/ret-thunk-23.c: Likewise.
- * gcc.target/i386/ret-thunk-24.c: Likewise.
- * gcc.target/i386/ret-thunk-25.c: Likewise.
- * gcc.target/i386/ret-thunk-26.c: Likewise.
----
- gcc/config/i386/i386-protos.h | 4 +-
- gcc/config/i386/i386.c | 127 +++++++++++++++++++++++----
- gcc/config/i386/i386.md | 11 ++-
- gcc/testsuite/gcc.target/i386/ret-thunk-22.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-23.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-24.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-25.c | 15 ++++
- gcc/testsuite/gcc.target/i386/ret-thunk-26.c | 40 +++++++++
- 8 files changed, 222 insertions(+), 20 deletions(-)
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-22.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-23.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-24.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-25.c
- create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-
-diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
-index 620d70ef9f6..c7a0ccb58d3 100644
---- a/gcc/config/i386/i386-protos.h
-+++ b/gcc/config/i386/i386-protos.h
-@@ -311,8 +311,10 @@ extern enum attr_cpu ix86_schedule;
- #endif
-
- extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
--extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
-+extern const char * ix86_output_indirect_jmp (rtx call_op);
- extern const char * ix86_output_function_return (bool long_p);
-+extern const char * ix86_output_indirect_function_return (rtx ret_op);
-+extern void ix86_split_simple_return_pop_internal (rtx);
- extern bool ix86_operands_ok_for_move_multiple (rtx *operands, bool load,
- enum machine_mode mode);
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 66502ee6da6..21c3c18bd3c 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11080,6 +11080,12 @@ static int indirect_thunks_used;
- by call and return thunks functions with the BND prefix. */
- static int indirect_thunks_bnd_used;
-
-+/* True if return thunk function via CX is needed. */
-+static bool indirect_return_via_cx;
-+/* True if return thunk function via CX with the BND prefix is
-+ needed. */
-+static bool indirect_return_via_cx_bnd;
-+
- #ifndef INDIRECT_LABEL
- # define INDIRECT_LABEL "LIND"
- #endif
-@@ -11090,12 +11096,13 @@ static void
- indirect_thunk_name (char name[32], unsigned int regno,
- bool need_bnd_p, bool ret_p)
- {
-- if (regno != INVALID_REGNUM && ret_p)
-+ if (regno != INVALID_REGNUM && regno != CX_REG && ret_p)
- gcc_unreachable ();
-
- if (USE_HIDDEN_LINKONCE)
- {
- const char *bnd = need_bnd_p ? "_bnd" : "";
-+ const char *ret = ret_p ? "return" : "indirect";
- if (regno != INVALID_REGNUM)
- {
- const char *reg_prefix;
-@@ -11103,14 +11110,11 @@ indirect_thunk_name (char name[32], unsigned int regno,
- reg_prefix = TARGET_64BIT ? "r" : "e";
- else
- reg_prefix = "";
-- sprintf (name, "__x86_indirect_thunk%s_%s%s",
-- bnd, reg_prefix, reg_names[regno]);
-+ sprintf (name, "__x86_%s_thunk%s_%s%s",
-+ ret, bnd, reg_prefix, reg_names[regno]);
- }
- else
-- {
-- const char *ret = ret_p ? "return" : "indirect";
-- sprintf (name, "__x86_%s_thunk%s", ret, bnd);
-- }
-+ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
- }
- else
- {
-@@ -11274,9 +11278,23 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-+ /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
-+ __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd. */
-+ bool need_alias;
- if (regno == INVALID_REGNUM)
-+ need_alias = true;
-+ else if (regno == CX_REG)
-+ {
-+ if (need_bnd_p)
-+ need_alias = indirect_return_via_cx_bnd;
-+ else
-+ need_alias = indirect_return_via_cx;
-+ }
-+ else
-+ need_alias = false;
-+
-+ if (need_alias)
- {
-- /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
- char alias[32];
-
- indirect_thunk_name (alias, regno, need_bnd_p, true);
-@@ -28019,18 +28037,17 @@ ix86_output_indirect_branch (rtx call_op, const char *xasm,
- else
- ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
- }
--/* Output indirect jump. CALL_OP is the jump target. Jump is a
-- function return if RET_P is true. */
-+
-+/* Output indirect jump. CALL_OP is the jump target. */
-
- const char *
--ix86_output_indirect_jmp (rtx call_op, bool ret_p)
-+ix86_output_indirect_jmp (rtx call_op)
- {
- if (cfun->machine->indirect_branch_type != indirect_branch_keep)
- {
-- /* We can't have red-zone if this isn't a function return since
-- "call" in the indirect thunk pushes the return address onto
-- stack, destroying red-zone. */
-- if (!ret_p && ix86_red_zone_size != 0)
-+ /* We can't have red-zone since "call" in the indirect thunk
-+ pushes the return address onto stack, destroying red-zone. */
-+ if (ix86_red_zone_size != 0)
- gcc_unreachable ();
-
- ix86_output_indirect_branch (call_op, "%0", true);
-@@ -28081,6 +28098,86 @@ ix86_output_function_return (bool long_p)
- return "rep%; ret";
- }
-
-+/* Output indirect function return. RET_OP is the function return
-+ target. */
-+
-+const char *
-+ix86_output_indirect_function_return (rtx ret_op)
-+{
-+ if (cfun->machine->function_return_type != indirect_branch_keep)
-+ {
-+ char thunk_name[32];
-+ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
-+ unsigned int regno = REGNO (ret_op);
-+ gcc_assert (regno == CX_REG);
-+
-+ if (cfun->machine->function_return_type
-+ != indirect_branch_thunk_inline)
-+ {
-+ bool need_thunk = (cfun->machine->function_return_type
-+ == indirect_branch_thunk);
-+ indirect_thunk_name (thunk_name, regno, need_bnd_p, true);
-+ if (need_bnd_p)
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx_bnd = true;
-+ indirect_thunks_bnd_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
-+ }
-+ else
-+ {
-+ if (need_thunk)
-+ {
-+ indirect_return_via_cx = true;
-+ indirect_thunks_used |= 1 << CX_REG;
-+ }
-+ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
-+ }
-+ }
-+ else
-+ output_indirect_thunk (need_bnd_p, regno);
-+
-+ return "";
-+ }
-+ else
-+ return "%!jmp\t%A0";
-+}
-+
-+/* Split simple return with popping POPC bytes from stack to indirect
-+ branch with stack adjustment . */
-+
-+void
-+ix86_split_simple_return_pop_internal (rtx popc)
-+{
-+ struct machine_function *m = cfun->machine;
-+ rtx ecx = gen_rtx_REG (SImode, CX_REG);
-+ rtx_insn *insn;
-+
-+ /* There is no "pascal" calling convention in any 64bit ABI. */
-+ gcc_assert (!TARGET_64BIT);
-+
-+ insn = emit_insn (gen_pop (ecx));
-+ m->fs.cfa_offset -= UNITS_PER_WORD;
-+ m->fs.sp_offset -= UNITS_PER_WORD;
-+
-+ rtx x = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ add_reg_note (insn, REG_CFA_REGISTER, gen_rtx_SET (ecx, pc_rtx));
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ x = gen_rtx_PLUS (Pmode, stack_pointer_rtx, popc);
-+ x = gen_rtx_SET (stack_pointer_rtx, x);
-+ insn = emit_insn (x);
-+ add_reg_note (insn, REG_CFA_ADJUST_CFA, x);
-+ RTX_FRAME_RELATED_P (insn) = 1;
-+
-+ /* Now return address is in ECX. */
-+ emit_jump_insn (gen_simple_return_indirect_internal (ecx));
-+}
-+
- /* Output the assembly for a call instruction. */
-
- const char *
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 05a88fff356..857466a6361 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11813,7 +11813,7 @@
- (define_insn "*indirect_jump"
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -11868,7 +11868,7 @@
- [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
- (use (label_ref (match_operand 1)))]
- ""
-- "* return ix86_output_indirect_jmp (operands[0], false);"
-+ "* return ix86_output_indirect_jmp (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-@@ -12520,11 +12520,14 @@
- (set_attr "prefix_rep" "1")
- (set_attr "modrm" "0")])
-
--(define_insn "simple_return_pop_internal"
-+(define_insn_and_split "simple_return_pop_internal"
- [(simple_return)
- (use (match_operand:SI 0 "const_int_operand"))]
- "reload_completed"
- "%!ret\t%0"
-+ "&& cfun->machine->function_return_type != indirect_branch_keep"
-+ [(const_int 0)]
-+ "ix86_split_simple_return_pop_internal (operands[0]); DONE;"
- [(set_attr "length" "3")
- (set_attr "atom_unit" "jeu")
- (set_attr "length_immediate" "2")
-@@ -12535,7 +12538,7 @@
- [(simple_return)
- (use (match_operand:SI 0 "register_operand" "r"))]
- "reload_completed"
-- "* return ix86_output_indirect_jmp (operands[0], true);"
-+ "* return ix86_output_indirect_function_return (operands[0]);"
- [(set (attr "type")
- (if_then_else (match_test "(cfun->machine->indirect_branch_type
- != indirect_branch_keep)")
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-22.c b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-new file mode 100644
-index 00000000000..89e086de97b
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-22.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-23.c b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-new file mode 100644
-index 00000000000..43f0ccaa854
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-23.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not {\tpause} } } */
-+/* { dg-final { scan-assembler-not {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-24.c b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-new file mode 100644
-index 00000000000..8729e35147e
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-24.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-25.c b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-new file mode 100644
-index 00000000000..f73553c9a9f
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-25.c
-@@ -0,0 +1,15 @@
-+/* PR target/r84530 */
-+/* { dg-do compile { target ia32 } } */
-+/* { dg-options "-O2 -mfunction-return=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
-+
-+struct s { _Complex unsigned short x; };
-+struct s gs = { 100 + 200i };
-+struct s __attribute__((noinline)) foo (void) { return gs; }
-+
-+/* { dg-final { scan-assembler-times "popl\[\\t \]*%ecx" 1 } } */
-+/* { dg-final { scan-assembler "lea\[l\]?\[\\t \]*4\\(%esp\\), %esp" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk_bnd_ecx" } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler {\tpause} } } */
-+/* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-26.c b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-new file mode 100644
-index 00000000000..9144e988735
---- /dev/null
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-26.c
-@@ -0,0 +1,40 @@
-+/* PR target/r84530 */
-+/* { dg-do run } */
-+/* { dg-options "-Os -mfunction-return=thunk" } */
-+
-+struct S { int i; };
-+__attribute__((const, noinline, noclone))
-+struct S foo (int x)
-+{
-+ struct S s;
-+ s.i = x;
-+ return s;
-+}
-+
-+int a[2048], b[2048], c[2048], d[2048];
-+struct S e[2048];
-+
-+__attribute__((noinline, noclone)) void
-+bar (void)
-+{
-+ int i;
-+ for (i = 0; i < 1024; i++)
-+ {
-+ e[i] = foo (i);
-+ a[i+2] = a[i] + a[i+1];
-+ b[10] = b[10] + i;
-+ c[i] = c[2047 - i];
-+ d[i] = d[i + 1];
-+ }
-+}
-+
-+int
-+main ()
-+{
-+ int i;
-+ bar ();
-+ for (i = 0; i < 1024; i++)
-+ if (e[i].i != i)
-+ __builtin_abort ();
-+ return 0;
-+}
---
-2.16.3
-
diff --git a/community/gcc6/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch b/community/gcc6/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
deleted file mode 100644
index 1bd6134cea..0000000000
--- a/community/gcc6/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch
+++ /dev/null
@@ -1,1003 +0,0 @@
-From a34d0b92e2c81792bd1f27e872c4c97a2df6861c Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Mon, 26 Feb 2018 17:00:46 +0000
-Subject: [PATCH 12/13] i386: Add TARGET_INDIRECT_BRANCH_REGISTER
-
-For
-
----
-struct C {
- virtual ~C();
- virtual void f();
-};
-
-void
-f (C *p)
-{
- p->f();
- p->f();
-}
----
-
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- jmp .LIND1
-.LIND0:
- pushq 16(%rax)
- jmp __x86_indirect_thunk
-.LIND1:
- call .LIND0
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-x86-64 is supposed to have asynchronous unwind tables by default, but
-there is nothing that reflects the change in the (relative) frame
-address after .LIND0. That region really has to be moved outside of
-the .cfi_startproc/.cfi_endproc bracket.
-
-This patch adds TARGET_INDIRECT_BRANCH_REGISTER to force indirect
-branch via register whenever -mindirect-branch= is used. Now,
--mindirect-branch=thunk-extern -O2 on x86-64 GNU/Linux generates:
-
-_Z1fP1C:
-.LFB0:
- .cfi_startproc
- pushq %rbx
- .cfi_def_cfa_offset 16
- .cfi_offset 3, -16
- movq (%rdi), %rax
- movq %rdi, %rbx
- movq 16(%rax), %rax
- call __x86_indirect_thunk_rax
- movq (%rbx), %rax
- movq %rbx, %rdi
- popq %rbx
- .cfi_def_cfa_offset 8
- movq 16(%rax), %rax
- jmp __x86_indirect_thunk_rax
- .cfi_endproc
-
-so that "-mindirect-branch=thunk-extern" is equivalent to
-"-mindirect-branch=thunk-extern -mindirect-branch-register", which is
-used by Linux kernel.
-
-gcc/
-
- Backport from mainline
- 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/84039
- * config/i386/constraints.md (Bs): Replace
- ix86_indirect_branch_register with
- TARGET_INDIRECT_BRANCH_REGISTER.
- (Bw): Likewise.
- * config/i386/i386.md (indirect_jump): Likewise.
- (tablejump): Likewise.
- (*sibcall_memory): Likewise.
- (*sibcall_value_memory): Likewise.
- Peepholes of indirect call and jump via memory: Likewise.
- (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
- (*sibcall_value_GOT_32): Likewise.
- * config/i386/predicates.md (indirect_branch_operand): Likewise.
- (GOT_memory_operand): Likewise.
- (call_insn_operand): Likewise.
- (sibcall_insn_operand): Likewise.
- (GOT32_symbol_operand): Likewise.
- * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
-
-gcc/testsuite/
-
- Backport from mainline
- 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
-
- PR target/84039
- * gcc.target/i386/indirect-thunk-1.c: Updated.
- * gcc.target/i386/indirect-thunk-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
- * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
- * gcc.target/i386/ret-thunk-9.c: Likewise.
- * gcc.target/i386/ret-thunk-10.c: Likewise.
- * gcc.target/i386/ret-thunk-11.c: Likewise.
- * gcc.target/i386/ret-thunk-12.c: Likewise.
- * gcc.target/i386/ret-thunk-13.c: Likewise.
- * gcc.target/i386/ret-thunk-14.c: Likewise.
- * gcc.target/i386/ret-thunk-15.c: Likewise.
----
- gcc/config/i386/constraints.md | 4 ++--
- gcc/config/i386/i386.h | 5 ++++
- gcc/config/i386/i386.md | 28 +++++++++++++---------
- gcc/config/i386/predicates.md | 6 ++---
- gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 5 ++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-5.c | 6 +++--
- gcc/testsuite/gcc.target/i386/indirect-thunk-6.c | 12 ++++++----
- gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-attr-3.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-4.c | 3 +--
- .../gcc.target/i386/indirect-thunk-attr-5.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-6.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-attr-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-1.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-2.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-bnd-3.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-bnd-4.c | 7 +++---
- .../gcc.target/i386/indirect-thunk-extern-1.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-2.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-extern-3.c | 9 ++++---
- .../gcc.target/i386/indirect-thunk-extern-4.c | 6 ++---
- .../gcc.target/i386/indirect-thunk-extern-5.c | 6 +++--
- .../gcc.target/i386/indirect-thunk-extern-6.c | 8 +++----
- .../gcc.target/i386/indirect-thunk-extern-7.c | 5 ++--
- .../gcc.target/i386/indirect-thunk-inline-1.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-2.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-3.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-4.c | 2 +-
- .../gcc.target/i386/indirect-thunk-inline-5.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-6.c | 3 ++-
- .../gcc.target/i386/indirect-thunk-inline-7.c | 4 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 9 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 8 +++----
- gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 5 ++--
- gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 7 +++---
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 13 ++++------
- 43 files changed, 128 insertions(+), 141 deletions(-)
-
-diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md
-index 9204c8e8487..ef684a95497 100644
---- a/gcc/config/i386/constraints.md
-+++ b/gcc/config/i386/constraints.md
-@@ -172,7 +172,7 @@
-
- (define_constraint "Bs"
- "@internal Sibcall memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -180,7 +180,7 @@
-
- (define_constraint "Bw"
- "@internal Call memory operand."
-- (ior (and (not (match_test "ix86_indirect_branch_register"))
-+ (ior (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
-index b34bc117c34..1816d710f4e 100644
---- a/gcc/config/i386/i386.h
-+++ b/gcc/config/i386/i386.h
-@@ -2676,6 +2676,11 @@ extern void debug_dispatch_window (int);
- #define TARGET_RECIP_VEC_DIV ((recip_mask & RECIP_MASK_VEC_DIV) != 0)
- #define TARGET_RECIP_VEC_SQRT ((recip_mask & RECIP_MASK_VEC_SQRT) != 0)
-
-+
-+#define TARGET_INDIRECT_BRANCH_REGISTER \
-+ (ix86_indirect_branch_register \
-+ || cfun->machine->indirect_branch_type != indirect_branch_keep)
-+
- #define IX86_HLE_ACQUIRE (1 << 16)
- #define IX86_HLE_RELEASE (1 << 17)
-
-diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
-index 857466a6361..6a6dc26799c 100644
---- a/gcc/config/i386/i386.md
-+++ b/gcc/config/i386/i386.md
-@@ -11805,7 +11805,7 @@
- [(set (pc) (match_operand 0 "indirect_branch_operand"))]
- ""
- {
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -11859,7 +11859,7 @@
- OPTAB_DIRECT);
- }
-
-- if (TARGET_X32 || ix86_indirect_branch_register)
-+ if (TARGET_X32 || TARGET_INDIRECT_BRANCH_REGISTER)
- operands[0] = convert_memory_address (word_mode, operands[0]);
- cfun->machine->has_local_indirect_jump = true;
- })
-@@ -12029,7 +12029,10 @@
- (match_operand:SI 0 "register_no_elim_operand" "U")
- (match_operand:SI 1 "GOT32_symbol_operand"))))
- (match_operand 2))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[0], operands[1]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12048,7 +12051,7 @@
- [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
- (match_operand 1))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[0]);"
- [(set_attr "type" "call")])
-
-@@ -12058,7 +12061,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12073,7 +12076,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-@@ -12171,7 +12174,7 @@
- (match_operand:W 1 "memory_operand"))
- (set (pc) (match_dup 0))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && peep2_reg_dead_p (2, operands[0])"
- [(set (pc) (match_dup 1))])
-
-@@ -12229,7 +12232,10 @@
- (match_operand:SI 1 "register_no_elim_operand" "U")
- (match_operand:SI 2 "GOT32_symbol_operand"))))
- (match_operand 3)))]
-- "!TARGET_MACHO && !TARGET_64BIT && SIBLING_CALL_P (insn)"
-+ "!TARGET_MACHO
-+ && !TARGET_64BIT
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
-+ && SIBLING_CALL_P (insn)"
- {
- rtx fnaddr = gen_rtx_PLUS (Pmode, operands[1], operands[2]);
- fnaddr = gen_const_mem (Pmode, fnaddr);
-@@ -12250,7 +12256,7 @@
- (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
- (match_operand 2)))
- (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
-- "!TARGET_X32 && !ix86_indirect_branch_register"
-+ "!TARGET_X32 && !TARGET_INDIRECT_BRANCH_REGISTER"
- "* return ix86_output_call_insn (insn, operands[1]);"
- [(set_attr "type" "callv")])
-
-@@ -12261,7 +12267,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (1))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (1)))"
-@@ -12278,7 +12284,7 @@
- (call (mem:QI (match_dup 0))
- (match_operand 3)))]
- "!TARGET_X32
-- && !ix86_indirect_branch_register
-+ && !TARGET_INDIRECT_BRANCH_REGISTER
- && SIBLING_CALL_P (peep2_next_insn (2))
- && !reg_mentioned_p (operands[0],
- CALL_INSN_FUNCTION_USAGE (peep2_next_insn (2)))"
-diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
-index d1f0a7dbf61..5f8a98faead 100644
---- a/gcc/config/i386/predicates.md
-+++ b/gcc/config/i386/predicates.md
-@@ -593,7 +593,7 @@
- ;; Test for a valid operand for indirect branch.
- (define_predicate "indirect_branch_operand"
- (ior (match_operand 0 "register_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))))
-
-@@ -637,7 +637,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "call_register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-@@ -648,7 +648,7 @@
- (ior (match_test "constant_call_address_operand
- (op, mode == VOIDmode ? mode : Pmode)")
- (match_operand 0 "register_no_elim_operand")
-- (and (not (match_test "ix86_indirect_branch_register"))
-+ (and (not (match_test "TARGET_INDIRECT_BRANCH_REGISTER"))
- (ior (and (not (match_test "TARGET_X32"))
- (match_operand 0 "sibcall_memory_operand"))
- (and (match_test "TARGET_X32 && Pmode == DImode")
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-index 60d09881a99..6e94d2c4865 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-index aac75163794..3c467078964 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-index 9e24a385387..2c7fb52b59d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-index 127b5d94523..0d3f895009d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-index fcaa18d10b7..fb26c005e80 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-index e4649283d10..aa03fbd8446 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
-@@ -10,9 +10,13 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-index 17c2d0faf88..3c72036dbaf 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-index 9194ccf3cbc..7106407b83d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-index e51f261a612..27c7e5b029b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-index 4aeec1833cd..89a2bac8403 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
-@@ -14,10 +14,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-index ac0e5999f63..3eb83c3779a 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
-@@ -13,10 +13,9 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
- /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-index 573cf1ef09e..0098dd1133d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
-@@ -14,9 +14,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-index b2b37fc6e2e..ece8de15a4b 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
-@@ -13,9 +13,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-index 4a43e199931..d53fc887dcc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
-@@ -36,9 +36,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-index ac84ab623fa..73d16baddc7 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
-@@ -10,9 +10,9 @@ foo (void)
- dispatch (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-index ce655e8be1c..856751ac224 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
-@@ -11,10 +11,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-index d34485a0010..42312f65588 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
-@@ -10,8 +10,9 @@ foo (void)
- bar (buf);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-index 0e19830de4d..c8ca102c8df 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
-@@ -11,10 +11,9 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 2 } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-times "bnd call\[ \t\]*\.LIND" 1 } } */
- /* { dg-final { scan-assembler "bnd ret" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
- /* { dg-final { scan-assembler {\tlfence} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-index 579441f250e..c09dd0afd2d 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-index c92e6f2b02d..826425a5115 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
-@@ -11,9 +11,8 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-index d9964c25bbd..385626850a2 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
-@@ -12,9 +12,8 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-+/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-index d4dca4dc5fe..1ae49b137ca 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
-@@ -12,9 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-index 5c07e02df6a..53282390977 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
-@@ -9,8 +9,10 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-index 3eb440693a0..8ae43482d0c 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
-@@ -10,8 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
--/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-index aece9383697..2b9a33e93dc 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
-@@ -35,9 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
- /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-index 3aba5e8c81f..869d9040838 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch(offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-index 0f0181d6672..c5c16ed8bd8 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
-@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
- dispatch[offset](offset);
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-index 2eef6f35a75..4a63ebed8ab 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-index e825a10f14c..a395ffca018 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
-@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-index c6d77e10352..21cbfd39582 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
-@@ -9,7 +9,8 @@ foo (void)
- bar ();
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-index 6454827b780..d1300f18dc7 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
-@@ -10,7 +10,8 @@ foo (void)
- return 0;
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
-+/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*bar@GOT" { target { ! x32 } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
-diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-index c67066cf197..ea009245a58 100644
---- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-+++ b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
-@@ -35,8 +35,8 @@ bar (int i)
- }
- }
-
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%(r|e)ax" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler {\tpause} } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-index e6fea84a4d9..af9023af613 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-index e239ec4542f..ba467c59b36 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
-@@ -15,9 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-index fa3181303c9..43e57cac2c3 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
-@@ -15,8 +15,6 @@ foo (void)
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-index fd5b41fdd3f..55f156c4376 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
-@@ -14,9 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
- /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
--/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-index d606373ead1..1c790436a53 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-index 75e45e226b8..58aba319cba 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
-@@ -16,7 +16,6 @@ foo (void)
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler-times {\tpause} 1 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index d1db41cc128..d2df8b874e0 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -14,11 +14,8 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
--/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
--/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
--/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
--/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
--/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
--/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
-+/* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
-+/* { dg-final { scan-assembler-times {\tpause} 2 } } */
-+/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
-+/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
-+/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
---
-2.16.3
-
diff --git a/community/gcc6/0013-i386-Don-t-generate-alias-for-function-return-thunk.patch b/community/gcc6/0013-i386-Don-t-generate-alias-for-function-return-thunk.patch
deleted file mode 100644
index d846ac77d9..0000000000
--- a/community/gcc6/0013-i386-Don-t-generate-alias-for-function-return-thunk.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-From e7fbaebc8ff650df76f43e92cb9ca59d5174ebe7 Mon Sep 17 00:00:00 2001
-From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 15 Mar 2018 17:54:40 +0000
-Subject: [PATCH 13/13] i386: Don't generate alias for function return thunk
-
-Function return thunks shouldn't be aliased to indirect branch thunks
-since indirect branch thunks are placed in COMDAT section and a COMDAT
-section with indirect branch may not have function return thunk. This
-patch generates function return thunks directly.
-
-gcc/
-
- Backport from mainline
- PR target/84574
- * config/i386/i386.c (indirect_thunk_needed): Update comments.
- (indirect_thunk_bnd_needed): Likewise.
- (indirect_thunks_used): Likewise.
- (indirect_thunks_bnd_used): Likewise.
- (indirect_return_needed): New.
- (indirect_return_bnd_needed): Likewise.
- (output_indirect_thunk_function): Add a bool argument for
- function return.
- (output_indirect_thunk_function): Don't generate alias for
- function return thunk.
- (ix86_code_end): Call output_indirect_thunk_function to generate
- function return thunks.
- (ix86_output_function_return): Set indirect_return_bnd_needed
- and indirect_return_needed instead of indirect_thunk_bnd_needed
- and indirect_thunk_needed.
-
-gcc/testsuite/
-
- Backport from mainline
- PR target/84574
- * gcc.target/i386/ret-thunk-9.c: Expect __x86_return_thunk
- label instead of __x86_indirect_thunk label.
----
- gcc/config/i386/i386.c | 92 ++++++++++-------------------
- gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2 +-
- 2 files changed, 33 insertions(+), 61 deletions(-)
-
-diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
-index 21c3c18bd3c..f4cd1c6f4e9 100644
---- a/gcc/config/i386/i386.c
-+++ b/gcc/config/i386/i386.c
-@@ -11067,19 +11067,23 @@ ix86_setup_frame_addresses (void)
- labels in call and return thunks. */
- static int indirectlabelno;
-
--/* True if call and return thunk functions are needed. */
-+/* True if call thunk function is needed. */
- static bool indirect_thunk_needed = false;
--/* True if call and return thunk functions with the BND prefix are
-- needed. */
-+/* True if call thunk function with the BND prefix is needed. */
- static bool indirect_thunk_bnd_needed = false;
-
- /* Bit masks of integer registers, which contain branch target, used
-- by call and return thunks functions. */
-+ by call thunk functions. */
- static int indirect_thunks_used;
- /* Bit masks of integer registers, which contain branch target, used
-- by call and return thunks functions with the BND prefix. */
-+ by call thunk functions with the BND prefix. */
- static int indirect_thunks_bnd_used;
-
-+/* True if return thunk function is needed. */
-+static bool indirect_return_needed = false;
-+/* True if return thunk function with the BND prefix is needed. */
-+static bool indirect_return_bnd_needed = false;
-+
- /* True if return thunk function via CX is needed. */
- static bool indirect_return_via_cx;
- /* True if return thunk function via CX with the BND prefix is
-@@ -11226,16 +11230,18 @@ output_indirect_thunk (bool need_bnd_p, unsigned int regno)
- /* Output a funtion with a call and return thunk for indirect branch.
- If BND_P is true, the BND prefix is needed. If REGNO != INVALID_REGNUM,
- the function address is in REGNO. Otherwise, the function address is
-- on the top of stack. */
-+ on the top of stack. Thunk is used for function return if RET_P is
-+ true. */
-
- static void
--output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
-+output_indirect_thunk_function (bool need_bnd_p, unsigned int regno,
-+ bool ret_p)
- {
- char name[32];
- tree decl;
-
- /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
-- indirect_thunk_name (name, regno, need_bnd_p, false);
-+ indirect_thunk_name (name, regno, need_bnd_p, ret_p);
- decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
- get_identifier (name),
- build_function_type_list (void_type_node, NULL_TREE));
-@@ -11278,50 +11284,6 @@ output_indirect_thunk_function (bool need_bnd_p, unsigned int regno)
- ASM_OUTPUT_LABEL (asm_out_file, name);
- }
-
-- /* Create alias for __x86_return_thunk/__x86_return_thunk_bnd or
-- __x86_return_thunk_ecx/__x86_return_thunk_ecx_bnd. */
-- bool need_alias;
-- if (regno == INVALID_REGNUM)
-- need_alias = true;
-- else if (regno == CX_REG)
-- {
-- if (need_bnd_p)
-- need_alias = indirect_return_via_cx_bnd;
-- else
-- need_alias = indirect_return_via_cx;
-- }
-- else
-- need_alias = false;
--
-- if (need_alias)
-- {
-- char alias[32];
--
-- indirect_thunk_name (alias, regno, need_bnd_p, true);
--#if TARGET_MACHO
-- if (TARGET_MACHO)
-- {
-- fputs ("\t.weak_definition\t", asm_out_file);
-- assemble_name (asm_out_file, alias);
-- fputs ("\n\t.private_extern\t", asm_out_file);
-- assemble_name (asm_out_file, alias);
-- putc ('\n', asm_out_file);
-- ASM_OUTPUT_LABEL (asm_out_file, alias);
-- }
--#else
-- ASM_OUTPUT_DEF (asm_out_file, alias, name);
-- if (USE_HIDDEN_LINKONCE)
-- {
-- fputs ("\t.globl\t", asm_out_file);
-- assemble_name (asm_out_file, alias);
-- putc ('\n', asm_out_file);
-- fputs ("\t.hidden\t", asm_out_file);
-- assemble_name (asm_out_file, alias);
-- putc ('\n', asm_out_file);
-- }
--#endif
-- }
--
- DECL_INITIAL (decl) = make_node (BLOCK);
- current_function_decl = decl;
- allocate_struct_function (decl, false);
-@@ -11368,19 +11330,29 @@ ix86_code_end (void)
- rtx xops[2];
- unsigned int regno;
-
-+ if (indirect_return_needed)
-+ output_indirect_thunk_function (false, INVALID_REGNUM, true);
-+ if (indirect_return_bnd_needed)
-+ output_indirect_thunk_function (true, INVALID_REGNUM, true);
-+
-+ if (indirect_return_via_cx)
-+ output_indirect_thunk_function (false, CX_REG, true);
-+ if (indirect_return_via_cx_bnd)
-+ output_indirect_thunk_function (true, CX_REG, true);
-+
- if (indirect_thunk_needed)
-- output_indirect_thunk_function (false, INVALID_REGNUM);
-+ output_indirect_thunk_function (false, INVALID_REGNUM, false);
- if (indirect_thunk_bnd_needed)
-- output_indirect_thunk_function (true, INVALID_REGNUM);
-+ output_indirect_thunk_function (true, INVALID_REGNUM, false);
-
- for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
- {
- unsigned int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
- if ((indirect_thunks_used & (1 << i)))
-- output_indirect_thunk_function (false, regno);
-+ output_indirect_thunk_function (false, regno, false);
-
- if ((indirect_thunks_bnd_used & (1 << i)))
-- output_indirect_thunk_function (true, regno);
-+ output_indirect_thunk_function (true, regno, false);
- }
-
- for (regno = AX_REG; regno <= SP_REG; regno++)
-@@ -11389,10 +11361,10 @@ ix86_code_end (void)
- tree decl;
-
- if ((indirect_thunks_used & (1 << regno)))
-- output_indirect_thunk_function (false, regno);
-+ output_indirect_thunk_function (false, regno, false);
-
- if ((indirect_thunks_bnd_used & (1 << regno)))
-- output_indirect_thunk_function (true, regno);
-+ output_indirect_thunk_function (true, regno, false);
-
- if (!(pic_labels_used & (1 << regno)))
- continue;
-@@ -28077,12 +28049,12 @@ ix86_output_function_return (bool long_p)
- true);
- if (need_bnd_p)
- {
-- indirect_thunk_bnd_needed |= need_thunk;
-+ indirect_return_bnd_needed |= need_thunk;
- fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
- }
- else
- {
-- indirect_thunk_needed |= need_thunk;
-+ indirect_return_needed |= need_thunk;
- fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
- }
- }
-diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-index d2df8b874e0..eee230ca2f6 100644
---- a/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-+++ b/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
-@@ -13,7 +13,7 @@ foo (void)
- /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
- /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
- /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
--/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
-+/* { dg-final { scan-assembler "__x86_return_thunk:" } } */
- /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?bar" { target *-*-linux* } } } */
- /* { dg-final { scan-assembler-times {\tpause} 2 } } */
- /* { dg-final { scan-assembler-times {\tlfence} 2 } } */
---
-2.16.3
-
diff --git a/community/hydrogen/hydrogen-docdir.patch b/community/hydrogen/hydrogen-docdir.patch
deleted file mode 100644
index 71c6a6d86c..0000000000
--- a/community/hydrogen/hydrogen-docdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./Sconstruct.orig
-+++ ./Sconstruct
-@@ -309,7 +309,7 @@
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/hydrogen.default.conf"))
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/emptySample.wav"))
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/click.wav"))
-- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/doc"))
-+ env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/doc/hydrogen', source="./data/doc"))
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/DefaultSong.h2song"))
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/bin/', source="./hydrogen"))
- env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/applications', source="./hydrogen.desktop"))
diff --git a/community/irrlicht/irrlicht-1.8.3-config.patch b/community/irrlicht/irrlicht-1.8.3-config.patch
deleted file mode 100644
index 0320d93969..0000000000
--- a/community/irrlicht/irrlicht-1.8.3-config.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h
-index 2fa2423..e7c287e 100644
---- a/include/IrrCompileConfig.h
-+++ b/include/IrrCompileConfig.h
-@@ -249,7 +249,7 @@ the engine will no longer read .jpeg images. */
- //! Define _IRR_USE_NON_SYSTEM_JPEG_LIB_ to let irrlicht use the jpeglib which comes with irrlicht.
- /** If this is commented out, Irrlicht will try to compile using the jpeg lib installed in the system.
- This is only used when _IRR_COMPILE_WITH_LIBJPEG_ is defined. */
--#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
-+//#define _IRR_USE_NON_SYSTEM_JPEG_LIB_
- #ifdef NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
- #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
- #endif
-@@ -265,7 +265,7 @@ the engine will no longer read .png images. */
- //! Define _IRR_USE_NON_SYSTEM_LIBPNG_ to let irrlicht use the libpng which comes with irrlicht.
- /** If this is commented out, Irrlicht will try to compile using the libpng installed in the system.
- This is only used when _IRR_COMPILE_WITH_LIBPNG_ is defined. */
--#define _IRR_USE_NON_SYSTEM_LIB_PNG_
-+//#define _IRR_USE_NON_SYSTEM_LIB_PNG_
- #ifdef NO_IRR_USE_NON_SYSTEM_LIB_PNG_
- #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
- #endif
-@@ -602,7 +602,7 @@ ones. */
- /** If this is commented out, Irrlicht will try to compile using the zlib
- installed on the system. This is only used when _IRR_COMPILE_WITH_ZLIB_ is
- defined. */
--#define _IRR_USE_NON_SYSTEM_ZLIB_
-+//#define _IRR_USE_NON_SYSTEM_ZLIB_
- #ifdef NO_IRR_USE_NON_SYSTEM_ZLIB_
- #undef _IRR_USE_NON_SYSTEM_ZLIB_
- #endif
diff --git a/community/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch b/community/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch
deleted file mode 100644
index d78f949e71..0000000000
--- a/community/kbuild/0001-testing-kbuild-upgrade-to-0.1.9998_pre20131130-and-f.patch
+++ /dev/null
@@ -1,357 +0,0 @@
-From 920e0a4d6654509464c832543bf607c3ed8fca0c Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 2 Jan 2014 10:40:57 +0000
-Subject: [PATCH] testing/kbuild: upgrade to 0.1.9998_pre20131130 and fix build
- on musl
-
----
- .../kbuild/0001-define-ALLPERMS-is-missing.patch | 43 ++++++++++++++++++++
- testing/kbuild/APKBUILD | 46 ++++++++++++++++++----
- testing/kbuild/allperms.patch | 30 ++++++++++++++
- testing/kbuild/glob.patch | 19 +++++++++
- testing/kbuild/kbuild-0.1.5_p2-qa.patch | 26 ------------
- testing/kbuild/kobjcache.patch | 10 +++++
- testing/kbuild/obstack.patch | 42 ++++++++++++++++++++
- testing/kbuild/strlcpy.patch | 15 +------
- testing/kbuild/sys-types.patch | 14 +++++++
- 9 files changed, 198 insertions(+), 47 deletions(-)
- create mode 100644 testing/kbuild/0001-define-ALLPERMS-is-missing.patch
- create mode 100644 testing/kbuild/allperms.patch
- create mode 100644 testing/kbuild/glob.patch
- delete mode 100644 testing/kbuild/kbuild-0.1.5_p2-qa.patch
- create mode 100644 testing/kbuild/kobjcache.patch
- create mode 100644 testing/kbuild/obstack.patch
- create mode 100644 testing/kbuild/sys-types.patch
-
-diff --git a/testing/kbuild/0001-define-ALLPERMS-is-missing.patch b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch
-new file mode 100644
-index 0000000..ffe1b75
---- /dev/null
-+++ b/testing/kbuild/0001-define-ALLPERMS-is-missing.patch
-@@ -0,0 +1,43 @@
-+From ad40844b8d4ccd3fec48fd1db3d165926d247398 Mon Sep 17 00:00:00 2001
-+From: Natanael Copa <ncopa@alpinelinux.org>
-+Date: Thu, 2 Jan 2014 08:55:33 +0000
-+Subject: [PATCH] define ALLPERMS is missing
-+
-+---
-+ src/kmk/kmkbuiltin/chmod.c | 4 ++++
-+ src/kmk/kmkbuiltin/install.c | 4 ++++
-+ 2 files changed, 8 insertions(+)
-+
-+diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c
-+index 792a286..8edce38 100644
-+--- a/src/kmk/kmkbuiltin/chmod.c
-++++ b/src/kmk/kmkbuiltin/chmod.c
-+@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
-+ #include "getopt.h"
-+ #include "kmkbuiltin.h"
-+
-++#ifndef ALLPERMS
-++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-++#endif
-++
-+ extern void * bsd_setmode(const char *p);
-+ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
-+ extern void bsd_strmode(mode_t mode, char *p);
-+diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c
-+index 13bec72..08d8ffe 100644
-+--- a/src/kmk/kmkbuiltin/install.c
-++++ b/src/kmk/kmkbuiltin/install.c
-+@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
-+ # define IS_SLASH(ch) ((ch) == '/')
-+ #endif
-+
-++#ifndef ALLPERMS
-++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-++#endif
-++
-+ static gid_t gid;
-+ static uid_t uid;
-+ static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given;
-+--
-+1.8.5.2
-+
-diff --git a/testing/kbuild/APKBUILD b/testing/kbuild/APKBUILD
-index ac1fc45..ed6e80f 100644
---- a/testing/kbuild/APKBUILD
-+++ b/testing/kbuild/APKBUILD
-@@ -1,7 +1,7 @@
- # Contributor: Natanael Copa <ncopa@alpinelinux.org>
- # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
- pkgname=kbuild
--pkgver=0.1.9998_pre20120806
-+pkgver=0.1.9998_pre20131130
- _ver=${pkgver/_/-}
- pkgrel=1
- pkgdesc="A makefile framework for writing simple makefiles for complex tasks"
-@@ -14,13 +14,17 @@ makedepends="autoconf automake flex bison"
- install=""
- subpackages="$pkgname-doc"
- source="http://dev.gentoo.org/~polynomial-c/kBuild-${_ver}-src.tar.xz
-- kbuild-0.1.5_p2-qa.patch
- lchmod.patch
- strlcpy.patch
- underlinking.patch
- sys_siglist.patch
- kbuild-0.1.9998_pre20110817-gcc-4.7.patch
-- uclibc.patch"
-+ 0001-define-ALLPERMS-is-missing.patch
-+ sys-types.patch
-+ uclibc.patch
-+ kobjcache.patch
-+ obstack.patch
-+ glob.patch"
-
- _builddir="$srcdir"/kBuild-$_ver
- prepare() {
-@@ -60,11 +64,39 @@ package() {
- || return 1
- }
-
--md5sums="520d65bd2356c26d1b9bbb25fd7d70ce kBuild-0.1.9998-pre20120806-src.tar.xz
--79d4d445b28f0c50f2a7a8ca12bbed4b kbuild-0.1.5_p2-qa.patch
-+md5sums="a9fad7d9c26dba44c2c1ad3d93d49372 kBuild-0.1.9998-pre20131130-src.tar.xz
- b3dd26cc185c96658d9b554eef2f811c lchmod.patch
--90cae3b53b4ec6fc5f1c336922083df0 strlcpy.patch
-+9b101e058900afb9986689076a214d54 strlcpy.patch
- ca09174d7c885fdea1e3c2dc580d80b3 underlinking.patch
- 52c3450a3e2645f57871b0141c465776 sys_siglist.patch
- 2fdb2fb96c48371b2a15785926c9144b kbuild-0.1.9998_pre20110817-gcc-4.7.patch
--b3c2d0e6902f1285c09d81f74e573c4f uclibc.patch"
-+4fda881d60b2c80502ad4321d18161a4 0001-define-ALLPERMS-is-missing.patch
-+a4ad5a3bf960394856b9fafecfe921d4 sys-types.patch
-+b3c2d0e6902f1285c09d81f74e573c4f uclibc.patch
-+e92680df9641e25dd4a58e6a2733dbea kobjcache.patch
-+4d8f14019970a974b6fde15fd4b991d9 obstack.patch
-+b0c55468f3d4c0800687d16c37bf111f glob.patch"
-+sha256sums="def0a44cc0a91b6aa8a80f73ace0cfc315f298ba3e0d3d81fe52834091b68586 kBuild-0.1.9998-pre20131130-src.tar.xz
-+79909f11e631757140c5095af1347c9f48c065f25cdd875c555477529ca6a693 lchmod.patch
-+132305af7aa1cc94f4920ffe97775efcb6f0495f165035051298984d9f5ca4c0 strlcpy.patch
-+1c99c0579af3d9cf4148b7b61d98b92ff86eaec441b6630754007ae3c3b5a2cc underlinking.patch
-+8adb0ffa45a0b49737bbde54b54405a7708a2281d608d8f713437fce77e11d07 sys_siglist.patch
-+420caeee42dca3fa9a474faa3ae6e34a884d26792ab3b6567a3b9ecf678a90e7 kbuild-0.1.9998_pre20110817-gcc-4.7.patch
-+c308a64bddc997826ee83dc8f165ad5072368cb2c837a97308e69238a0390d7e 0001-define-ALLPERMS-is-missing.patch
-+21ec6669485f97e0af37f3120bea2f688ed96df9c59a89cf1043645464db7a46 sys-types.patch
-+1f581e0cf8fefae174c8aeb1b279e956fc7712146bf4a58451f0b318795309e9 uclibc.patch
-+1f9788d65c597346f64cd2513875ed65d4ac199ce879dc313ce2970f40013f77 kobjcache.patch
-+7093e35ca03c4b82961157225c5509c42b9996128b31b5ec32154a72c154848e obstack.patch
-+e13e0f02132824e07b3895666ab1952672a85a246e68e854d714dd8acdc0d445 glob.patch"
-+sha512sums="66f418c0e052389d2b5cfc4d46bc8598ceaeded369151047e455e921bef494ec42099cdc368d24b572eacd809bb7c124d07e0fab54788af01664b72f571fb047 kBuild-0.1.9998-pre20131130-src.tar.xz
-+3ab991b13a122e82125392d01e27ad8c06f2b5f5e0c5bb2fa024fdcf16a65f5f460c14222d84d50b31a2ad4040c89871ee2a47f885eca329c15bb9abb3f8f5df lchmod.patch
-+fbab0dc51f4e2d14b020a6b63820a26eeee884ac9cfd5b59a6afc6243ffb7679c775ed8529f6161917bf3cc5e2a651c959706cdc404a4a79c1b29cc9f3a614a5 strlcpy.patch
-+839c12659ae81e99c0c2f35f045ef8651c2d30ddb391ae76995ded6df19f4ca5ae728da96c16b7aab08cdf447030de645455751122a390755e0ff46c03cb23d6 underlinking.patch
-+2e0cb32b6e296d92c4c092f798e83eee1fe49753826426fd957f9977149b64487547f71bde64b654a3f3a0511dfa9ac1c533ad0cd469c7bdd7e0acdfa3c2e3ac sys_siglist.patch
-+7a0618e9dbd18ba10f1afd9c2a47f6efb136143a86008d2562eb2ff704f289b7150bbc10f2e3c57341b485252366ff46d49bd70c24cadba45f09496333ceaa76 kbuild-0.1.9998_pre20110817-gcc-4.7.patch
-+4bdcae4362ff0ac6b401c65120f54e395a41b98d4bdea796a1e85405c3444853b94626c2be6d9d703ffd904fb89ea0a14d1e847a67eb56d81faf48246220e166 0001-define-ALLPERMS-is-missing.patch
-+58ae3ec4a1535fddd4af67803c081c9ca4cd66244ea2a7ddfbf59eb5b849421377116376d893d5e643a15413b902463affa51153afeb2d2217bac135122b66a5 sys-types.patch
-+41d568b05af4d9f650e736cafc4fd4285cc592726de1ee3f599b26cf2277a9436477ff512b99c2dbe1abc3d21cb9d4f24a0568aa71418e2114e294171cc008f0 uclibc.patch
-+7afcc78589ee66c60dd7a73819b4776531a4fc0f73c8a8824f4b53967f7c903095206455d2b113288ad4cf337e67c0dc82cd679b994096c5d9270f83d55689ad kobjcache.patch
-+dae18964bb4c7f46e277b147bae53cabb03d5bbd6199ec5a8deeaf6a6d12804b281ea6debf7eda44fee3bff12d6097d7b46385617a446e2a2a7570d83d03eb8e obstack.patch
-+f843176d1ed988965947f0243b31b02431c3467249576fbac64cb561d7d64da71bdcadbd4eb4d36ed5f4483c1ac146c57f7f1f60bdbabaea2c0cd2dc80ed0446 glob.patch"
-diff --git a/testing/kbuild/allperms.patch b/testing/kbuild/allperms.patch
-new file mode 100644
-index 0000000..2e8bfbf
---- /dev/null
-+++ b/testing/kbuild/allperms.patch
-@@ -0,0 +1,30 @@
-+diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c
-+index 792a286..8edce38 100644
-+--- a/src/kmk/kmkbuiltin/chmod.c
-++++ b/src/kmk/kmkbuiltin/chmod.c
-+@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
-+ #include "getopt.h"
-+ #include "kmkbuiltin.h"
-+
-++#ifndef ALLPERMS
-++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-++#endif
-++
-+ extern void * bsd_setmode(const char *p);
-+ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
-+ extern void bsd_strmode(mode_t mode, char *p);
-+diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c
-+index 13bec72..08d8ffe 100644
-+--- a/src/kmk/kmkbuiltin/install.c
-++++ b/src/kmk/kmkbuiltin/install.c
-+@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
-+ # define IS_SLASH(ch) ((ch) == '/')
-+ #endif
-+
-++#ifndef ALLPERMS
-++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-++#endif
-++
-+ static gid_t gid;
-+ static uid_t uid;
-+ static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given;
-diff --git a/testing/kbuild/glob.patch b/testing/kbuild/glob.patch
-new file mode 100644
-index 0000000..b17f012
---- /dev/null
-+++ b/testing/kbuild/glob.patch
-@@ -0,0 +1,19 @@
-+--- ./src/kmk/Makefile.kmk.orig
-++++ ./src/kmk/Makefile.kmk
-+@@ -60,6 +60,7 @@
-+ TEMPLATE_BIN-KMK_INCS.haiku = glob
-+ TEMPLATE_BIN-KMK_INCS.openbsd = glob
-+ TEMPLATE_BIN-KMK_INCS.solaris = glob
-++TEMPLATE_BIN-KMK_INCS.linux = glob
-+ TEMPLATE_BIN-KMK_LIBS = $(TEMPLATE_BIN-THREADED_LIBS) $(kmkmissing_1_TARGET) $(LIB_KUTIL)
-+ ifdef ELECTRIC_HEAP # for electric heap (see electric.c) - windows only.
-+ ifeq ($(KBUILD_TARGET),win)
-+@@ -108,7 +109,7 @@
-+ glob/fnmatch.c
-+
-+ kmkmissing_SOURCES.linux += \
-+- kmkbuiltin/strlcpy.c
-++ glob/glob.c
-+
-+ kmkmissing_SOURCES.openbsd = \
-+ kmkbuiltin/openbsd.c \
-diff --git a/testing/kbuild/kbuild-0.1.5_p2-qa.patch b/testing/kbuild/kbuild-0.1.5_p2-qa.patch
-deleted file mode 100644
-index 706c3a7..0000000
---- a/testing/kbuild/kbuild-0.1.5_p2-qa.patch
-+++ /dev/null
-@@ -1,26 +0,0 @@
--* warning: implicit declaration of function ‘unlink’
--* warning: too few arguments for format
----- a/src/sed/lib/utils.c
--+++ b/src/sed/lib/utils.c
--@@ -35,6 +35,10 @@
-- # include <stdlib.h>
-- #endif /* HAVE_STDLIB_H */
--
--+#ifdef HAVE_UNISTD_H
--+# include <unistd.h>
--+#endif /* HAVE_UNISTD_H */
--+
-- #include "utils.h"
--
-- const char *myname;
----- a/src/kmk/kmkbuiltin/printf.c
--+++ b/src/kmk/kmkbuiltin/printf.c
--@@ -206,7 +206,7 @@
--
-- (void)funcname;
-- if (rc != 0)
--- fatal (NILF, _("$(%s): failure rc=%d\n"), rc);
--+ fatal (NILF, _("$(%s): failure rc=%d\n"), funcname, rc);
-- return o;
-- }
-- #endif
-diff --git a/testing/kbuild/kobjcache.patch b/testing/kbuild/kobjcache.patch
-new file mode 100644
-index 0000000..4fb4e02
---- /dev/null
-+++ b/testing/kbuild/kobjcache.patch
-@@ -0,0 +1,10 @@
-+--- ./src/kObjCache/kObjCache.c.orig
-++++ ./src/kObjCache/kObjCache.c
-+@@ -38,6 +38,7 @@
-+ #include <errno.h>
-+ #include <assert.h>
-+ #include <sys/stat.h>
-++#include <sys/file.h>
-+ #include <fcntl.h>
-+ #include <limits.h>
-+ #include <ctype.h>
-diff --git a/testing/kbuild/obstack.patch b/testing/kbuild/obstack.patch
-new file mode 100644
-index 0000000..8301a42
---- /dev/null
-+++ b/testing/kbuild/obstack.patch
-@@ -0,0 +1,42 @@
-+--- ./src/sed/Makefile.kmk.orig
-++++ ./src/sed/Makefile.kmk
-+@@ -56,36 +56,30 @@
-+ sed/mbcs.c \
-+ lib/getopt1.c \
-+ lib/getopt.c \
-++ lib/obstack.c \
-+ lib/utils.c
-+ kmk_sed_SOURCES.darwin = \
-+ lib/strverscmp.c \
-+- lib/obstack.c \
-+ lib/getline.c
-+ kmk_sed_SOURCES.dragonfly = \
-+ lib/strverscmp.c \
-+- lib/obstack.c \
-+ lib/getline.c
-+ kmk_sed_SOURCES.freebsd = \
-+ lib/strverscmp.c \
-+- lib/obstack.c \
-+ lib/getline.c
-+ kmk_sed_SOURCES.haiku = \
-+- lib/strverscmp.c \
-+- lib/obstack.c
-++ lib/strverscmp.c
-+ kmk_sed_SOURCES.openbsd = \
-+ lib/strverscmp.c \
-+- lib/obstack.c \
-+ lib/getline.c
-+ kmk_sed_SOURCES.solaris = \
-+- lib/strverscmp.c \
-+- lib/obstack.c
-++ lib/strverscmp.c
-+ ifdef KBUILD_SOLARIS_10
-+ kmk_sed_SOURCES.solaris += \
-+ lib/getline.c
-+ endif
-+ kmk_sed_SOURCES.win = \
-+ lib/strverscmp.c \
-+- lib/obstack.c \
-+ lib/mkstemp.c \
-+ lib/getline.c \
-+ ../lib/startuphacks-win.c
-diff --git a/testing/kbuild/strlcpy.patch b/testing/kbuild/strlcpy.patch
-index 42b25bd..d0b3a04 100644
---- a/testing/kbuild/strlcpy.patch
-+++ b/testing/kbuild/strlcpy.patch
-@@ -7,20 +7,7 @@ index 44b76ab..85fec01 100644
- #include "kbuild_protection.h"
-
- -#if defined(_MSC_VER) || defined(__gnu_linux__) || defined(__linux__)
--+#if defined(_MSC_VER) || defined(__gnu_linux__) || defined(__linux__) && !defined(__UCLIBC__)
-++#if defined(_MSC_VER) || defined(__gnu_linux__) && !defined(__UCLIBC__)
- extern char *strlcpy(char *, const char *, size_t);
- #endif
-
--diff --git a/src/kmk/Makefile.kmk b/src/kmk/Makefile.kmk
--index 12b9697..db1deb2 100644
----- a/src/kmk/Makefile.kmk
--+++ b/src/kmk/Makefile.kmk
--@@ -101,7 +101,7 @@ kmkmissing_SOURCES.freebsd = \
-- glob/fnmatch.c
--
-- kmkmissing_SOURCES.linux += \
--- kmkbuiltin/strlcpy.c
--+ getloadavg.c
--
-- kmkmissing_SOURCES.solaris = \
-- kmkbuiltin/strlcpy.c \
-diff --git a/testing/kbuild/sys-types.patch b/testing/kbuild/sys-types.patch
-new file mode 100644
-index 0000000..dccb48a
---- /dev/null
-+++ b/testing/kbuild/sys-types.patch
-@@ -0,0 +1,14 @@
-+diff --git a/src/kmk/kmkbuiltin/ftsfake.h b/src/kmk/kmkbuiltin/ftsfake.h
-+index 2518d30..5410256 100644
-+--- a/src/kmk/kmkbuiltin/ftsfake.h
-++++ b/src/kmk/kmkbuiltin/ftsfake.h
-+@@ -38,6 +38,9 @@
-+ # include "kmkbuiltin/mscfakes.h"
-+ #endif
-+
-++/* for u_int */
-++#include <sys/types.h>
-++
-+ typedef struct {
-+ struct _ftsent *fts_cur; /* current node */
-+ struct _ftsent *fts_child; /* linked list of children */
---
-1.8.5.2
-
diff --git a/community/kbuild/allperms.patch b/community/kbuild/allperms.patch
deleted file mode 100644
index 2e8bfbfb45..0000000000
--- a/community/kbuild/allperms.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/src/kmk/kmkbuiltin/chmod.c b/src/kmk/kmkbuiltin/chmod.c
-index 792a286..8edce38 100644
---- a/src/kmk/kmkbuiltin/chmod.c
-+++ b/src/kmk/kmkbuiltin/chmod.c
-@@ -66,6 +66,10 @@ static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
- #include "getopt.h"
- #include "kmkbuiltin.h"
-
-+#ifndef ALLPERMS
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- extern void * bsd_setmode(const char *p);
- extern mode_t bsd_getmode(const void *bbox, mode_t omode);
- extern void bsd_strmode(mode_t mode, char *p);
-diff --git a/src/kmk/kmkbuiltin/install.c b/src/kmk/kmkbuiltin/install.c
-index 13bec72..08d8ffe 100644
---- a/src/kmk/kmkbuiltin/install.c
-+++ b/src/kmk/kmkbuiltin/install.c
-@@ -127,6 +127,10 @@ extern mode_t bsd_getmode(const void *bbox, mode_t omode);
- # define IS_SLASH(ch) ((ch) == '/')
- #endif
-
-+#ifndef ALLPERMS
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- static gid_t gid;
- static uid_t uid;
- static int dobackup, docompare, dodir, dopreserve, dostrip, nommap, safecopy, verbose, mode_given;
diff --git a/community/kbuild/getloadavg.patch b/community/kbuild/getloadavg.patch
deleted file mode 100644
index e145ed0e5a..0000000000
--- a/community/kbuild/getloadavg.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/src/kmk/job.c b/src/kmk/job.c
-index 6d14300..16731fc 100644
---- a/src/kmk/job.c
-+++ b/src/kmk/job.c
-@@ -240,6 +240,27 @@ unsigned long job_counter = 0;
-
- unsigned int jobserver_tokens = 0;
-
-+#ifdef __UCLIBC__
-+int getloadavg(double list[], int nelem)
-+{
-+ FILE *LOADAVG;
-+ double avg[3] = { 0.0, 0.0, 0.0 };
-+ int i, res = -1;
-+
-+ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
-+ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
-+ res = 0;
-+ fclose(LOADAVG);
-+ }
-+
-+ for (i = 0; (i < nelem) && (i < 3); i++) {
-+ list[i] = avg[i];
-+ }
-+
-+ return res;
-+}
-+#endif
-+
- #ifdef WINDOWS32
- /*
- * The macro which references this function is defined in make.h.
diff --git a/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch b/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch
deleted file mode 100644
index 2d2d9fbb1c..0000000000
--- a/community/libreswan/0001-posix-use-HOST_NAME_MAX-consitently-from-limits.h.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From ee7952c5112a2b08c1b196cabd946e0b3c3dc74a Mon Sep 17 00:00:00 2001
-From: Antony Antony <antony@phenome.org>
-Date: Mon, 14 Aug 2017 20:52:18 +0200
-Subject: [PATCH] posix: use HOST_NAME_MAX consitently from limits.h
-
----
- lib/libswan/id.c | 5 +----
- ports/linux/include/sysdep.h | 2 +-
- programs/pluto/ikev2_ipseckey.c | 2 +-
- programs/pluto/rcv_whack.c | 4 ----
- 4 files changed, 3 insertions(+), 10 deletions(-)
-
-diff --git a/lib/libswan/id.c b/lib/libswan/id.c
-index 06cc751..b89650a 100644
---- a/lib/libswan/id.c
-+++ b/lib/libswan/id.c
-@@ -22,10 +22,6 @@
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
--#include <unistd.h>
--#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */
--#define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */
--#endif
-
- #include <libreswan.h>
-
-@@ -34,6 +30,7 @@
- #include "libreswan/passert.h"
- #include "lswalloc.h"
- #include "lswlog.h"
-+#include "sysdep.h"
- #include "id.h"
- #include "x509.h"
- #include <cert.h>
-diff --git a/ports/linux/include/sysdep.h b/ports/linux/include/sysdep.h
-index deb2ac1..b782b2c 100644
---- a/ports/linux/include/sysdep.h
-+++ b/ports/linux/include/sysdep.h
-@@ -5,7 +5,7 @@
- #define TimeZoneOffset timezone
-
- #include <limits.h>
--/* POSIX 1003.1-2001 says <unistd.h> defines this */
-+/* POSIX 1003.1-2001 says <limits.h> defines this */
- #ifndef HOST_NAME_MAX
- /* some don't even use _POSIX_HOST_NAME_MAX */
- # ifdef _POSIX_HOST_NAME_MAX
-diff --git a/programs/pluto/ikev2_ipseckey.c b/programs/pluto/ikev2_ipseckey.c
-index 45872ef..1d32d37 100644
---- a/programs/pluto/ikev2_ipseckey.c
-+++ b/programs/pluto/ikev2_ipseckey.c
-@@ -22,7 +22,6 @@
- #include <string.h>
- #include <stddef.h>
- #include <stdlib.h>
--#include <unistd.h>
- #include <errno.h>
- #include <arpa/inet.h> /* for inet_ntop */
- #include <arpa/nameser.h>
-@@ -31,6 +30,7 @@
- #include "unbound-event.h"
- #include "libreswan.h"
- #include "lswlog.h"
-+#include "sysdep.h"
- #include "defs.h"
- #include "log.h"
- #include "constants.h" /* for demux.h */
-diff --git a/programs/pluto/rcv_whack.c b/programs/pluto/rcv_whack.c
-index baa9fdf..9a53ed5 100644
---- a/programs/pluto/rcv_whack.c
-+++ b/programs/pluto/rcv_whack.c
-@@ -28,10 +28,6 @@
- #include <stddef.h>
- #include <stdlib.h>
- #include <string.h>
--#include <unistd.h>
--#ifndef HOST_NAME_MAX /* POSIX 1003.1-2001 says <unistd.h> defines this */
--# define HOST_NAME_MAX 255 /* upper bound, according to SUSv2 */
--#endif
- #include <errno.h>
- #include <sys/types.h>
- #include <sys/socket.h>
---
-2.9.4
-
diff --git a/community/minissdpd/minissdpd-1.2-remove-initd.patch b/community/minissdpd/minissdpd-1.2-remove-initd.patch
deleted file mode 100644
index 9a5f5966e9..0000000000
--- a/community/minissdpd/minissdpd-1.2-remove-initd.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur minissdpd-1.1.20120121.orig//Makefile minissdpd-1.1.20120121/Makefile
---- minissdpd-1.1.20120121.orig//Makefile 2012-01-02 05:46:24.000000000 -0500
-+++ minissdpd-1.1.20120121/Makefile 2012-01-22 07:01:54.000000000 -0500
-@@ -42,10 +42,6 @@
- $(INSTALL) minissdpd $(SBININSTALLDIR)
- $(INSTALL) -d $(MANINSTALLDIR)/man1
- $(INSTALL) minissdpd.1 $(MANINSTALLDIR)/man1/minissdpd.1
--ifneq ($(OS), Darwin)
-- $(INSTALL) -d $(PREFIX)/etc/init.d
-- $(INSTALL) minissdpd.init.d.script $(PREFIX)/etc/init.d/minissdpd
--endif
-
- minissdpd: $(MINISSDPDOBJS)
- $(CC) $(CFLAGS) -o $@ $(MINISSDPDOBJS)
diff --git a/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch b/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
deleted file mode 100644
index 7fa734c4e9..0000000000
--- a/community/mtd-utils/0001-unittests-test_lib-Include-proper-header-for-_IOC_SI.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f602ef9a7de97e4d9fd016b2aaa08ec5b4f86710 Mon Sep 17 00:00:00 2001
-From: Olliver Schinagl <oliver@schinagl.nl>
-Date: Mon, 15 Apr 2019 09:47:34 +0200
-Subject: [PATCH 1/3] unittests/test_lib: Include proper header for _IOC_SIZE
-
-The macro _IOC_SIZE is not part of sys/ioctl.h but lives in asm/ioctl.h
-so we should include the proper header. If we do not, some systems
-complain during linking that they cannot find the symbol _IOC_SIZE()
-which was not expanded by the pre-compiler.
-
-Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
----
- tests/unittests/test_lib.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/unittests/test_lib.h b/tests/unittests/test_lib.h
-index 7a6a003..cd94d9f 100644
---- a/tests/unittests/test_lib.h
-+++ b/tests/unittests/test_lib.h
-@@ -1,3 +1,4 @@
-+#include <asm/ioctl.h>
- #include <stdarg.h>
- #include <setjmp.h>
- #include <stddef.h>
---
-2.20.1
-
diff --git a/community/mtd-utils/0001_mtd-2.1.0_fix_tests.patch b/community/mtd-utils/0001_mtd-2.1.0_fix_tests.patch
deleted file mode 100644
index 76d9dfd9a7..0000000000
--- a/community/mtd-utils/0001_mtd-2.1.0_fix_tests.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- mtd-utils-2.1.0/tests/unittests/test_lib.h.orig 2019-04-15 08:01:29.688043955 +0200
-+++ mtd-utils-2.1.0/tests/unittests/test_lib.h 2019-04-15 08:01:34.884030090 +0200
-@@ -1,3 +1,4 @@
-+#include <asm/ioctl.h>
- #include <stdarg.h>
- #include <setjmp.h>
- #include <stddef.h>
---- mtd-utils-2.1.0/tests/unittests/libmtd_test.c.orig 2019-04-15 08:02:47.535836214 +0200
-+++ mtd-utils-2.1.0/tests/unittests/libmtd_test.c 2019-04-15 08:07:22.583102241 +0200
-@@ -1,3 +1,4 @@
-+#include <fcntl.h>
- #include <stdarg.h>
- #include <setjmp.h>
- #include <stddef.h>
---- mtd-utils-2.1.0/Makefile.in.orig 2019-04-15 09:13:39.149755481 +0200
-+++ mtd-utils-2.1.0/Makefile.in 2019-04-15 09:14:13.689663316 +0200
-@@ -1710,7 +1710,7 @@
- @UNIT_TESTS_TRUE@mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
- @UNIT_TESTS_TRUE@mtdlib_test_LDADD = $(CMOCKA_LIBS)
- @UNIT_TESTS_TRUE@mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write
--@UNIT_TESTS_TRUE@mtdlib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
-+@UNIT_TESTS_TRUE@mtdlib_test_CPPFLAGS = -O0 -D_GNU_SOURCE --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
- @UNIT_TESTS_TRUE@TEST_BINS = \
- @UNIT_TESTS_TRUE@ ubilib_test \
- @UNIT_TESTS_TRUE@ mtdlib_test
diff --git a/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch b/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch
deleted file mode 100644
index ef36ebc8f4..0000000000
--- a/community/mtd-utils/0002-unittests-libmtd_test-Include-fcntl-header.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 051b912155115d0966d90917aa2b601d958461a4 Mon Sep 17 00:00:00 2001
-From: Olliver Schinagl <oliver@schinagl.nl>
-Date: Mon, 15 Apr 2019 09:49:06 +0200
-Subject: [PATCH 2/3] unittests/libmtd_test: Include fcntl header
-
-The test library for the mtd unit tests include various type's and
-macro's that officially live in fcntl. Each file and header should
-always properly include what they use, so lets add the fcntl headers.
-
-Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
----
- tests/unittests/libmtd_test.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/tests/unittests/libmtd_test.c b/tests/unittests/libmtd_test.c
-index 633d94a..176d2ef 100644
---- a/tests/unittests/libmtd_test.c
-+++ b/tests/unittests/libmtd_test.c
-@@ -1,3 +1,4 @@
-+#include <fcntl.h>
- #include <stdarg.h>
- #include <setjmp.h>
- #include <stddef.h>
---
-2.20.1
-
diff --git a/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch b/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch
deleted file mode 100644
index b795317889..0000000000
--- a/community/mtd-utils/0003-unittests-Define-the-use-of-_GNU_SOURCE.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3022a9900380b4547d158ce3cca59b71b5a32780 Mon Sep 17 00:00:00 2001
-From: Olliver Schinagl <oliver@schinagl.nl>
-Date: Mon, 15 Apr 2019 09:50:22 +0200
-Subject: [PATCH 3/3] unittests: Define the use of _GNU_SOURCE
-
-The unittest suite actually makes use of some _GNU extensions during the
-build (loff_t for example). So lets enable this in the makefile.
-
-Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
----
- tests/unittests/Makemodule.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am
-index b7ae575..df1041d 100644
---- a/tests/unittests/Makemodule.am
-+++ b/tests/unittests/Makemodule.am
-@@ -6,7 +6,7 @@ ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/include
- mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
- mtdlib_test_LDADD = $(CMOCKA_LIBS)
- mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write
--mtdlib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
-+mtdlib_test_CPPFLAGS = -O0 -D_GNU_SOURCE --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
-
- TEST_BINS = \
- ubilib_test \
---
-2.20.1
-
diff --git a/community/pgbouncer/const_free.patch b/community/pgbouncer/const_free.patch
deleted file mode 100644
index a422130e50..0000000000
--- a/community/pgbouncer/const_free.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/lib/usual/base.h b/lib/usual/base.h
-index 99b23fe..f835e33 100644
---- a/lib/usual/base.h
-+++ b/lib/usual/base.h
-@@ -327,14 +327,6 @@ void log_fatal(const char *file, int line, const char *func, bool show_perror, v
- #endif
- #endif
-
--/* Fix posix bug by accepting const pointer. */
--static inline void _const_free(const void *p)
--{
-- free((void *)p);
--}
--/** Compat: make free() accept const pointer */
--#define free(x) _const_free(x)
--
- /** Zeroing malloc */
- _MUSTCHECK
- static inline void *zmalloc(size_t len)
diff --git a/community/polkit-elogind/alpine-pam.patch b/community/polkit-elogind/alpine-pam.patch
deleted file mode 100644
index 662e7c4d99..0000000000
--- a/community/polkit-elogind/alpine-pam.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Point /etc/pam.d/polkit-1 to the right PAM files.
-
-diff --git configure.ac configure.ac
-index 36df239..53b5573 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -470,6 +470,11 @@ elif test x$with_os_type = xfreebsd -o x$with_os_type = xnetbsd; then
- PAM_FILE_INCLUDE_ACCOUNT=system
- PAM_FILE_INCLUDE_PASSWORD=system
- PAM_FILE_INCLUDE_SESSION=system
-+elif test x$with_os_type = xalpine; then
-+ PAM_FILE_INCLUDE_AUTH=base-auth
-+ PAM_FILE_INCLUDE_ACCOUNT=base-account
-+ PAM_FILE_INCLUDE_PASSWORD=base-password
-+ PAM_FILE_INCLUDE_SESSION=base-session
- else
- PAM_FILE_INCLUDE_AUTH=system-auth
- PAM_FILE_INCLUDE_ACCOUNT=system-auth
diff --git a/community/racktables/slow-pages.patch b/community/racktables/slow-pages.patch
deleted file mode 100644
index 58c2ddd219..0000000000
--- a/community/racktables/slow-pages.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/wwwroot/inc/interface-lib.php
-+++ b/wwwroot/inc/interface-lib.php
-@@ -403,6 +403,36 @@
- ">";
- }
-
-+//jlee new method start
-+function mkImageButton ($tag, $location_id = '', $title = '', $do_input = FALSE)
-+{
-+ global $image;
-+ if (!isset ($image[$tag]))
-+ $tag = 'error';
-+ $img = $image[$tag];
-+ $img['path'] = '?module=chrome&uri=' . $img['path'];
-+ if ($do_input == TRUE){
-+ echo
-+ "<input type=image name=edit class=edit " .
-+ "src='${img['path']}' " .
-+ "id='${location_id}' " .
-+ "border=0 " .
-+ (!strlen ($title) ? '' : " title='${title}'") . // JT: Add title to input hrefs too
-+ ">";
-+ }
-+ else{
-+ echo
-+ "<img " .
-+ "src='${img['path']}' " .
-+ "width=${img['width']} " .
-+ "height=${img['height']} " .
-+ "border=0 " .
-+ (!strlen ($title) ? '' : "title='${title}'") .
-+ ">";
-+ }
-+}
-+//jlee new method end
-+
- function escapeString ($value, $do_db_escape = FALSE)
- {
- $ret = htmlspecialchars ($value, ENT_QUOTES, 'UTF-8');
-@@ -967,7 +997,6 @@
- foreach ($extra as $inputname => $inputvalue)
- printf ('<input type=hidden name="%s" value="%s">', htmlspecialchars ($inputname, ENT_QUOTES), htmlspecialchars ($inputvalue, ENT_QUOTES));
- }
--
-
- // Display hrefs for all of a file's parents. If scissors are requested,
- // prepend cutting button to each of them.
---- a/wwwroot/inc/interface.php
-+++ b/wwwroot/inc/interface.php
-@@ -616,7 +616,8 @@
- printOpFormIntro ('addRow');
- echo '<tr><td>';
- printImageHREF ('create', 'Add new row', TRUE);
-- echo '</td><td><select name=location_id>';
-+ //echo '</td><td><select name=location_id>';
-+ echo '</td><td><select id=location_id name=location_id>'; //jlee add id
- renderLocationSelectTree ();
- echo '</td><td><input type=text name=name></td><td>';
- printImageHREF ('create', 'Add new row', TRUE);
-@@ -629,16 +630,32 @@
- printNewItemTR ();
- foreach (listCells ('row') as $row_id => $rowInfo)
- {
-+
- echo '<tr><td>';
- if ($rc = $rowInfo['rackc'])
- printImageHREF ('nodestroy', "${rc} rack(s) here");
- else
- echo getOpLink (array('op'=>'deleteRow', 'row_id'=>$row_id), '', 'destroy', 'Delete row');
-- printOpFormIntro ('updateRow', array ('row_id' => $row_id));
-- echo '</td><td>';
-- echo '<select name=location_id>';
-- renderLocationSelectTree ($rowInfo['location_id']);
-- echo "</td><td><input type=text name=name value='${rowInfo['name']}'></td><td>";
-+ printOpFormIntro ('updateRow', array ('row_id' => $row_id));
-+
-+ //jlee start
-+ //echo '</td><td>';
-+ //echo '<select name=location_id>';
-+ //renderLocationSelectTree ($rowInfo['location_id']);
-+ //echo "</td><td><input type=text name=name value='${rowInfo['name']}'></td><td>";
-+ echo '</td><td><div id="location_name" name="location_name">'; //jlee - add div field
-+ echo $rowInfo['location_name'];
-+ echo "</div>";
-+ echo "<input type=hidden id=location_id name=location_id value=".$rowInfo['location_id'].">"; //hidden container to hold final value
-+ echo "</td>";
-+ echo "<td>";
-+ echo "<div id=temp_name name=temp_name value='${rowInfo['name']}'>".$rowInfo['name']."</div>";
-+ echo "<input type=hidden id=name name=name value='".$rowInfo['name']."'>"; //hidden containers to hold final value
-+ echo "</td><td>";
-+
-+ mkImageButton ('pencil', $rowInfo['location_id'], 'Edit row', TRUE); //jlee try adding an edit button
-+ echo "&nbsp;";
-+ //jlee end
- printImageHREF ('save', 'Save changes', TRUE);
- echo "</form></td>";
- echo "<td>" . mkCellA ($rowInfo) . "</td>";
-@@ -648,6 +665,7 @@
- printNewItemTR ();
- echo "</table><br>\n";
- finishPortlet();
-+ addJS('js/inline-row-edit.js'); //jlee add reference to new js file
- }
-
- function renderRow ($row_id)
-Only in b: wwwroot/js/inline-row-edit.js
diff --git a/community/ruby-diff-lcs/gemspec.patch b/community/ruby-diff-lcs/gemspec.patch
deleted file mode 100644
index 9c0b69ecd4..0000000000
--- a/community/ruby-diff-lcs/gemspec.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/rspec-core.gemspec
-+++ b/rspec-core.gemspec
-@@ -13,11 +13,10 @@
- s.summary = "rspec-core-#{RSpec::Core::Version::STRING}"
- s.description = "BDD for Ruby. RSpec runner and example groups."
-
-- s.files = `git ls-files -- lib/*`.split("\n")
-- s.files += %w[README.md LICENSE.md Changelog.md .yardopts .document]
-+ s.files = Dir['lib/**/*']
- s.test_files = []
- s.bindir = 'exe'
-- s.executables = `git ls-files -- exe/*`.split("\n").map{ |f| File.basename(f) }
-+ s.executables = Dir['exe/*'].map{ |f| File.basename(f) }
- s.rdoc_options = ["--charset=UTF-8"]
- s.require_path = "lib"
-
diff --git a/community/ruby-mathematical/disable-test-assert-failing-on-32bit.patch b/community/ruby-mathematical/disable-test-assert-failing-on-32bit.patch
deleted file mode 100644
index 29576ed992..0000000000
--- a/community/ruby-mathematical/disable-test-assert-failing-on-32bit.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Remove assert that fails on 32 bit arch.
-
-Upstream-Issue: https://github.com/gjtorikian/mathematical/issues/72
---- a/test/mathematical/maliciousness_test.rb
-+++ b/test/mathematical/maliciousness_test.rb
-@@ -57,11 +57,6 @@
- output = render.render '$a \ne b$'
- assert_equal output[:data], '$a \ne b$'
- assert_equal output[:exception].class, Mathematical::MaxsizeError
--
-- assert_raises RangeError do
-- render = Mathematical.new({ :maxsize => 4_294_967_295 }) # unsigned long max
-- render.render('$a \ne b$')
-- end
- end
-
- def test_it_does_not_blow_up_on_bad_input
diff --git a/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch b/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
deleted file mode 100644
index 632717f56b..0000000000
--- a/community/rust/0014-Link-stage-2-tools-dynamically-to-libstd.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
-env var was removed and replaced with the following logic in builder.rs.
-
-The idea for this patch is to link stage2 tools dynamically as these will
-be distributed (if built). Intermediate tools from previous stages will
-be statically linked for convenience.
-
-@q66
-
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -1228,6 +1228,8 @@ impl<'a> Builder<'a> {
- // linking all deps statically into the dylib.
- if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
- rustflags.arg("-Cprefer-dynamic");
-+ } else if stage >= 2 {
-+ rustflags.arg("-Cprefer-dynamic");
- }
-
- Cargo {
diff --git a/community/vdr/softhddevice-musl.patch b/community/vdr/softhddevice-musl.patch
deleted file mode 100644
index 8564ef5e72..0000000000
--- a/community/vdr/softhddevice-musl.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/PLUGINS/src/softhddevice/audio.c
-+++ b/PLUGINS/src/softhddevice/audio.c
-@@ -48,6 +48,7 @@
- #include <inttypes.h>
- #include <string.h>
- #include <math.h>
-+#include <sched.h>
-
- #include <libintl.h>
- #define _(str) gettext(str) ///< gettext shortcut
-@@ -1584,7 +1585,7 @@
- if (err < 0) { // underrun error
- return -1;
- }
-- pthread_yield();
-+ sched_yield();
- usleep(OssFragmentTime * 1000); // let fill/empty the buffers
- return 0;
- }
diff --git a/community/virt-manager/dont-double-create-spice-display.patch b/community/virt-manager/dont-double-create-spice-display.patch
deleted file mode 100644
index c9a3a9c080..0000000000
--- a/community/virt-manager/dont-double-create-spice-display.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5f497cba41785fc5532633811001958f99573f9b Mon Sep 17 00:00:00 2001
-From: Cole Robinson <crobinso@redhat.com>
-Date: Tue, 09 Jul 2013 21:50:05 +0000
-Subject: console: Don't double create spice display
-
-I can't reproduce, but a couple gentoo users have issues that this
-fixes:
-
-https://bugzilla.redhat.com/show_bug.cgi?id=981975
----
-diff --git a/virtManager/console.py b/virtManager/console.py
-index 51175c0..553c022 100644
---- a/virtManager/console.py
-+++ b/virtManager/console.py
-@@ -536,7 +536,8 @@ class SpiceViewer(Viewer):
- channel.connect_after("channel-event", self._main_channel_event_cb)
- return
-
-- if type(channel) == SpiceClientGLib.DisplayChannel:
-+ if (type(channel) == SpiceClientGLib.DisplayChannel and
-+ not self.display):
- channel_id = channel.get_property("channel-id")
-
- if channel_id != 0:
---
-cgit v0.9.1
diff --git a/community/vlc/fix-test-endian.patch b/community/vlc/fix-test-endian.patch
deleted file mode 100644
index 3b08e068ac..0000000000
--- a/community/vlc/fix-test-endian.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/modules/video_chroma/copy.c b/modules/video_chroma/copy.c
-index 67e147637b..d9b029274c 100644
---- a/modules/video_chroma/copy.c
-+++ b/modules/video_chroma/copy.c
-@@ -34,6 +34,7 @@
- #include <vlc_picture.h>
- #include <vlc_cpu.h>
- #include <assert.h>
-+#include <arpa/inet.h>
-
- #include "copy.h"
-
-@@ -983,10 +984,10 @@ static void piccheck(picture_t *pic, const vlc_chroma_description_t *dsc,
-
- assert(pic->i_planes == 2 || pic->i_planes == 3);
- const uint8_t colors_8_P[3] = { 0x42, 0xF1, 0x36 };
-- const uint16_t color_8_UV = 0x36F1;
-+ const uint16_t color_8_UV = ntohs(0xF136);
-
-- const uint16_t colors_16_P[3] = { 0x4210, 0x14F1, 0x4536 };
-- const uint32_t color_16_UV = 0x453614F1;
-+ const uint16_t colors_16_P[3] = { ntohs(0x1042), ntohs(0xF114), ntohs(0x3645) };
-+ const uint32_t color_16_UV = ntohl(0xF1143645);
-
- assert(dsc->pixel_size == 1 || dsc->pixel_size == 2);
- if (dsc->pixel_size == 1)
diff --git a/community/zenity/zenity-2.32.1-libnotify-0.7.patch b/community/zenity/zenity-2.32.1-libnotify-0.7.patch
deleted file mode 100644
index 8b7fee738e..0000000000
--- a/community/zenity/zenity-2.32.1-libnotify-0.7.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- ./src/notification.c
-+++ ./src/notification.c
-@@ -30,6 +30,9 @@
-
- #ifdef HAVE_LIBNOTIFY
- #include <libnotify/notify.h>
-+#ifndef NOTIFY_CHECK_VERSION
-+#define NOTIFY_CHECK_VERSION(x,y,z) 0
-+#endif
- #endif
-
- #include "zenity.h"
-@@ -184,10 +187,14 @@
- icon = freeme = g_filename_to_uri (icon_file, NULL, NULL);
- }
-
-+#if NOTIFY_CHECK_VERSION (0, 7, 0)
-+ /* notify_notification_new_with_status_icon was removed */
-+#else
- notif = notify_notification_new_with_status_icon (
- message[0] /* title */,
- message[1] /* summary */,
- icon, status_icon);
-+#endif
-
- g_strfreev (message);
- g_free (freeme);