Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/lib/sanitizer_common/sanitizer_platform.h
Show First 20 Lines • Show All 266 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#if defined(__riscv) && (__riscv_xlen == 64) | #if defined(__riscv) && (__riscv_xlen == 64) | ||||
# define SANITIZER_RISCV64 1 | # define SANITIZER_RISCV64 1 | ||||
#else | #else | ||||
# define SANITIZER_RISCV64 0 | # define SANITIZER_RISCV64 0 | ||||
#endif | #endif | ||||
#if defined(__loongarch_lp64) | |||||
# define SANITIZER_LOONGARCH64 1 | |||||
#else | |||||
# define SANITIZER_LOONGARCH64 0 | |||||
#endif | |||||
xen0n: Why not `defined(__loongarch64)`? I think the future ILP32 ABIs of LA64 will also have GRLEN=64… | |||||
I'll change it to use __loongarch_lp64. The LoongArch Toolchain Conventions doc does not mention __loongarch64. xry111: I'll change it to use `__loongarch_lp64`. The LoongArch Toolchain Conventions doc does not… | |||||
Removing defined(__loongarch__) && looks good. MaskRay: Removing `defined(__loongarch__) && ` looks good. | |||||
Will do. xry111: Will do. | |||||
// By default we allow to use SizeClassAllocator64 on 64-bit platform. | // By default we allow to use SizeClassAllocator64 on 64-bit platform. | ||||
// But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 | // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 | ||||
// does not work well and we need to fallback to SizeClassAllocator32. | // does not work well and we need to fallback to SizeClassAllocator32. | ||||
// For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or | // For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or | ||||
// change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here. | // change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here. | ||||
#ifndef SANITIZER_CAN_USE_ALLOCATOR64 | #ifndef SANITIZER_CAN_USE_ALLOCATOR64 | ||||
# if (SANITIZER_ANDROID && defined(__aarch64__)) || SANITIZER_FUCHSIA | # if (SANITIZER_ANDROID && defined(__aarch64__)) || SANITIZER_FUCHSIA | ||||
# define SANITIZER_CAN_USE_ALLOCATOR64 1 | # define SANITIZER_CAN_USE_ALLOCATOR64 1 | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |
Why not defined(__loongarch64)? I think the future ILP32 ABIs of LA64 will also have GRLEN=64, but the changes above seem to imply the LP64* ABIs.