Skip to content
Merged
Changes from all 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
17 changes: 5 additions & 12 deletions compiler-rt/lib/builtins/cpu_model/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ struct {
unsigned long long features[RISCV_FEATURE_BITS_LENGTH];
} __riscv_feature_bits __attribute__((visibility("hidden"), nocommon));

#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
struct {
unsigned length;
unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon));

struct {
unsigned mvendorid;
unsigned long long marchid;
Expand Down Expand Up @@ -338,11 +332,11 @@ static int FeaturesBitCached = 0;
void __init_riscv_feature_bits(void *);
static void __init_riscv_feature_bits_ctor(void) CONSTRUCTOR_ATTRIBUTE;

// A constructor function that sets __riscv_feature_bits, and
// __riscv_vendor_feature_bits to the right values. This needs to run
// only once. This constructor is given the highest priority and it should
// run before constructors without the priority set. However, it still runs
// after ifunc initializers and needs to be called explicitly there.
// A constructor function that sets __riscv_feature_bits
// to the right values. This needs to run only once. This constructor is given
// the highest priority and it should run before constructors without the
// priority set. However, it still runs after ifunc initializers and needs to
// be called explicitly there.

static void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits_ctor(void) {
__init_riscv_feature_bits(0);
Expand All @@ -357,7 +351,6 @@ void __init_riscv_feature_bits(void *PlatformArgs) {
return;

__riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH;
__riscv_vendor_feature_bits.length = RISCV_VENDOR_FEATURE_BITS_LENGTH;

#if defined(__linux__)
struct riscv_hwprobe Hwprobes[] = {
Expand Down