Skip to content

Commit cbe681b

Browse files
committed
Revert "[RISCV] Add Clang frontend support for Bitmanip extension"
This reverts commit 57cf6ee.
1 parent a3ebc40 commit cbe681b

File tree

4 files changed

+1
-19
lines changed

4 files changed

+1
-19
lines changed

clang/lib/Basic/Targets/RISCV.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
125125

126126
if (HasC)
127127
Builder.defineMacro("__riscv_compressed");
128-
129-
if (HasB) {
130-
Builder.defineMacro("__riscv_bitmanip");
131-
}
132128
}
133129

134130
/// Return true if has this feature, need to sync with handleTargetFeatures.
@@ -143,7 +139,6 @@ bool RISCVTargetInfo::hasFeature(StringRef Feature) const {
143139
.Case("f", HasF)
144140
.Case("d", HasD)
145141
.Case("c", HasC)
146-
.Case("b", HasB)
147142
.Default(false);
148143
}
149144

@@ -161,8 +156,6 @@ bool RISCVTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
161156
HasD = true;
162157
else if (Feature == "+c")
163158
HasC = true;
164-
else if (Feature == "+b")
165-
HasB = true;
166159
}
167160

168161
return true;

clang/lib/Basic/Targets/RISCV.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ class RISCVTargetInfo : public TargetInfo {
3030
bool HasF;
3131
bool HasD;
3232
bool HasC;
33-
bool HasB;
3433

3534
public:
3635
RISCVTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
3736
: TargetInfo(Triple), HasM(false), HasA(false), HasF(false),
38-
HasD(false), HasC(false), HasB(false) {
37+
HasD(false), HasC(false) {
3938
LongDoubleWidth = 128;
4039
LongDoubleAlign = 128;
4140
LongDoubleFormat = &llvm::APFloat::IEEEquad();

clang/lib/Driver/ToolChains/Arch/RISCV.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,6 @@ static bool getArchFeatures(const Driver &D, StringRef MArch,
331331
case 'c':
332332
Features.push_back("+c");
333333
break;
334-
case 'b':
335-
Features.push_back("+b");
336-
break;
337334
}
338335
}
339336

clang/test/Preprocessor/riscv-target-features.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// CHECK-NOT: __riscv_mul
88
// CHECK-NOT: __riscv_muldiv
99
// CHECK-NOT: __riscv_compressed
10-
// CHECK-NOT: __riscv_bitmanip
1110
// CHECK-NOT: __riscv_flen
1211
// CHECK-NOT: __riscv_fdiv
1312
// CHECK-NOT: __riscv_fsqrt
@@ -49,12 +48,6 @@
4948
// RUN: -o - | FileCheck --check-prefix=CHECK-C-EXT %s
5049
// CHECK-C-EXT: __riscv_compressed 1
5150

52-
// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32ib -x c -E -dM %s \
53-
// RUN: -o - | FileCheck --check-prefix=CHECK-B-EXT %s
54-
// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64ib -x c -E -dM %s \
55-
// RUN: -o - | FileCheck --check-prefix=CHECK-B-EXT %s
56-
// CHECK-B-EXT: __riscv_bitmanip 1
57-
5851
// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32ifd -mabi=ilp32 -x c -E -dM %s \
5952
// RUN: -o - | FileCheck --check-prefix=CHECK-SOFT %s
6053
// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64ifd -mabi=lp64 -x c -E -dM %s \

0 commit comments

Comments
 (0)