brintos

brintos / llvm-project-archived public Read only

0
0
Text · 612 B · 4834eea Raw
39 lines · c
1// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s2 3int t1(void)4{5  int x;6  __asm__("mov %0, 7" : "=r" (x));7  return x;8}9 10long t2(void)11{12  long x;13  __asm__("mov %0, 7" : "=r" (x));14  return x;15}16 17long t3(void)18{19  long x;20  __asm__("mov %w0, 7" : "=r" (x));21  return x;22}23 24void t4(long op) {25  long x1;26  asm ("mov x0, %1; svc #0;" : "=r"(x1) :"r"(op),"r"(x1) :"x0" );27}28 29float t5(float x) {30  __asm__("fadd %0, %0, %0" : "+w" (x));31  return x;32}33 34void t6 (void *f, int g) {35  // CHECK: t636  // CHECK: call void asm "str $1, $0", "=*Q,r"37  asm("str %1, %0" : "=Q"(f) : "r"(g));38}39