Home | History | Annotate | Download | only in XCore
      1 ; RUN: llc < %s -march=xcore | FileCheck %s
      2 define void @a_val() nounwind {
      3   ret void
      4 }
      5 @b_val = constant i32 42, section ".cp.rodata"
      6 @c_val = global i32 42
      7 
      8 @a = alias void (), void ()* @a_val
      9 @b = alias i32, i32* @b_val
     10 @c = alias i32, i32* @c_val
     11 
     12 ; CHECK-LABEL: a_addr:
     13 ; CHECK: ldap r11, a
     14 ; CHECK: retsp
     15 define void ()* @a_addr() nounwind {
     16 entry:
     17   ret void ()* @a
     18 }
     19 
     20 ; CHECK-LABEL: b_addr:
     21 ; CHECK: ldaw r11, cp[b]
     22 ; CHECK: retsp
     23 define i32 *@b_addr() nounwind {
     24 entry:
     25   ret i32* @b
     26 }
     27 
     28 ; CHECK-LABEL: c_addr:
     29 ; CHECK: ldaw r0, dp[c]
     30 ; CHECK: retsp
     31 define i32 *@c_addr() nounwind {
     32 entry:
     33   ret i32* @c
     34 }
     35