Skip to content

Conversation

Zeno-sole
Copy link
Contributor

@Zeno-sole Zeno-sole commented Mar 15, 2024

Using riscv64 gcc13 compile prompt error unknown arch
Refer to the definition in the latest gcc and fix it to __riscv_xlen
The macro definition of __riscv also exists in riscv32, so __riscv_xlen is used as the CPU bit width judgment
from: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/riscv/riscv.h

loongarch64: Delete useless macro judgments

Macro definitions in loongarch64 environment in gcc and clang

#define __loongarch64 1
#define __loongarch__ 1
#define __loongarch_double_float 1
#define __loongarch_frlen 64
#define __loongarch_grlen 64
#define __loongarch_hard_float 1
#define __loongarch_lp64 1

Macro definitions in riscv64 environment in gcc and clang

#define __riscv 1
#define __riscv_a 2000000
#define __riscv_arch_test 1
#define __riscv_atomic 1
#define __riscv_c 2000000
#define __riscv_cmodel_medlow 1
#define __riscv_compressed 1
#define __riscv_d 2000000
#define __riscv_div 1
#define __riscv_f 2000000
#define __riscv_fdiv 1
#define __riscv_flen 64
#define __riscv_float_abi_double 1
#define __riscv_fsqrt 1
#define __riscv_i 2000000
#define __riscv_m 2000000
#define __riscv_mul 1
#define __riscv_muldiv 1
#define __riscv_xlen 64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant