aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm/arm.c
diff options
context:
space:
mode:
authortnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-06 11:20:55 +0000
committertnfchris <tnfchris@138bc75d-0d04-0410-961f-82ee72b054a4>2018-02-06 11:20:55 +0000
commitaa1259b9495f0b2c2395435bd3f5c24fb5b76388 (patch)
treea1d490fb48256cb3cad22305a804c9a41a6b76de /gcc/config/arm/arm.c
parente7fd199cc0ef484730e4fb353aa0a2cc0b99b4c0 (diff)
2018-02-06 Tamar Christina <tamar.christina@arm.com>
PR target/82641 * config/arm/arm.c (arm_print_asm_arch_directives): Record already emitted arch directives. * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and __ARM_FEATURE_COPROC before changing architectures. gcc/testsuite 2018-02-06 Tamar Christina <tamar.christina@arm.com> PR target/82641 * gcc.target/arm/pragma_arch_switch_2.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm/arm.c')
-rw-r--r--gcc/config/arm/arm.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 978c44af327..17feba46619 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -78,6 +78,10 @@
typedef struct minipool_node Mnode;
typedef struct minipool_fixup Mfix;
+/* The last .arch and .fpu assembly strings that we printed. */
+static std::string arm_last_printed_arch_string;
+static std::string arm_last_printed_fpu_string;
+
void (*arm_lang_output_object_attributes_hook)(void);
struct four_ints
@@ -26390,6 +26394,7 @@ arm_print_asm_arch_directives ()
gcc_assert (arch);
asm_fprintf (asm_out_file, "\t.arch %s\n", arm_active_target.arch_name);
+ arm_last_printed_arch_string = arm_active_target.arch_name;
if (!arch->common.extensions)
return;
@@ -26437,13 +26442,17 @@ arm_file_start (void)
asm_fprintf (asm_out_file, "\t.arch_extension idiv\n");
asm_fprintf (asm_out_file, "\t.arch_extension sec\n");
asm_fprintf (asm_out_file, "\t.arch_extension mp\n");
+ arm_last_printed_arch_string = "armv7ve";
}
else
arm_print_asm_arch_directives ();
}
else if (strncmp (arm_active_target.core_name, "generic", 7) == 0)
- asm_fprintf (asm_out_file, "\t.arch %s\n",
- arm_active_target.core_name + 8);
+ {
+ asm_fprintf (asm_out_file, "\t.arch %s\n",
+ arm_active_target.core_name + 8);
+ arm_last_printed_arch_string = arm_active_target.core_name + 8;
+ }
else
{
const char* truncated_name
@@ -30934,10 +30943,6 @@ arm_identify_fpu_from_isa (sbitmap isa)
gcc_unreachable ();
}
-/* The last .arch and .fpu assembly strings that we printed. */
-static std::string arm_last_printed_arch_string;
-static std::string arm_last_printed_fpu_string;
-
/* Implement ASM_DECLARE_FUNCTION_NAME. Output the ISA features used
by the function fndecl. */
void