Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu %s -filetype=obj -o %t
      2 ; RUN: llvm-objdump -s %t | FileCheck %s
      3 @var = global i32 0
      4 
      5 declare void @bar()
      6 
      7 define i64 @check_largest_class(i32 %in)  {
      8   %res = load i32* @var
      9   call void @bar()
     10   %ext = zext i32 %res to i64
     11   ret i64 %ext
     12 }
     13 
     14 ; The really key points we're checking here are:
     15 ;  * Return register is x30.
     16 ;  * Pointer format is 0x1b (GNU doesn't appear to understand others).
     17 
     18 ; The rest is largely incidental, but not expected to change regularly.
     19 
     20 ; Output is:
     21 
     22 ; CHECK: Contents of section .eh_frame:
     23 ; CHECK-NEXT: 0000 10000000 00000000 017a5200 017c1e01  .........zR..|..
     24 ; CHECK-NEXT: 0010 1b0c1f00 18000000 18000000 00000000  ................
     25 
     26 
     27 ; Won't check the rest, it's rather incidental.
     28 ; 0020 24000000 00440c1f 10449e02 93040000  $....D...D......
     29 
     30 
     31 ; The first CIE:
     32 ; -------------------
     33 ; 10000000: length of first CIE = 0x10
     34 ; 00000000: This is a CIE
     35 ; 01: version = 0x1
     36 ; 7a 52 00: augmentation string "zR" -- pointer format is specified
     37 ; 01: code alignment factor 1
     38 ; 7c: data alignment factor -4
     39 ; 1e: return address register 30 (== x30).
     40 ; 01: 1 byte of augmentation
     41 ; 1b: pointer format 1b: DW_EH_PE_pcrel | DW_EH_PE_sdata4
     42 ; 0c 1f 00: initial instructions: "DW_CFA_def_cfa x31 ofs 0" in this case
     43 
     44 ; Next the FDE:
     45 ; -------------
     46 ; 18000000: FDE length 0x18
     47 ; 18000000: Uses CIE 0x18 backwards (only coincidentally same as above)
     48 ; 00000000: PC begin for this FDE is at 00000000 (relocation is applied here)
     49 ; 24000000: FDE applies up to PC begin+0x24
     50 ; 00: Augmentation string length 0 for this FDE
     51 ; Rest: call frame instructions
     52