branch pyro-next updated: gcc6: Upgrade to 6.4.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Is this backport of https://patches.openembedded.org/patch/144961/ ?
Quoted 8,807 lines · On Sat, Mar 3, 2018 at 10:14 AM, <[email protected]> wrote:
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch pyro-next
in repository openembedded-core.The following commit(s) were added to refs/heads/pyro-next by this push:
new 7ad89de gcc6: Upgrade to 6.4.07ad89de is described below
commit
7ad89deb939f542210c4013b65f88cfec6fb3c3c
Author: Juro Bystricky <[email protected]>
AuthorDate: Thu Mar 1 10:32:43 2018 -0800gcc6: Upgrade to 6.4.0
Changed BINV and PV to 6.4.0
Modified BASEURI to load xz tarball instead of bz2Backported series of patches from https://github.com/hjl-tools/gcc.git
branch /hjl/indirect/gcc-6-branch/masterubsan-fix-check-empty-string.patch : removed, already applied CVE-2016-6131.patch: Modified ChangeLog hunk to apply
Tested with:
$ MACHINE=qemux86 bitbake core-image-sato-sdk -ctestimageSigned-off-by Juro Bystricky <[email protected]>--- meta/conf/distro/include/tcmode-default.inc | 2 +- .../gcc/gcc-6.3/ubsan-fix-check-empty-string.patch | 28 - .../gcc/{gcc-6.3.inc => gcc-6.4.inc} | 26 +- .../0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 0 ...ove-struct-ix86_frame-to-machine_function.patch | 241 +++ ...ference-of-struct-ix86_frame-to-avoid-cop.patch | 69 + .../{gcc-6.3 => gcc-6.4}/0002-uclibc-conf.patch | 0 .../0003-gcc-uclibc-locale-ctype_touplow_t.patch | 0 ...nst-reference-of-struct-ix86_frame-to-avo.patch | 126 ++ .../{gcc-6.3 => gcc-6.4}/0004-uclibc-locale.patch | 0 .../gcc-6.4/0004-x86-Add-mindirect-branch.patch | 2149 ++++++++++++++++++++ .../0005-uclibc-locale-no__x.patch | 0 .../gcc-6.4/0005-x86-Add-mfunction-return.patch | 1565 ++++++++++++++ .../0006-uclibc-locale-wchar_fix.patch | 0 .../0006-x86-Add-mindirect-branch-register.patch | 941 +++++++++ .../0007-uclibc-locale-update.patch | 0 .../0007-x86-Add-V-register-operand-modifier.patch | 134 ++ .../0008-missing-execinfo_h.patch | 0 ...w-mindirect-branch-mfunction-return-with-.patch | 299 +++ ...VALID_REGNUM-in-indirect-thunk-processing.patch | 121 ++ .../{gcc-6.3 => gcc-6.4}/0009-c99-snprintf.patch | 0 .../0010-gcc-poison-system-directories.patch | 0 ...INVALID_REGNUM-as-invalid-register-number.patch | 41 + .../0011-gcc-poison-dir-extend.patch | 0 ...date-mfunction-return-for-return-with-pop.patch | 448 ++++ .../0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 0 ...-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch | 999 +++++++++ .../0013-64-bit-multilib-hack.patch | 0 .../0014-optional-libstdc.patch | 0 ...0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 0 .../0016-COLLECT_GCC_OPTIONS.patch | 0 ...efaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | 0 .../0018-fortran-cross-compile-hack.patch | 0 .../0019-cpp-honor-sysroot.patch | 0 .../0020-MIPS64-Default-to-N64-ABI.patch | 0 ...C_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 0 ...0022-gcc-Fix-argument-list-too-long-error.patch | 0 .../{gcc-6.3 => gcc-6.4}/0023-Disable-sdt.patch | 0 .../gcc/{gcc-6.3 => gcc-6.4}/0024-libtool.patch | 0 ...4-pass-fix-v4bx-to-linker-to-support-EABI.patch | 0 ...tilib-config-files-from-B-instead-of-usin.patch | 0 ...-libdir-from-.la-which-usually-points-to-.patch | 0 .../gcc/{gcc-6.3 => gcc-6.4}/0028-export-CPP.patch | 0 ...AltiVec-generation-on-powepc-linux-target.patch | 0 ...-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch | 0 ...Ensure-target-gcc-headers-can-be-included.patch | 0 ...-t-build-with-disable-dependency-tracking.patch | 0 ...h-host-directory-during-relink-if-inst_pr.patch | 0 ...IBS_DIR-replacement-instead-of-hardcoding.patch | 0 .../0035-aarch64-Add-support-for-musl-ldso.patch | 0 ...ibcc1-fix-libcc1-s-install-path-and-rpath.patch | 0 ...-handle-sysroot-support-for-nativesdk-gcc.patch | 0 ...et-sysroot-gcc-version-specific-dirs-with.patch | 0 ...-various-_FOR_BUILD-and-related-variables.patch | 0 .../0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 0 ...shared-to-link-commandline-for-musl-targe.patch | 0 ...c-libcpp-support-ffile-prefix-map-old-new.patch | 0 ...ug-prefix-map-to-replace-ffile-prefix-map.patch | 0 ...-fdebug-prefix-map-support-to-remap-sourc.patch | 0 ...45-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 0 ...bgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 0 ...e-alias-for-__cpu_indicator_init-instead-.patch | 0 .../0048-sync-gcc-stddef.h-with-musl.patch | 0 .../0054_all_nopie-all-flags.patch | 0 .../0055-unwind_h-glibc26.patch | 0 .../gcc/{gcc-6.3 => gcc-6.4}/CVE-2016-6131.patch | 36 +- ...s-canadian_6.3.bb => gcc-cross-canadian_6.4.bb} | 0 ...oss-initial_6.3.bb => gcc-cross-initial_6.4.bb} | 0 .../gcc/{gcc-cross_6.3.bb => gcc-cross_6.4.bb} | 0 ...-initial_6.3.bb => gcc-crosssdk-initial_6.4.bb} | 0 .../{gcc-crosssdk_6.3.bb => gcc-crosssdk_6.4.bb} | 0 .../gcc/{gcc-runtime_6.3.bb => gcc-runtime_6.4.bb} | 0 ...gcc-sanitizers_6.3.bb => gcc-sanitizers_6.4.bb} | 0 .../gcc/{gcc-source_6.3.bb => gcc-source_6.4.bb} | 0 .../gcc/{gcc_6.3.bb => gcc_6.4.bb} | 0 ...libgcc-initial_6.3.bb => libgcc-initial_6.4.bb} | 0 .../gcc/{libgcc_6.3.bb => libgcc_6.4.bb} | 0 .../gcc/{libgfortran_6.3.bb => libgfortran_6.4.bb} | 0 78 files changed, 7173 insertions(+), 52 deletions(-)meta/conf/distro/include/tcmode-default.inc +0
-0@@ -22,7 +22,7 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial= "${TCLIBC}-initial"
PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?=
"nativesdk-glibc-initial"
PREFERRED_PROVIDER_virtual/gettext ??= "gettext"meta/conf/distro/include/tcmode-default.inc +1
-1-GCCVERSION ?= "6.3%" +GCCVERSION ?= "6.4%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.28%" GDBVERSION ?= "7.12%"meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch deleted +0
-4@@ -1,28 +0,0 @@ -From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001 -From: kyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4> -Date: Sat, 3 Sep 2016 10:57:05 +0000 -Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check forempty
- string.meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch deleted +0
-2- -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971138bc75d-0d04-0410-961f-82ee72b054a4
meta/recipes-devtools/gcc/gcc-6.3/ubsan-fix-check-empty-string.patch deleted +0
-21- -Upstream-Status: Backport -Signed-off-by: Joshua Lock <[email protected]> - ---- - gcc/ubsan.c | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -Index: gcc-6.3.0/gcc/ubsan.c -=================================================================== ---- gcc-6.3.0.orig/gcc/ubsan.c -+++ gcc-6.3.0/gcc/ubsan.c -@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) - - expanded_location xloc = expand_location (loc); - if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 -- || xloc.file == '\0' || xloc.file[0] == '\xff' -+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' - || xloc.file[1] == '\xff') - return false; -meta/recipes-devtools/gcc/gcc-6.4.inc renamed from meta/recipes-devtools/gcc/gcc-6.3.inc +2
-3@@ -2,13 +2,13 @@ require gcc-common.inc # Third digit in PV should be incremented after a minor release -PV = "6.3.0" +PV = "6.4.0" # BINV should be incremented to a revision after a minor gcc release -BINV = "6.3.0" +BINV = "6.4.0" -FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.3:${FILE_DIRNAME}/gcc-6.3/backport:"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-6.4:${FILE_DIRNAME}/gcc-6.4/ backport:"DEPENDS =+ "mpfr gmp libmpc zlib"
NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"meta/recipes-devtools/gcc/gcc-6.4.inc renamed from meta/recipes-devtools/gcc/gcc-6.3.inc +1
-1@@ -24,7 +24,7 @@ LIC_FILES_CHKSUM = "\ " -BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2" +BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz" #SRCREV = "bd9a826d5448db11d29d2ec5884e7e679066f140" #BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git"
#BASEURI ?= "ftp://sourceware.org/pub/gcc/snapshots/6.2.0-RC-20160815/
gcc-6.2.0-RC-20160815.tar.bz2"meta/recipes-devtools/gcc/gcc-6.4.inc renamed from meta/recipes-devtools/gcc/gcc-6.3.inc +11
-1@@ -85,10 +85,22 @@ SRC_URI = "\ " BACKPORTS = "\ file://CVE-2016-6131.patch \ - file://ubsan-fix-check-empty-string.patch \ + file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \ + file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \ + file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \ + file://0004-x86-Add-mindirect-branch.patch \ + file://0005-x86-Add-mfunction-return.patch \ + file://0006-x86-Add-mindirect-branch-register.patch \ + file://0007-x86-Add-V-register-operand-modifier.patch \ + file://0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch \ + file://0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch \ + file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \ + file://0011-i386-Update-mfunction-return-for-return-with-pop.patch\
meta/recipes-devtools/gcc/gcc-6.4.inc renamed from meta/recipes-devtools/gcc/gcc-6.3.inc +1
-2+ file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \ " -SRC_URI[md5sum] = "677a7623c7ef6ab99881bc4e048debb6" -SRC_URI[sha256sum] = "f06ae7f3f790fbf0f018f6d40e8444
51e6bc3b7bc96e128e63b09825c1f8b29f"meta/recipes-devtools/gcc/gcc-6.4.inc renamed from meta/recipes-devtools/gcc/gcc-6.3.inc +3
-0+ +SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232" +SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c0
8c4a0852a37ccf36ce69855334d2c914d4"S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" #S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_ renamed from meta/recipes-devtools/gcc/gcc-6.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +0
-0FLAGS_FOR_TARGET.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0001-gcc-4.3.1-ARCH_FLAGS_ FOR_TARGET.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0001-gcc-4.3.1-ARCH_FLAGS_ FOR_TARGET.patch(quoted diff) +0
-0ix86_frame-to-machine_function.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0001-i386-Move-struct-ix86_frame-to-machine_function.patchnew file mode 100644
index 0000000..52093e1meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +0
-0ix86_frame-to-machine_function.patch
meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +88
-1@@ -0,0 +1,241 @@ +From c2c7775c5587dc59b6756162d390d89d60971a16 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/12] 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 <[email protected]> + + * 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 8b5faac..a1ff32b 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,meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +31
-0+ 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 computedfunction. */
meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +18
-0+ + 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))meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +78
-0+ { +@@ -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 8113f83..5414416 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.*/
meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +18
-0+ +-#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))
+ #defineix86_static_chain_on_stack(cfun->machine->static_chain_on_stack)
++#defineix86_red_zone_size(cfun->machine->frame.red_zone_size)meta/recipes-devtools/gcc/gcc-6.4/0001-i386-Move-struct- new file +6
-0+ + /* Control behavior of x86_file_start. */ + #define X86_FILE_START_VERSION_DIRECTIVE false +-- +2.7.4 +(quoted diff) +0
-0reference-of-struct-ix86_frame-to-avoid-cop.patch b/meta/recipes-devtools/gcc/gcc-6.4/0002-i386-Use- reference-of-struct-ix86_frame-to-avoid-cop.patch new file mode 100644
index 0000000..a425b00meta/recipes-devtools/gcc/gcc-6.4/0002-i386-Use- new file +0
-0reference-of-struct-ix86_frame-to-avoid-cop.patch
meta/recipes-devtools/gcc/gcc-6.4/0002-i386-Use- new file +4
-0@@ -0,0 +1,69 @@ +From fe2b3be3f4b6ec6b3a6f89c26016a3983b7cb351 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/12] i386: Use reference of struct ix86_frame to avoidcopy
meta/recipes-devtools/gcc/gcc-6.4/0002-i386-Use- new file +65
-0+ +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 <[email protected]> + + * 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 a1ff32b..13ebf10 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.7.4 +meta/recipes-devtools/gcc/gcc-6.4/0002-uclibc-conf.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0002-uclibc-conf.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc- renamed from meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch +0
-0locale-ctype_touplow_t.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0003-gcc-uclibc-locale- ctype_touplow_t.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0003-gcc-uclibc-locale- ctype_touplow_t.patch(quoted diff) +0
-0reference-of-struct-ix86_frame-to-avo.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patchnew file mode 100644
index 0000000..2fa9474meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +0
-0reference-of-struct-ix86_frame-to-avo.patch
meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +4
-0@@ -0,0 +1,126 @@ +From 82243732dc63e9b90396a5ae4ad99ca36af81355 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/12] i386: Use const reference of struct ix86_frame toavoid
+ copymeta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +16
-0+ +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@257123138bc75d-0d04-0410-961f-82ee72b054a4
+--- + gcc/config/i386/i386.c | 24 ++++++++++++------------+ 1 file changed, 12 insertions(+), 12 deletions(-)
meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +21
-0+ +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 13ebf10..6c98f75 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))meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +25
-0+ { +@@ -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.*/
meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +25
-0+ 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);meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +12
-0+ + /* 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,meta/recipes-devtools/gcc/gcc-6.4/0003-i386-Use-const- new file +18
-0+ 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.7.4 +meta/recipes-devtools/gcc/gcc-6.4/0004-uclibc-locale.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0004-uclibc-locale.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +0
-0mindirect-branch.patch
meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +212
-0@@ -0,0 +1,2149 @@ +From 6140c2c0bb2b61e69d0da84315e0433ff3520aaa Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <[email protected]> +Date: Sat, 6 Jan 2018 22:29:55 -0800 +Subject: [PATCH 04/12] 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 <[email protected]> + + * 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 <[email protected]> + + * 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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +24
-0+ +diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h +index b7f92e3..cc21152 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
meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +9
-0+index ff47bc1..eca4cbf 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, boolload,
meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +29
-0+ enum machine_mode mode); + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 6c98f75..0b9fc4d 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));
+ }meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +27
-0+ + /* 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 functionmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +4
-0+ 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'twant to
+ slow things down too much or calltarget_reinitwhen it isn't
safe. */meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +47
-0+ 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, boolneed_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. IfBND_Pis
++ 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:
++ leaWORD_SIZE(%sp), %sp
++ ret
++ */
++
++static void
++output_indirect_thunk (boolneed_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 (boolneed_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;++
++#ifTARGET_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 intpic_labels_used;meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +329
-0+ + /* 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)meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +4
-0+ 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]]}";
++ }meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +4
-0+ else + xasm = "%!jmp\t%P0"; + } +@@ -27392,9 +27963,17 @@ ix86_output_call_insn (rtx_insn *insn, rtx
call_op)meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+ 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)meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +4
-0+ 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]]}";
++ }meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +21
-0+ 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, treename, tree, int,
+ }meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +8
-0+ + 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, treename, tree, int,
meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +30
-0+ 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_specix86_attribute_table[] =
meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +94
-0+ 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 5414416..9dccdb0 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 d2bfe31..153e162 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 f304b62..5ffa334 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
+ TargetVar(flag_mitigate_rop)Init(0)
+ Attempt to avoid generating instruction sequences containing ret bytes. ++
++mindirect-branch=
++Target Report RejectNegative JoinedEnum(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)meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +5
-0+diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi +index 8cc4f7e..8668dae 100644 +--- a/gcc/doc/extend.texi ++++ b/gcc/doc/extend.texi +@@ -5419,6 +5419,16 @@ Specify which floating-point unit to use. Youmust specify the
+ @code{target("fpmath=sse,387")} option as
+ @code{target("fpmath=sse+387")} because the comma would separate
+ different options.
++
++@itemindirect_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 tablemeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +16
-0+ + On the x86, the inliner does not inline a +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index b066f7b..ff9a194 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 +@@ -24218,6 +24218,17 @@ opcodes, to mitigate against certain forms ofattack. At the moment,
+ this option is limited in what it can do and should not be relied
+ on to provide serious protection.meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +16
-0+ ++@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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..d983e1c +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..58f09b4 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..f20d35c +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..0eff8fb +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +23
-0+new file mode 100644 +index 0000000..a25b20d +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +24
-0+new file mode 100644 +index 0000000..cff114a +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +43
-0+new file mode 100644 +index 0000000..afdb600 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +22
-0+new file mode 100644 +index 0000000..d64d978 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..9306745 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +22
-0+new file mode 100644 +index 0000000..97744d6 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +21
-0+new file mode 100644 +index 0000000..bfce3ea +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +22
-0+new file mode 100644 +index 0000000..0833606 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +21
-0+new file mode 100644 +index 0000000..2eba0fb +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +44
-0+new file mode 100644 +index 0000000..f58427e +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +48
-0+new file mode 100644 +index 0000000..564ed39 +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +18
-1+new file mode 100644 +index 0000000..50fbee2 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-1+new file mode 100644 +index 0000000..2976e67 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-1+new file mode 100644 +index 0000000..da4bc98 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-1+new file mode 100644 +index 0000000..c64d12e +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..49f27b4 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..a1e3eb6 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..395634e +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..fd3f633 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +22
-0+new file mode 100644 +index 0000000..ba2f92b +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +23
-0+new file mode 100644 +index 0000000..0c5a2d4 +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +43
-0+new file mode 100644 +index 0000000..6652523 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..68c0ff7 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +19
-0+new file mode 100644 +index 0000000..e2da1fc +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..244fec7 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +20
-0+new file mode 100644 +index 0000000..107ebe3 +--- /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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +23
-0+new file mode 100644 +index 0000000..17b04ef +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +24
-0+new file mode 100644 +index 0000000..d9eb112 +--- /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.cmeta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +43
-0+new file mode 100644 +index 0000000..d02b1dc +--- /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.7.4meta/recipes-devtools/gcc/gcc-6.4/0004-x86-Add- new file +1
-0+meta/recipes-devtools/gcc/gcc-6.4/0005-uclibc-locale-no__x.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0005-uclibc-locale-no__x. +0
-0patch
rename tometa/recipes-devtools/gcc/gcc-6.4/0005-uclibc-locale-no__x.patchmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +0
-0mfunction-return.patch
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +248
-0@@ -0,0 +1,1565 @@ +From e3270814b9e0caad63fbcdfd7ae9da2d52c97497 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" <[email protected]> +Date: Sat, 6 Jan 2018 22:29:56 -0800 +Subject: [PATCH 05/12] 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 <[email protected]> + + * 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 <[email protected]> + + * 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 <[email protected]> + + 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 <[email protected]> + + 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
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +9
-0+index eca4cbf..620d70e 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, boolload,
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +27
-0+ enum machine_mode mode); + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 0b9fc4d..34e26a3 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 intindirect_thunks_bnd_used;
+ /* Fills in the label name that should be used for the indirect thunk. */meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +13
-0+ + 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)meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +12
-0+ 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)meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +24
-0+ } + 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)
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +9
-0+ 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)
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +37
-0+ 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, boolsibcall_p)meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +9
-0+ 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,meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +9
-0+ 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)meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +47
-0+ 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, treename, tree args, int,
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +29
-0+ } + } + ++ 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_specix86_attribute_table[] =
meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +55
-0+ 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 9dccdb0..b34bc11 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 153e162..2da671e 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 5ffa334..ad5916f 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 JoinedEnum(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 themeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +8
-1-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 8668dae..2cb6bd1 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.
++
++@itemfunction_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 tablemeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +17
-0+ + On the x86, the inliner does not inline a +diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi +index ff9a194..fa63dc5 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 +@@ -24229,6 +24230,17 @@ to external call and return thunk provided in aseparate object file.
+ You can control this behavior for a specific function by using the
+ function attribute @code{indirect_branch}. @xref{Function Attributes}.meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +16
-0+ ++@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.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1+index d983e1c..e365ef5 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1+index 58f09b4..05a51ad 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1+index f20d35c..3c0d4c3 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1+index 0eff8fb..14d4ef6 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1+index a25b20d..b4836c3 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.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1+index cff114a..1f06bd1 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.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1+index afdb600..bc6b47a 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index d64d978..2257be3 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index 9306745..e9cfdc5 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index 97744d6..f938db0 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index bfce3ea..4e58599 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index 0833606..b8d5024 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index 2eba0fb..455adab 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-0+index f58427e..4595b84 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1+index 564ed39..d730d31 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" } */Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-1.cb/gcc/testsuite/gcc.target/i386/ret-thunk-1.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +19
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-10.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +23
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-11.cb/gcc/testsuite/gcc.target/i386/ret-thunk-11.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +23
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-12.cb/gcc/testsuite/gcc.target/i386/ret-thunk-12.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +23
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-13.cb/gcc/testsuite/gcc.target/i386/ret-thunk-13.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +22
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-14.cb/gcc/testsuite/gcc.target/i386/ret-thunk-14.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +24
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-15.cb/gcc/testsuite/gcc.target/i386/ret-thunk-15.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-16.cb/gcc/testsuite/gcc.target/i386/ret-thunk-16.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +24
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-2.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +19
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-3.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +18
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-4.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +18
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-5.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +21
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-6.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +20
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-7.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +19
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-8.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +20
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-9.cmeta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +22
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
} */
++/* { 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.7.4meta/recipes-devtools/gcc/gcc-6.4/0005-x86-Add- new file +1
-0Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0006-uclibc-locale-wchar_fix.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0006-uclibc-locale-wchar_ +0
-0The rest of this diff is not shown. View the raw message.
fix.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0006-uclibc-locale-wchar_ fix.patch(quoted diff) +0
-0mindirect-branch-register.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0006-x86-Add-mindirect-branch-register.patchnew file mode 100644
index 0000000..b6a6ee6meta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +0
-0mindirect-branch-register.patch
meta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +202
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +2
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
constraints.md
meta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +149
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Value(indirect_branch_thunk_inline)
+
+ EnumValue
+Enum(indirect_branch)String(thunk-extern)Value(indirect_branch_thunk_ extern)
++
++mindirect-branch-register
++Target ReportVar(ix86_indirect_branch_register)Init(0) ++Force indirect call and jump via register.
+diff --gita/gcc/config/i386/predicates.mdb/gcc/config/i386/predicates. mdmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +28
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
references.
+ (define_special_predicate"sibcall_insn_operand"meta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +29
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
a specific function by
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.meta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-6.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +19
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
} } */
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +21
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
\\((%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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +19
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
} } */
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-10.cb/gcc/testsuite/gcc.target/i386/ret-thunk-10.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-3Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-11.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-4Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-12.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-4Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-13.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-14.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-2Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-15.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +11
-4Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-9.cmeta/recipes-devtools/gcc/gcc-6.4/0006-x86-Add- new file +13
-3Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0007-uclibc-locale-update.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0007-uclibc-locale-update. +0
-0The rest of this diff is not shown. View the raw message.
patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0007-uclibc-locale-update. patch(quoted diff) +0
-0register-operand-modifier.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0007-x86-Add-V-register-operand-modifier.patchnew file mode 100644
index 0000000..49f9e65meta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +0
-0register-operand-modifier.patch
meta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +47
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
indirect-thunk-register-4.cmeta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +6
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
machine_modemode, bool reverse,meta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +52
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
modifiers and their effects.
+ @tab @code{2}
+ @end multitablemeta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.cmeta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +17
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
target ia32 } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
+--
+2.7.4meta/recipes-devtools/gcc/gcc-6.4/0007-x86-Add-V- new file +1
-0Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0008-missing-execinfo_h. +0
-0The rest of this diff is not shown. View the raw message.
patch
rename tometa/recipes-devtools/gcc/gcc-6.4/0008-missing-execinfo_h.patch(quoted diff) +0
-0mindirect-branch-mfunction-return-with-.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patchnew file mode 100644
index 0000000..4cdb88fmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +0
-0mindirect-branch-mfunction-return-with-.patch
meta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +4
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
return=
+ with -mcmodel=largemeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +56
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
indirect-thunk-attr-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+ create mode 100644gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+ create mode 100644gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+ create mode 100644gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+ create mode 100644gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+ create mode 100644gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+ create mode 100644gcc/testsuite/gcc.target/i386/ret-thunk-21.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +50
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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}, +@@ -24241,6 +24246,12 @@ object file. You can control this behavior for a specific function by
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.meta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +11
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +13
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-9.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-9.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
are not compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +13
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
are not compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +13
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/ret-thunk-17.cb/gcc/testsuite/gcc.target/i386/ret-thunk-17.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +11
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/ret-thunk-18.cb/gcc/testsuite/gcc.target/i386/ret-thunk-18.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +12
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
are not compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/ret-thunk-19.cb/gcc/testsuite/gcc.target/i386/ret-thunk-19.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +12
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/ret-thunk-20.cb/gcc/testsuite/gcc.target/i386/ret-thunk-20.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +13
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
are not compatible" } */
++}
+diff --gita/gcc/testsuite/gcc.target/i386/ret-thunk-21.cb/gcc/testsuite/gcc.target/i386/ret-thunk-21.cmeta/recipes-devtools/gcc/gcc-6.4/0008-x86-Disallow- new file +17
-1Lines of this file are not shown. View the raw message.
(quoted diff) +0
-0The rest of this diff is not shown. View the raw message.
REGNUM-in-indirect-thunk-processing.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patchnew file mode 100644
index 0000000..998a650meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +0
-0REGNUM-in-indirect-thunk-processing.patch
meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +16
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
138bc75d-0d04-0410-961f-82ee72b054a4
+--- + gcc/config/i386/i386.c | 30 +++++++++++++++---------------+ 1 file changed, 15 insertions(+), 15 deletions(-)
meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +7
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +20
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
bool
need_bnd_p,meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
bool
need_bnd_p,meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +18
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 ismeta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
int regno)
meta/recipes-devtools/gcc/gcc-6.4/0009-Use-INVALID_ new file +32
-0Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0009-c99-snprintf.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0009-c99-snprintf.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison- renamed from meta/recipes-devtools/gcc/gcc-6.3/0010-gcc-poison-system-directories.patch +0
-0The rest of this diff is not shown. View the raw message.
system-directories.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0010-gcc-poison-system- directories.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0010-gcc-poison-system- directories.patch(quoted diff) +0
-0INVALID_REGNUM-as-invalid-register-number.patch b/meta/recipes-devtools/gcc/gcc-6.4/0010-i386-Pass- INVALID_REGNUM-as-invalid-register-number.patch new file mode 100644
index 0000000..2f185d9meta/recipes-devtools/gcc/gcc-6.4/0010-i386-Pass- new file +0
-0INVALID_REGNUM-as-invalid-register-number.patch
meta/recipes-devtools/gcc/gcc-6.4/0010-i386-Pass- new file +4
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
number
meta/recipes-devtools/gcc/gcc-6.4/0010-i386-Pass- new file +7
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
138bc75d-0d04-0410-961f-82ee72b054a4
+--- + gcc/config/i386/i386.c | 5 +++--+ 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/gcc-6.4/0010-i386-Pass- new file +27
-0Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir-extend.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0011-gcc-poison-dir- +0
-0The rest of this diff is not shown. View the raw message.
extend.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0011-gcc-poison-dir- extend.patch(quoted diff) +0
-0mfunction-return-for-return-with-pop.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0011-i386-Update-mfunction-return-for-return-with-pop.patchnew file mode 100644
index 0000000..ca5dfe1meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +0
-0mfunction-return-for-return-with-pop.patch
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +67
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
h
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +13
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
load,
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +35
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
int regno,
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +18
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
unsigned int regno)
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +25
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
char *xasm,
meta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +159
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/ret-thunk-22.cmeta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +15
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-23.cb/gcc/testsuite/gcc.target/i386/ret-thunk-23.cmeta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +15
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-24.cb/gcc/testsuite/gcc.target/i386/ret-thunk-24.cmeta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +15
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-25.cb/gcc/testsuite/gcc.target/i386/ret-thunk-25.cmeta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +15
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-26.cb/gcc/testsuite/gcc.target/i386/ret-thunk-26.cmeta/recipes-devtools/gcc/gcc-6.4/0011-i386-Update- new file +48
-0Lines of this file are not shown. View the raw message.
(quoted diff) +0
-0The rest of this diff is not shown. View the raw message.
SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0012-gcc-4.3.3-SYSROOT_ CFLAGS_FOR_TARGET.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0012-gcc-4.3.3-SYSROOT_ CFLAGS_FOR_TARGET.patchmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ renamed from meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch +0
-0INDIRECT_BRANCH_REGISTER.patch
new file mode 100644
index 0000000..ca460f4meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +0
-0INDIRECT_BRANCH_REGISTER.patch
meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +189
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
constraints.md
meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +109
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
"U")
meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +38
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
md
meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +31
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
b/gcc/testsuite/gcc.target/i386/indirect-thunk-1.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-2.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-3.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-4.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-5.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +10
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-6.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +12
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-7.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
} } */
++/* { 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
*/
+-/* { 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +10
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +12
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
{ { ! 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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +9
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.cb/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.cmeta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +8
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-10.cb/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+index e6fea84..af9023a 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-11.cb/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+index e239ec4..ba467c5 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-12.cb/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+index fa31813..43e57ca 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-13.cb/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+index fd5b41f..55f156c 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-14.cb/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+index d606373..1c79043 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-15.cb/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+index 75e45e2..58aba31 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 --gita/gcc/testsuite/gcc.target/i386/ret-thunk-9.cb/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+index d1db41c..d2df8b8 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.7.4meta/recipes-devtools/gcc/gcc-6.4/0012-i386-Add-TARGET_ new file +1
-0Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0013-64-bit-multilib-hack. +0
-0The rest of this diff is not shown. View the raw message.
patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0013-64-bit-multilib-hack. patchmeta/recipes-devtools/gcc/gcc-6.4/0014-optional-libstdc.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0014-optional-libstdc.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_ renamed from meta/recipes-devtools/gcc/gcc-6.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch +0
-0RELAX_PIC_CALLS-bit.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0015-gcc-disable-MASK_ RELAX_PIC_CALLS-bit.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0015-gcc-disable-MASK_ RELAX_PIC_CALLS-bit.patchmeta/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0016-COLLECT_GCC_OPTIONS. +0
-0patch
rename tometa/recipes-devtools/gcc/gcc-6.4/0016-COLLECT_GCC_OPTIONS.patch(quoted diff) +0
-0h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0017-Use-the-defaults.h- in-B-instead-of-S-and-t-oe-in-B.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0017-Use-the-defaults.h- in-B-instead-of-S-and-t-oe-in-B.patchmeta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross-compile-hack.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0018-fortran-cross- +0
-0compile-hack.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0018-fortran-cross- compile-hack.patchmeta/recipes-devtools/gcc/gcc-6.4/0019-cpp-honor-sysroot.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0019-cpp-honor-sysroot.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to-N64-ABI.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0020-MIPS64-Default-to- +0
-0N64-ABI.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0020-MIPS64-Default-to- N64-ABI.patch(quoted diff) +0
-0DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0021-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0021-Define-GLIBC_DYNAMIC_ LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0021-Define-GLIBC_DYNAMIC_ LINKER-and-UCLIBC_DYNAMIC_LINKE.patchmeta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument- renamed from meta/recipes-devtools/gcc/gcc-6.3/0022-gcc-Fix-argument-list-too-long-error.patch +0
-0list-too-long-error.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0022-gcc-Fix-argument- list-too-long-error.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0022-gcc-Fix-argument- list-too-long-error.patchmeta/recipes-devtools/gcc/gcc-6.4/0023-Disable-sdt.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0023-Disable-sdt.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/0024-libtool.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0024-libtool.patch +0
-0(quoted diff) +0
-0fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0025-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0025-gcc-armv4-pass-fix- v4bx-to-linker-to-support-EABI.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0025-gcc-armv4-pass-fix- v4bx-to-linker-to-support-EABI.patch(quoted diff) +0
-0config-files-from-B-instead-of-usin.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0026-Use-the-multilib-config-files-from-B-instead-of-usin.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0026-Use-the-multilib- config-files-from-B-instead-of-usin.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0026-Use-the-multilib- config-files-from-B-instead-of-usin.patch(quoted diff) +0
-0libdir-from-.la-which-usually-points-to-.patch b/meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using- libdir-from-.la-which-usually-points-to-.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0027-Avoid-using-libdir- from-.la-which-usually-points-to-.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0027-Avoid-using-libdir- from-.la-which-usually-points-to-.patchmeta/recipes-devtools/gcc/gcc-6.4/0028-export-CPP.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0028-export-CPP.patch +0
-0(quoted diff) +0
-0AltiVec-generation-on-powepc-linux-target.patch b/meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE- AltiVec-generation-on-powepc-linux-target.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0029-Enable-SPE-AltiVec- generation-on-powepc-linux-target.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0029-Enable-SPE-AltiVec- generation-on-powepc-linux-target.patch(quoted diff) +0
-0MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the- MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0030-Disable-the-MULTILIB_ OSDIRNAMES-and-other-multilib-o.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0030-Disable-the-MULTILIB_ OSDIRNAMES-and-other-multilib-o.patch(quoted diff) +0
-0gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0031-Ensure-target-gcc-headers-can-be-included.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0031-Ensure-target-gcc- headers-can-be-included.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0031-Ensure-target-gcc- headers-can-be-included.patch(quoted diff) +0
-0build-with-disable-dependency-tracking.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0032-gcc-4.8-won-t-build-with-disable-dependency-tracking.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0032-gcc-4.8-won-t-build- with-disable-dependency-tracking.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0032-gcc-4.8-won-t-build- with-disable-dependency-tracking.patch(quoted diff) +0
-0host-directory-during-relink-if-inst_pr.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0033-Don-t-search-host-directory-during-relink-if-inst_pr.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0033-Don-t-search-host- directory-during-relink-if-inst_pr.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0033-Don-t-search-host- directory-during-relink-if-inst_pr.patch(quoted diff) +0
-0DIR-replacement-instead-of-hardcoding.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0034-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0034-Use-SYSTEMLIBS_DIR- replacement-instead-of-hardcoding.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0034-Use-SYSTEMLIBS_DIR- replacement-instead-of-hardcoding.patchmeta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add- renamed from meta/recipes-devtools/gcc/gcc-6.3/0035-aarch64-Add-support-for-musl-ldso.patch +0
-0support-for-musl-ldso.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0035-aarch64-Add-support- for-musl-ldso.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0035-aarch64-Add-support- for-musl-ldso.patch(quoted diff) +0
-0libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0036-libcc1-fix-libcc1-s-install-path-and-rpath.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0036-libcc1-fix-libcc1-s- install-path-and-rpath.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0036-libcc1-fix-libcc1-s- install-path-and-rpath.patch(quoted diff) +0
-0support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0037-handle-sysroot-support-for-nativesdk-gcc.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0037-handle-sysroot- support-for-nativesdk-gcc.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0037-handle-sysroot- support-for-nativesdk-gcc.patch(quoted diff) +0
-0sysroot-gcc-version-specific-dirs-with.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0038-Search-target-sysroot-gcc-version-specific-dirs-with.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0038-Search-target- sysroot-gcc-version-specific-dirs-with.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0038-Search-target- sysroot-gcc-version-specific-dirs-with.patch(quoted diff) +0
-0BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0039-Fix-various-_FOR_BUILD-and-related-variables.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0039-Fix-various-_FOR_ BUILD-and-related-variables.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0039-Fix-various-_FOR_ BUILD-and-related-variables.patchmeta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define- renamed from meta/recipes-devtools/gcc/gcc-6.3/0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch +0
-0MUSL_DYNAMIC_LINKER.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0040-nios2-Define-MUSL_ DYNAMIC_LINKER.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0040-nios2-Define-MUSL_ DYNAMIC_LINKER.patch(quoted diff) +0
-0nonshared-to-link-commandline-for-musl-targe.patch b/meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_ nonshared-to-link-commandline-for-musl-targe.patch similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0041-Add-ssp_nonshared-to- link-commandline-for-musl-targe.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0041-Add-ssp_nonshared-to- link-commandline-for-musl-targe.patch(quoted diff) +0
-0support-ffile-prefix-map-old-new.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0042-gcc-libcpp-support-ffile-prefix-map-old-new.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0042-gcc-libcpp-support- ffile-prefix-map-old-new.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0042-gcc-libcpp-support- ffile-prefix-map-old-new.patch(quoted diff) +0
-0prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0043-Reuse-fdebug-prefix- map-to-replace-ffile-prefix-map.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0043-Reuse-fdebug-prefix- map-to-replace-ffile-prefix-map.patch(quoted diff) +0
-0fdebug-prefix-map-support-to-remap-sourc.patch b/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c- fdebug-prefix-map-support-to-remap-sourc.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug- prefix-map-support-to-remap-sourc.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug- prefix-map-support-to-remap-sourc.patchmeta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob- renamed from meta/recipes-devtools/gcc/gcc-6.3/0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch +0
-0to-use-ldbl-128-on-ppc.patch
similarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0045-libgcc-Add-knob-to- use-ldbl-128-on-ppc.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0045-libgcc-Add-knob-to- use-ldbl-128-on-ppc.patch(quoted diff) +0
-0using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0046-Link-libgcc-using- LDFLAGS-not-just-SHLIB_LDFLAGS.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0046-Link-libgcc-using- LDFLAGS-not-just-SHLIB_LDFLAGS.patch(quoted diff) +0
-0alias-for-__cpu_indicator_init-instead-.patch b/meta/recipes-devtools/gcc/
gcc-6.4/0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patchsimilarity index 100%
rename from meta/recipes-devtools/gcc/gcc-6.3/0047-libgcc_s-Use-alias- for-__cpu_indicator_init-instead-.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0047-libgcc_s-Use-alias- for-__cpu_indicator_init-instead-.patchmeta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h-with-musl.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0048-sync-gcc-stddef.h- +0
-0with-musl.patch
rename to meta/recipes-devtools/gcc/gcc-6.4/0048-sync-gcc-stddef.h- with-musl.patchmeta/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0054_all_nopie-all-flags. +0
-0patch
rename tometa/recipes-devtools/gcc/gcc-6.4/0054_all_nopie-all-flags.patchmeta/recipes-devtools/gcc/gcc-6.4/0055-unwind_h-glibc26.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/0055-unwind_h-glibc26.patch +0
-0meta/recipes-devtools/gcc/gcc-6.4/CVE-2016-6131.patch renamed from meta/recipes-devtools/gcc/gcc-6.3/CVE-2016-6131.patch +20
-16Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-cross-canadian_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-cross-canadian_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-cross-initial_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-cross-initial_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-cross_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-cross_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-crosssdk-initial_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-crosssdk_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-crosssdk_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-runtime_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-runtime_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-sanitizers_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-sanitizers_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc-source_6.4.bb renamed from meta/recipes-devtools/gcc/gcc-source_6.3.bb +0
-0meta/recipes-devtools/gcc/gcc_6.4.bb renamed from meta/recipes-devtools/gcc/gcc_6.3.bb +0
-0meta/recipes-devtools/gcc/libgcc-initial_6.4.bb renamed from meta/recipes-devtools/gcc/libgcc-initial_6.3.bb +0
-0meta/recipes-devtools/gcc/libgcc_6.4.bb renamed from meta/recipes-devtools/gcc/libgcc_6.3.bb +0
-0meta/recipes-devtools/gcc/libgfortran_6.4.bb renamed from meta/recipes-devtools/gcc/libgfortran_6.3.bb +0
-1Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
To stop receiving notification emails like this one, please contact the administrator of this repository.
--
_______________________________________________
Openembedded-commits mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Part of the diff is not shown here. View the raw message.