[v1] LoongArch: Change DWARF2_CIE_DATA_ALIGNMENT from -8 to -4

Message ID 20240606103144.4165618-1-mengqinggang@loongson.cn
State New
Headers
Series [v1] LoongArch: Change DWARF2_CIE_DATA_ALIGNMENT from -8 to -4 |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed

Commit Message

mengqinggang June 6, 2024, 10:31 a.m. UTC
  Because of 32-bit FCSR regiters, change DWARF2_CIE_DATA_ALIGNMENT from
-8 to -4.
---
 gas/config/tc-loongarch.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Alan Modra June 7, 2024, 12:10 a.m. UTC | #1
On Thu, Jun 06, 2024 at 06:31:44PM +0800, mengqinggang wrote:
> Because of 32-bit FCSR regiters, change DWARF2_CIE_DATA_ALIGNMENT from
> -8 to -4.

Did you run "make check"?

> ---
>  gas/config/tc-loongarch.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h
> index 20434ac8a01..505d3b7b0d0 100644
> --- a/gas/config/tc-loongarch.h
> +++ b/gas/config/tc-loongarch.h
> @@ -113,7 +113,7 @@ extern bool loongarch_frag_align_code (int, int);
>     FDE Code Alignment Factor (DWARF2_LINE_MIN_INSN_LENGTH) should be 1
>     because DW_CFA_advance_loc need to be relocated in bytes
>     when linker relaxation.  */
> -#define DWARF2_CIE_DATA_ALIGNMENT     (-8)
> +#define DWARF2_CIE_DATA_ALIGNMENT     (-4)
>  #define DWARF2_DEFAULT_RETURN_COLUMN  1	    /* FDE Return Address Register.  */
>  
>  #define tc_cfi_frame_initial_instructions	\
> -- 
> 2.38.1
  
mengqinggang June 7, 2024, 1:43 a.m. UTC | #2
在 2024/6/7 上午8:10, Alan Modra 写道:
> On Thu, Jun 06, 2024 at 06:31:44PM +0800, mengqinggang wrote:
>> Because of 32-bit FCSR regiters, change DWARF2_CIE_DATA_ALIGNMENT from
>> -8 to -4.
> Did you run "make check"?
Sorry, I forget it. And I will send a new version patch.
>
>> ---
>>   gas/config/tc-loongarch.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h
>> index 20434ac8a01..505d3b7b0d0 100644
>> --- a/gas/config/tc-loongarch.h
>> +++ b/gas/config/tc-loongarch.h
>> @@ -113,7 +113,7 @@ extern bool loongarch_frag_align_code (int, int);
>>      FDE Code Alignment Factor (DWARF2_LINE_MIN_INSN_LENGTH) should be 1
>>      because DW_CFA_advance_loc need to be relocated in bytes
>>      when linker relaxation.  */
>> -#define DWARF2_CIE_DATA_ALIGNMENT     (-8)
>> +#define DWARF2_CIE_DATA_ALIGNMENT     (-4)
>>   #define DWARF2_DEFAULT_RETURN_COLUMN  1	    /* FDE Return Address Register.  */
>>   
>>   #define tc_cfi_frame_initial_instructions	\
>> -- 
>> 2.38.1
  

Patch

diff --git a/gas/config/tc-loongarch.h b/gas/config/tc-loongarch.h
index 20434ac8a01..505d3b7b0d0 100644
--- a/gas/config/tc-loongarch.h
+++ b/gas/config/tc-loongarch.h
@@ -113,7 +113,7 @@  extern bool loongarch_frag_align_code (int, int);
    FDE Code Alignment Factor (DWARF2_LINE_MIN_INSN_LENGTH) should be 1
    because DW_CFA_advance_loc need to be relocated in bytes
    when linker relaxation.  */
-#define DWARF2_CIE_DATA_ALIGNMENT     (-8)
+#define DWARF2_CIE_DATA_ALIGNMENT     (-4)
 #define DWARF2_DEFAULT_RETURN_COLUMN  1	    /* FDE Return Address Register.  */
 
 #define tc_cfi_frame_initial_instructions	\