Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors under riscv64 architecture #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant