Skip to content

Commit 4806a55

Browse files
BeMgtstellar
authored andcommitted
[RISCV][compiler-rt] drop __riscv_vendor_feature_bits (#126460)
Address riscv-non-isa/riscv-c-api-doc#101 (cherry picked from commit 2cd8207)
1 parent 3661520 commit 4806a55

File tree

1 file changed

+5
-12
lines changed
  • compiler-rt/lib/builtins/cpu_model

1 file changed

+5
-12
lines changed

compiler-rt/lib/builtins/cpu_model/riscv.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ struct {
1414
unsigned long long features[RISCV_FEATURE_BITS_LENGTH];
1515
} __riscv_feature_bits __attribute__((visibility("hidden"), nocommon));
1616

17-
#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
18-
struct {
19-
unsigned length;
20-
unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
21-
} __riscv_vendor_feature_bits __attribute__((visibility("hidden"), nocommon));
22-
2317
struct {
2418
unsigned mvendorid;
2519
unsigned long long marchid;
@@ -338,11 +332,11 @@ static int FeaturesBitCached = 0;
338332
void __init_riscv_feature_bits(void *);
339333
static void __init_riscv_feature_bits_ctor(void) CONSTRUCTOR_ATTRIBUTE;
340334

341-
// A constructor function that sets __riscv_feature_bits, and
342-
// __riscv_vendor_feature_bits to the right values. This needs to run
343-
// only once. This constructor is given the highest priority and it should
344-
// run before constructors without the priority set. However, it still runs
345-
// after ifunc initializers and needs to be called explicitly there.
335+
// A constructor function that sets __riscv_feature_bits
336+
// to the right values. This needs to run only once. This constructor is given
337+
// the highest priority and it should run before constructors without the
338+
// priority set. However, it still runs after ifunc initializers and needs to
339+
// be called explicitly there.
346340

347341
static void CONSTRUCTOR_ATTRIBUTE __init_riscv_feature_bits_ctor(void) {
348342
__init_riscv_feature_bits(0);
@@ -357,7 +351,6 @@ void __init_riscv_feature_bits(void *PlatformArgs) {
357351
return;
358352

359353
__riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH;
360-
__riscv_vendor_feature_bits.length = RISCV_VENDOR_FEATURE_BITS_LENGTH;
361354

362355
#if defined(__linux__)
363356
struct riscv_hwprobe Hwprobes[] = {

0 commit comments

Comments
 (0)