Skip to content

Commit 2605daa

Browse files
cyyselfJeffreyALaw
authored andcommitted
RISC-V: Drop __riscv_vendor_feature_bits
As discussed from RISC-V C-API PR #101 [1], As discussed in #96, current interface is insufficient to support some cases, like a vendor buying a CPU IP from the upstream vendor but using their own mvendorid and custom features from the upstream vendor. In this case, we might need to add these extensions for each downstream vendor many times. Thus, making __riscv_vendor_feature_bits guarded by mvendorid is not a good idea. So, drop __riscv_vendor_feature_bits for now, and we should have time to discuss a better solution. [1] riscv-non-isa/riscv-c-api-doc#101 Signed-off-by: Yangyu Chen <[email protected]> gcc/ChangeLog: * config/riscv/riscv-feature-bits.h (RISCV_VENDOR_FEATURE_BITS_LENGTH): Drop. (struct riscv_vendor_feature_bits): Drop. libgcc/ChangeLog: * config/riscv/feature_bits.c (RISCV_VENDOR_FEATURE_BITS_LENGTH): Drop. (__init_riscv_features_bits_linux): Drop.
1 parent 1fb2146 commit 2605daa

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

gcc/config/riscv/riscv-feature-bits.h

-7
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ struct riscv_feature_bits {
2828
unsigned long long features[RISCV_FEATURE_BITS_LENGTH];
2929
};
3030

31-
#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
32-
33-
struct riscv_vendor_feature_bits {
34-
unsigned length;
35-
unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
36-
};
37-
3831
struct riscv_cpu_model {
3932
unsigned mvendorid;
4033
unsigned long long marchid;

libgcc/config/riscv/feature_bits.c

-10
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ struct {
3030
unsigned long long features[RISCV_FEATURE_BITS_LENGTH];
3131
} __riscv_feature_bits __attribute__ ((visibility ("hidden"), nocommon));
3232

33-
#define RISCV_VENDOR_FEATURE_BITS_LENGTH 1
34-
35-
struct {
36-
unsigned length;
37-
unsigned long long features[RISCV_VENDOR_FEATURE_BITS_LENGTH];
38-
} __riscv_vendor_feature_bits __attribute__ ((visibility ("hidden"), nocommon));
39-
4033
struct {
4134
unsigned mvendorid;
4235
unsigned long long marchid;
@@ -382,8 +375,6 @@ static void __init_riscv_features_bits_linux ()
382375
__riscv_feature_bits.features[i] = features[i];
383376

384377
__riscv_feature_bits.length = RISCV_FEATURE_BITS_LENGTH;
385-
386-
__riscv_vendor_feature_bits.length = 0;
387378
}
388379
#endif
389380

@@ -402,7 +393,6 @@ __init_riscv_feature_bits ()
402393
#else
403394
/* Unsupported, just initialize that into all zeros. */
404395
__riscv_feature_bits.length = 0;
405-
__riscv_vendor_feature_bits.length = 0;
406396
__riscv_cpu_model.mvendorid = 0;
407397
__riscv_cpu_model.marchid = 0;
408398
__riscv_cpu_model.mimpid = 0;

0 commit comments

Comments
 (0)