mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-21 19:35:28 -05:00
gcc/ChangeLog: * config/loongarch/loongarch-opts.cc (loongarch_target_option_override): Delete opts->x_flag_pcc_struct_return and enable mstrict-align by default on LA32. * config/loongarch/loongarch.cc (loongarch_for_each_saved_reg): Save reg depend on float abi. (loongarch_explicit_relocs_p): Disable explicit relocs on LA32. (loongarch_valid_offset_p): Disable const_imm16_operand with 4 byte aligned. (loongarch_valid_lo_sum_p): Allow lo_sum to be used with DF in ilp32d. (loongarch_valid_index_p): Disable ADDRESS_REG_REG on LA32. (loongarch_legitimize_address): Disable mem_shadd_or_shadd_rtx_p on LA32. (loongarch_output_move_index): Assert TARGET_64BIT for ldx/stx. (loongarch_output_move): Disable ldptr/stptr if offset is 0. (loongarch_output_equal_conditional_branch): Disable beqz/bnez on LA32R. (loongarch_trampoline_init): Change pcaddi to pcaddu12i. (loongarch_get_separate_components): Disable ldptr/stptr on LA32. (loongarch_c_mode_for_floating_type): Use TFmode for long double regardless of target bitness. (loongarch_bitint_type_info): Disable BitInt on LA32. (loongarch_call_tls_get_addr): Use call30 on LA32. (loongarch_split_move): Add split for DI, DF, TF. * config/loongarch/loongarch.h (LA_LONG_DOUBLE_TYPE_SIZE): Set LONG_DOUBLE_TYPE_SIZE to 128 regardless of target bitness. (MAX_FIXED_MODE_SIZE): Set to 64 on LA32. (DEFAULT_PCC_STRUCT_RETURN): New. (STACK_BOUNDARY): Set to 128 on LA64 and LA32. (LARCH_STACK_ALIGN): Set to 16 on LA64 and LA32. (TRAMPOLINE_SIZE): Set to same value on LA64 and LA32. include/ChangeLog: * longlong.h (count_leading_zeros): Delete because LA32R no clz. (count_trailing_zeros): Delete because LA32R no ctz. (COUNT_LEADING_ZEROS_0): Delete. Co-authored-by: Jiajie Chen <c@jia.je> Reviewed-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Lulu Cheng <chenglulu@loongson.cn>