x86: add CVT{,T}PS2PI cases to xmmwords test
[deliverable/binutils-gdb.git] / ld / emultempl / mipself.em
index c7c164274e7b9fbcfce221f3f48b46d149b0f0cd..ec908d738dce2518ca45f798ecdb6f58099b80fe 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2019 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 # MA 02110-1301, USA.
 
+case ${target} in
+  *-*-*gnu*)
+    gnu_target=TRUE
+    ;;
+  *)
+    gnu_target=FALSE
+    ;;
+esac
+
 fragment <<EOF
 
 #include "ldctor.h"
@@ -35,6 +44,7 @@ static bfd *stub_bfd;
 
 static bfd_boolean insn32;
 static bfd_boolean ignore_branch_isa;
+static bfd_boolean compact_branches;
 
 static void
 mips_after_parse (void)
@@ -203,10 +213,14 @@ mips_create_output_section_statements (void)
 
   htab = elf_hash_table (&link_info);
   if (is_elf_hash_table (htab) && is_mips_elf (link_info.output_bfd))
-    _bfd_mips_elf_linker_flags (&link_info, insn32, ignore_branch_isa);
+    _bfd_mips_elf_linker_flags (&link_info, insn32, ignore_branch_isa,
+                               ${gnu_target});
 
   if (is_mips_elf (link_info.output_bfd))
-    _bfd_mips_elf_init_stubs (&link_info, mips_add_stub_section);
+    {
+      _bfd_mips_elf_compact_branches (&link_info, compact_branches);
+      _bfd_mips_elf_init_stubs (&link_info, mips_add_stub_section);
+    }
 }
 
 /* This is called after we have merged the private data of the input bfds.  */
@@ -259,7 +273,9 @@ enum
     OPTION_INSN32 = 301,
     OPTION_NO_INSN32,
     OPTION_IGNORE_BRANCH_ISA,
-    OPTION_NO_IGNORE_BRANCH_ISA
+    OPTION_NO_IGNORE_BRANCH_ISA,
+    OPTION_COMPACT_BRANCHES,
+    OPTION_NO_COMPACT_BRANCHES
   };
 '
 
@@ -268,6 +284,8 @@ PARSE_AND_LIST_LONGOPTS='
   { "no-insn32", no_argument, NULL, OPTION_NO_INSN32 },
   { "ignore-branch-isa", no_argument, NULL, OPTION_IGNORE_BRANCH_ISA },
   { "no-ignore-branch-isa", no_argument, NULL, OPTION_NO_IGNORE_BRANCH_ISA },
+  { "compact-branches", no_argument, NULL, OPTION_COMPACT_BRANCHES },
+  { "no-compact-branches", no_argument, NULL, OPTION_NO_COMPACT_BRANCHES },
 '
 
 PARSE_AND_LIST_OPTIONS='
@@ -285,6 +303,12 @@ PARSE_AND_LIST_OPTIONS='
   --no-ignore-branch-isa      Reject invalid branch relocations requiring\n\
                               an ISA mode switch\n"
                   ));
+  fprintf (file, _("\
+  --compact-branches          Generate compact branches/jumps for MIPS R6\n"
+                  ));
+  fprintf (file, _("\
+  --no-compact-branches       Generate delay slot branches/jumps for MIPS R6\n"
+                  ));
 '
 
 PARSE_AND_LIST_ARGS_CASES='
@@ -303,6 +327,14 @@ PARSE_AND_LIST_ARGS_CASES='
     case OPTION_NO_IGNORE_BRANCH_ISA:
       ignore_branch_isa = FALSE;
       break;
+
+    case OPTION_COMPACT_BRANCHES:
+      compact_branches = TRUE;
+      break;
+
+    case OPTION_NO_COMPACT_BRANCHES:
+      compact_branches = FALSE;
+      break;
 '
 
 LDEMUL_AFTER_PARSE=mips_after_parse
This page took 0.02399 seconds and 4 git commands to generate.