Jim Grosbach | f794705 | 2012-07-09 18:34:21 +0000 | [diff] [blame] | 1 | // REQUIRES: arm-registered-target |
Rafael Espindola | a71d3c6 | 2010-06-08 03:59:28 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -O3 -emit-llvm -o - %s | FileCheck %s |
Chris Lattner | 2752c01 | 2010-03-03 19:03:45 +0000 | [diff] [blame] | 3 | |
Chris Lattner | 2752c01 | 2010-03-03 19:03:45 +0000 | [diff] [blame] | 4 | void *f0() |
| 5 | { |
| 6 | return __builtin_thread_pointer(); |
| 7 | } |
Rafael Espindola | a71d3c6 | 2010-06-08 03:59:28 +0000 | [diff] [blame] | 8 | |
| 9 | void f1(char *a, char *b) { |
| 10 | __clear_cache(a,b); |
| 11 | } |
| 12 | |
Daniel Dunbar | 1058253 | 2010-07-16 00:31:23 +0000 | [diff] [blame] | 13 | // CHECK: call {{.*}} @__clear_cache |
Logan Chien | a8f7a97 | 2013-02-23 04:24:36 +0000 | [diff] [blame] | 14 | |
| 15 | void test_eh_return_data_regno() |
| 16 | { |
| 17 | volatile int res; |
| 18 | res = __builtin_eh_return_data_regno(0); // CHECK: store volatile i32 0 |
| 19 | res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 1 |
| 20 | } |
Joey Gouly | 594e193 | 2013-10-02 10:00:18 +0000 | [diff] [blame] | 21 | |
| 22 | void sevl() { |
| 23 | __builtin_arm_sevl(); |
| 24 | } |
| 25 | |
| 26 | // CHECK: call {{.*}} @llvm.arm.sevl |