1 // REQUIRES: powerpc-registered-target 2 // RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s 3 test_eh_return_data_regno()4void test_eh_return_data_regno() 5 { 6 volatile int res; 7 res = __builtin_eh_return_data_regno(0); // CHECK: store volatile i32 3 8 res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 4 9 } 10 11 // CHECK-LABEL: define i64 @test_builtin_ppc_get_timebase test_builtin_ppc_get_timebase()12long long test_builtin_ppc_get_timebase() { 13 // CHECK: call i64 @llvm.readcyclecounter() 14 return __builtin_ppc_get_timebase(); 15 } 16 test_builtin_ppc_setrnd()17void test_builtin_ppc_setrnd() { 18 volatile double res; 19 volatile int x = 100; 20 21 // CHECK: call double @llvm.ppc.setrnd(i32 2) 22 res = __builtin_setrnd(2); 23 24 // CHECK: call double @llvm.ppc.setrnd(i32 100) 25 res = __builtin_setrnd(100); 26 27 // CHECK: call double @llvm.ppc.setrnd(i32 %2) 28 res = __builtin_setrnd(x); 29 } 30