This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, ARM]Update GCC to generate Tag_ABI_HardFP_use per the latest EABI doc


On 14/01/15 09:54, Terry Guo wrote:
> Hi there,
> 
> According to the latest EABI at
> http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adden
> da.pdf, the new definition of Tag_ABI_HardFP_use is as below:
> 
> Tag_ABI_HardFP_use, (=27), uleb128
> 0 The user intended that FP use should be implied by Tag_FP_arch
> 1 The user intended this code to execute on the single-precision variant
>  derived from Tag_FP_arch
> 2 Reserved
> 3 The user intended that FP use should be implied by Tag_FP_arch
>  (Note: This is a deprecated duplicate of the default encoded by 0)
> 

You don't need to emit tags that have the value 0.  That's the default
for missing tags.

So you only need

	if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE)
	  => Tag_ABI_HardFP_use = 1

OK with that change.

R.

> The attached patch intends to update gcc to conform this definition. Tested
> with GCC regression test, no regressions. Is it OK?
> 
> BR,
> Terry
> 
> 2015-01-14  Terry Guo  <terry.guo@arm.com>
> 
>            * config/arm/arm.c (arm_file_start): Update the assignment of
> Tag_ABI_HardFP_use.
> 
> 
> gcc-update-Tag_ABI_HardFP_use-v2.txt
> 
> 
> diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
> index 0ec526b..378bed9 100644
> --- a/gcc/config/arm/arm.c
> +++ b/gcc/config/arm/arm.c
> @@ -25576,7 +25576,13 @@ arm_file_start (void)
>  	  if (arm_fpu_desc->model == ARM_FP_MODEL_VFP)
>  	    {
>  	      if (TARGET_HARD_FLOAT)
> -		arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 3);
> +		{
> +		  if (TARGET_VFP_SINGLE)
> +		    arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
> +		  else
> +		    arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 0);
> +		}
> +
>  	      if (TARGET_HARD_FLOAT_ABI)
>  		arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
>  	    }
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]