Commit 1596d018 by Christian Bruel Committed by Christian Bruel

re PR target/65837 ([arm-linux-gnueabihf] lto1 target specific builtin not available)

2015-11-13  Christian Bruel  <christian.bruel@st.com>

	PR target/65837
	* config/arm/arm.c (arm_option_override): Move NEON check...
	(arm_option_check_internal): here
	(arm_file_start): Move .fpu print...
	(arm_declare_function_name): here
	(arm_option_print): Dump current fpu name.
	* config/arm/arm.opt (arm_fpu_index): Mark Save.

From-SVN: r230327
parent e5b2900e
2015-11-13 Christian Bruel <christian.bruel@st.com>
PR target/65837
* config/arm/arm.c (arm_option_override): Move NEON check...
(arm_option_check_internal): here
(arm_file_start): Move .fpu print...
(arm_declare_function_name): here
(arm_option_print): Dump current fpu name.
* config/arm/arm.opt (arm_fpu_index): Mark Save.
2015-11-13 Segher Boessenkool <segher@kernel.crashing.org> 2015-11-13 Segher Boessenkool <segher@kernel.crashing.org>
Kyrylo Tkachov <kyrylo.tkachov@arm.com> Kyrylo Tkachov <kyrylo.tkachov@arm.com>
...@@ -2704,6 +2704,12 @@ static void ...@@ -2704,6 +2704,12 @@ static void
arm_option_check_internal (struct gcc_options *opts) arm_option_check_internal (struct gcc_options *opts)
{ {
int flags = opts->x_target_flags; int flags = opts->x_target_flags;
const struct arm_fpu_desc *fpu_desc = &all_fpus[opts->x_arm_fpu_index];
/* iWMMXt and NEON are incompatible. */
if (TARGET_IWMMXT && TARGET_VFP
&& ARM_FPU_FSET_HAS (fpu_desc->features, FPU_FL_NEON))
error ("iWMMXt and NEON are incompatible");
/* Make sure that the processor choice does not conflict with any of the /* Make sure that the processor choice does not conflict with any of the
other command line choices. */ other command line choices. */
...@@ -3154,10 +3160,6 @@ arm_option_override (void) ...@@ -3154,10 +3160,6 @@ arm_option_override (void)
error ("AAPCS does not support -mcallee-super-interworking"); error ("AAPCS does not support -mcallee-super-interworking");
} }
/* iWMMXt and NEON are incompatible. */
if (TARGET_IWMMXT && TARGET_NEON)
error ("iWMMXt and NEON are incompatible");
/* __fp16 support currently assumes the core has ldrh. */ /* __fp16 support currently assumes the core has ldrh. */
if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE) if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE)
sorry ("__fp16 and no ldrh"); sorry ("__fp16 and no ldrh");
...@@ -25867,7 +25869,6 @@ arm_file_start (void) ...@@ -25867,7 +25869,6 @@ arm_file_start (void)
if (TARGET_BPABI) if (TARGET_BPABI)
{ {
const char *fpu_name;
if (arm_selected_arch) if (arm_selected_arch)
{ {
/* armv7ve doesn't support any extensions. */ /* armv7ve doesn't support any extensions. */
...@@ -25911,23 +25912,14 @@ arm_file_start (void) ...@@ -25911,23 +25912,14 @@ arm_file_start (void)
if (print_tune_info) if (print_tune_info)
arm_print_tune_info (); arm_print_tune_info ();
if (TARGET_SOFT_FLOAT) if (! TARGET_SOFT_FLOAT && TARGET_VFP)
{ {
fpu_name = "softvfp"; if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE)
} arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
else
{
fpu_name = arm_fpu_desc->name;
if (arm_fpu_desc->model == ARM_FP_MODEL_VFP)
{
if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE)
arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
if (TARGET_HARD_FLOAT_ABI) if (TARGET_HARD_FLOAT_ABI)
arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
}
} }
asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name);
/* Some of these attributes only apply when the corresponding features /* Some of these attributes only apply when the corresponding features
are used. However we don't have any easy way of figuring this out. are used. However we don't have any easy way of figuring this out.
...@@ -29766,11 +29758,14 @@ static void ...@@ -29766,11 +29758,14 @@ static void
arm_option_print (FILE *file, int indent, struct cl_target_option *ptr) arm_option_print (FILE *file, int indent, struct cl_target_option *ptr)
{ {
int flags = ptr->x_target_flags; int flags = ptr->x_target_flags;
const struct arm_fpu_desc *fpu_desc = &all_fpus[ptr->x_arm_fpu_index];
fprintf (file, "%*sselected arch %s\n", indent, "", fprintf (file, "%*sselected arch %s\n", indent, "",
TARGET_THUMB2_P (flags) ? "thumb2" : TARGET_THUMB2_P (flags) ? "thumb2" :
TARGET_THUMB_P (flags) ? "thumb1" : TARGET_THUMB_P (flags) ? "thumb1" :
"arm"); "arm");
fprintf (file, "%*sselected fpu %s\n", indent, "", fpu_desc->name);
} }
/* Hook to determine if one function can safely inline another. */ /* Hook to determine if one function can safely inline another. */
...@@ -29979,6 +29974,9 @@ arm_declare_function_name (FILE *stream, const char *name, tree decl) ...@@ -29979,6 +29974,9 @@ arm_declare_function_name (FILE *stream, const char *name, tree decl)
else else
fprintf (stream, "\t.arm\n"); fprintf (stream, "\t.arm\n");
asm_fprintf (asm_out_file, "\t.fpu %s\n", TARGET_SOFT_FLOAT
? "softvfp" : arm_fpu_desc->name);
if (TARGET_POKE_FUNCTION_NAME) if (TARGET_POKE_FUNCTION_NAME)
arm_poke_function_name (stream, (const char *) name); arm_poke_function_name (stream, (const char *) name);
} }
......
...@@ -144,7 +144,7 @@ EnumValue ...@@ -144,7 +144,7 @@ EnumValue
Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE) Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
mfpu= mfpu=
Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Save
Specify the name of the target floating point hardware/format. Specify the name of the target floating point hardware/format.
mhard-float mhard-float
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment