Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@ RISC-V Support
- Add `-march=unset` to clear any previous `-march=` value. This ISA string will
be computed from `-mcpu` or the platform default.

- `__GCC_CONSTRUCTIVE_SIZE` and `__GCC_DESTRUCTIVE_SIZE` are changed to 64.

CUDA/HIP Language Changes
^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Basic/Targets/RISCV.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class RISCVTargetInfo : public TargetInfo {
llvm::APInt getFMVPriority(ArrayRef<StringRef> Features) const override;

std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
return std::make_pair(32, 32);
return std::make_pair(64, 64);
}

bool supportsCpuSupports() const override { return getTriple().isOSLinux(); }
Expand Down
12 changes: 12 additions & 0 deletions clang/test/Preprocessor/init-riscv.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// REQUIRES: riscv-registered-target

// RUN: %clang_cc1 -E -dM -triple=riscv32 < /dev/null | \
// RUN: FileCheck -match-full-lines -check-prefixes=RV32 %s
// RUN: %clang_cc1 -E -dM -triple=riscv64 < /dev/null | \
// RUN: FileCheck -match-full-lines -check-prefixes=RV64 %s

// RV32: #define __GCC_CONSTRUCTIVE_SIZE 64
// RV32: #define __GCC_DESTRUCTIVE_SIZE 64

// RV64: #define __GCC_CONSTRUCTIVE_SIZE 64
// RV64: #define __GCC_DESTRUCTIVE_SIZE 64