blob: 20648e4cc37560317d3f6861c0d85fb6af9bfc6a [file] [log] [blame]
Eric Christophere3e07a52011-06-17 01:53:34 +00001// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
Eric Christophere3e07a52011-06-17 01:53:34 +00002
Eric Christopher37240202011-06-17 06:16:34 +00003typedef long long int64_t;
4typedef unsigned int uint32_t;
Eric Christophere3e07a52011-06-17 01:53:34 +00005
6int64_t foo(int64_t v, volatile int64_t *p)
7{
8 register uint32_t rl asm("r1");
9 register uint32_t rh asm("r2");
10
11 int64_t r;
12 uint32_t t;
13
14 __asm__ __volatile__( \
15 "ldrexd%[_rl], %[_rh], [%[_p]]" \
16 : [_rl] "=&r" (rl), [_rh] "=&r" (rh) \
17 : [_p] "p" (p) : "memory");
18
Eric Christopher8837d742011-06-17 17:04:30 +000019 // CHECK: call %0 asm sideeffect "ldrexd$0, $1, [$2]", "={r1},={r2},r,~{memory}"(i64*
Eric Christophere3e07a52011-06-17 01:53:34 +000020
21 return r;
22}