47 lines · c
1// RUN: %clang --target=riscv32 -E -dM %s -o - | \2// RUN: FileCheck --check-prefixes=NO-MACRO %s3 4// RUN: %clang --target=riscv32 -fcf-protection=return -E -dM %s -o - | \5// RUN: FileCheck --check-prefixes=NO-MACRO %s6 7// RUN: %clang --target=riscv32 -fcf-protection=full -E -dM %s -o - | \8// RUN: FileCheck --check-prefixes=NO-MACRO %s9 10// RUN: %clang --target=riscv32 -march=rv32i_zicfiss1p0 \11// RUN: -menable-experimental-extensions -E -dM %s -o - | \12// RUN: FileCheck --check-prefixes=NO-MACRO %s13 14// RUN: %clang --target=riscv32 -march=rv32i_zicfiss1p0 \15// RUN: -menable-experimental-extensions -fcf-protection=return -E -dM %s \16// RUN: -o - | FileCheck --check-prefixes=SHSTK-MACRO %s17 18// RUN: %clang --target=riscv32 -march=rv32i_zicfiss1p0 \19// RUN: -menable-experimental-extensions -fcf-protection=full -E -dM %s -o - \20// RUN: | FileCheck --check-prefixes=SHSTK-MACRO %s21 22// RUN: %clang --target=riscv64 -E -dM %s -o - | \23// RUN: FileCheck --check-prefixes=NO-MACRO %s24 25// RUN: %clang --target=riscv64 -fcf-protection=return -E -dM %s -o - | \26// RUN: FileCheck --check-prefixes=NO-MACRO %s27 28// RUN: %clang --target=riscv64 -fcf-protection=full -E -dM %s -o - | \29// RUN: FileCheck --check-prefixes=NO-MACRO %s30 31// RUN: %clang --target=riscv64 -march=rv64i_zicfiss1p0 \32// RUN: -menable-experimental-extensions -E -dM %s -o - | \33// RUN: FileCheck --check-prefixes=NO-MACRO %s34 35// RUN: %clang --target=riscv64 -march=rv64i_zicfiss1p0 \36// RUN: -menable-experimental-extensions -fcf-protection=return -E -dM %s \37// RUN: -o - | FileCheck --check-prefixes=SHSTK-MACRO %s38 39// RUN: %clang --target=riscv64 -march=rv64i_zicfiss1p0 \40// RUN: -menable-experimental-extensions -fcf-protection=full -E -dM %s -o - \41// RUN: | FileCheck --check-prefixes=SHSTK-MACRO %s42 43// SHSTK-MACRO-NOT: __CET__44// SHSTK-MACRO: __riscv_shadow_stack 1{{$}}45// SHSTK-MACRO-NOT: __CET__46// NO-MACRO-NOT: __riscv_shadow_stack47