From 2c87f5341dd0e0614d5b1e423e3dc1168cfedf44 Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Mon, 22 May 2017 12:47:43 +0000 Subject: [mips] Support `micromips` attribute This patch adds support for the `micromips` and `nomicromips` attributes for MIPS targets. Differential revision: https://reviews.llvm.org/D33363 llvm-svn: 303546 --- clang/test/CodeGen/micromips-attr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/CodeGen/micromips-attr.c (limited to 'clang/test/CodeGen/micromips-attr.c') diff --git a/clang/test/CodeGen/micromips-attr.c b/clang/test/CodeGen/micromips-attr.c new file mode 100644 index 00000000000..96ba774afc0 --- /dev/null +++ b/clang/test/CodeGen/micromips-attr.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple mips-linux-gnu -emit-llvm -o - %s | FileCheck %s + +void __attribute__((micromips)) foo (void) {} + +// CHECK: define void @foo() [[MICROMIPS:#[0-9]+]] + +void __attribute__((nomicromips)) nofoo (void) {} + +// CHECK: define void @nofoo() [[NOMICROMIPS:#[0-9]+]] + +// CHECK: attributes [[MICROMIPS]] = { noinline nounwind {{.*}} "micromips" {{.*}} } +// CHECK: attributes [[NOMICROMIPS]] = { noinline nounwind {{.*}} "nomicromips" {{.*}} } -- cgit v1.2.3