Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:RISCV
llvm13
riscv.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File riscv.patch of Package llvm13
From 0ff798a5f29500a5b9ca1d6a708f4001a63fc2ea Mon Sep 17 00:00:00 2001 From: Andreas Schwab <schwab@suse.de> Date: Sun, 27 Jun 2021 20:19:51 +0200 Subject: [PATCH] Define sys::getHostCPUName for RISC-V The RISCV target doesn't define a "generic" cpu, only "generic-rv32" and "generic-rv64". Define sys::getHostCPUName for RISC-V that returns the correct cpu for the host. --- llvm/lib/Support/Host.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp index 20de52cbc0c4..7b14616f6fea 100644 --- a/llvm/lib/Support/Host.cpp +++ b/llvm/lib/Support/Host.cpp @@ -1356,6 +1356,16 @@ StringRef sys::getHostCPUName() { return "generic"; } } +#elif defined(__riscv) +StringRef sys::getHostCPUName() { +#if __riscv_xlen == 64 + return "generic-rv64"; +#elif __riscv_xlen == 32 + return "generic-rv32"; +#else +#error "Unhandled value of __riscv_xlen" +#endif +} #else StringRef sys::getHostCPUName() { return "generic"; } namespace llvm { -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor