[RISCV] Remove Zvamo implication for v1.0-rc change

As v1.0-rc specs say Zvamo is removed from standard extension,
Zvamo has to be specified explicitly.

Reviewed By: evandro

Differential Revision: https://reviews.llvm.org/D105396
This commit is contained in:
ShihPo Hung 2021-07-04 02:17:40 +08:00
parent 37a92f3b03
commit f1cbea3e52
2 changed files with 16 additions and 10 deletions

View File

@ -258,10 +258,13 @@ static void getExtensionFeatures(const Driver &D,
<< MArch << Error << Ext;
return;
}
if (Ext == "zvamo" || Ext == "zvlsseg") {
if (Ext == "zvlsseg") {
Features.push_back("+experimental-v");
Features.push_back("+experimental-zvamo");
Features.push_back("+experimental-zvlsseg");
} else if (Ext == "zvamo") {
Features.push_back("+experimental-v");
Features.push_back("+experimental-zvlsseg");
Features.push_back("+experimental-zvamo");
} else if (isExperimentalExtension(Ext))
Features.push_back(Args.MakeArgString("+experimental-" + Ext));
else
@ -429,7 +432,6 @@ static bool getArchFeatures(const Driver &D, StringRef MArch,
break;
case 'v':
Features.push_back("+experimental-v");
Features.push_back("+experimental-zvamo");
Features.push_back("+experimental-zvlsseg");
break;
}

View File

@ -225,12 +225,6 @@
// RUN: -march=rv64iv0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-V-EXT %s
// RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izvamo0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-V-EXT %s
// RUN: %clang -target riscv64-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izvamo0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-V-EXT %s
// RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izvlsseg0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-V-EXT %s
// RUN: %clang -target riscv64-unknown-linux-gnu -menable-experimental-extensions \
@ -238,9 +232,19 @@
// RUN: -o - | FileCheck --check-prefix=CHECK-V-EXT %s
// CHECK-V-EXT: __riscv_v 10000
// CHECK-V-EXT: __riscv_vector 1
// CHECK-V-EXT: __riscv_zvamo 10000
// CHECK-V-EXT: __riscv_zvlsseg 10000
// RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izvamo0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-ZVAMO-EXT %s
// RUN: %clang -target riscv64-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izvamo0p10 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-ZVAMO-EXT %s
// CHECK-ZVAMO-EXT: __riscv_v 10000
// CHECK-ZVAMO-EXT: __riscv_vector 1
// CHECK-ZVAMO-EXT: __riscv_zvamo 10000
// CHECK-ZVAMO-EXT: __riscv_zvlsseg 10000
// RUN: %clang -target riscv32-unknown-linux-gnu -menable-experimental-extensions \
// RUN: -march=rv32izfh0p1 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-ZFH-EXT %s