1  /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
       2  /* { dg-options "-fdwarf2-cfi-asm -fdump-rtl-final" } */
       3  
       4  /* Lightly-modified dump of test.c.304r.dwarf2 for x86_64 target,
       5     with various NOTE_INSN_CFI deleted by hand for now.  */
       6  
       7  int __RTL (startwith ("final")) test_1 (int i, int j, int k)
       8  {
       9  (function "test_1"
      10    (param "i"
      11      (DECL_RTL (mem/c:SI (plus:DI (reg/f:DI frame)
      12          (const_int -4)) [1 i+0 S4 A32]))
      13      (DECL_RTL_INCOMING (reg:SI di [ i ])))
      14    (param "j"
      15      (DECL_RTL (mem/c:SI (plus:DI (reg/f:DI frame)
      16          (const_int -8)) [1 j+0 S4 A32]))
      17      (DECL_RTL_INCOMING (reg:SI si [ j ])))
      18    (param "k"
      19      (DECL_RTL (mem/c:SI (plus:DI (reg/f:DI frame)
      20          (const_int -12)) [1 k+0 S4 A32]))
      21      (DECL_RTL_INCOMING (reg:SI dx [ k ])))
      22    (insn-chain
      23      (cnote 1 NOTE_INSN_DELETED)
      24      (block 2
      25        (edge-from entry (flags "FALLTHRU"))
      26        (cnote 6 [bb 2] NOTE_INSN_BASIC_BLOCK)
      27        (cinsn/f 32 (set (mem:DI (pre_dec:DI (reg/f:DI sp)) [0  S8 A8])
      28                      (reg/f:DI bp)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      29        (cinsn/f 33 (set (reg/f:DI bp)
      30                      (reg/f:DI sp)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      31        (cinsn 34 (set (mem/v:BLK (0|scratch:DI) [0  A8])
      32                      (unspec:BLK [
      33                              (mem/v:BLK (reuse_rtx 0) [0  A8])
      34                          ] UNSPEC_MEMORY_BLOCKAGE)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      35        (cnote 35 NOTE_INSN_PROLOGUE_END)
      36        (cinsn 2 (set (mem/c:SI (plus:DI (reg/f:DI bp)
      37                              (const_int -4)) [1 i+0 S4 A32])
      38                      (reg:SI di [ i ])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      39        (cinsn 3 (set (mem/c:SI (plus:DI (reg/f:DI bp)
      40                              (const_int -8)) [1 j+0 S4 A32])
      41                      (reg:SI si [ j ])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      42        (cinsn 4 (set (mem/c:SI (plus:DI (reg/f:DI bp)
      43                              (const_int -12)) [1 k+0 S4 A32])
      44                      (reg:SI dx [ k ])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":2)
      45        (cnote 5 NOTE_INSN_FUNCTION_BEG)
      46        (cinsn 8 (set (reg:SI ax [89])
      47                      (mem/c:SI (plus:DI (reg/f:DI bp)
      48                              (const_int -4)) [1 i+0 S4 A32])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":3)
      49        (cinsn 9 (set (reg:CCGC flags)
      50                      (compare:CCGC (reg:SI ax [89])
      51                          (mem/c:SI (plus:DI (reg/f:DI bp)
      52                                  (const_int -8)) [1 j+0 S4 A32]))) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":3)
      53        (cjump_insn 10 (set (pc)
      54                      (if_then_else (ge (reg:CCGC flags)
      55                              (const_int 0))
      56                          (label_ref 16)
      57                          (pc))) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":3)
      58        (edge-to 3 (flags "FALLTHRU"))
      59        (edge-to 4)
      60      ) ;; block 2
      61      (block 3
      62        (edge-from 2 (flags "FALLTHRU"))
      63        (cnote 11 [bb 3] NOTE_INSN_BASIC_BLOCK)
      64        (cinsn 12 (set (reg:SI ax [90])
      65                      (mem/c:SI (plus:DI (reg/f:DI bp)
      66                              (const_int -12)) [1 k+0 S4 A32])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":4)
      67        (cinsn 13 (parallel [
      68                          (set (reg:SI ax [orig:87 _1 ] [87])
      69                              (plus:SI (reg:SI ax [90])
      70                                  (const_int 4)))
      71                          (clobber (reg:CC flags))
      72                      ]) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":4
      73                   (expr_list:REG_EQUAL (plus:SI (mem/c:SI (plus:DI (reg/f:DI frame)
      74                                  (const_int -12)) [1 k+0 S4 A32])
      75                          (const_int 4))))
      76        (cjump_insn 29 (set (pc)
      77                      (label_ref 20)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":4)
      78        (edge-to 5)
      79      ) ;; block 3
      80      (cbarrier 30)
      81      (block 4
      82        (edge-from 2)
      83        (clabel 16 2)
      84        (cnote 17 [bb 4] NOTE_INSN_BASIC_BLOCK)
      85        (cinsn 18 (set (reg:SI ax [91])
      86                      (mem/c:SI (plus:DI (reg/f:DI bp)
      87                              (const_int -12)) [1 k+0 S4 A32])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":6)
      88        (cinsn 19 (parallel [
      89                          (set (reg:SI ax [orig:87 _1 ] [87])
      90                              (neg:SI (reg:SI ax [91])))
      91                          (clobber (reg:CC flags))
      92                      ]) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":6
      93                   (expr_list:REG_EQUAL (neg:SI (mem/c:SI (plus:DI (reg/f:DI frame)
      94                                  (const_int -12)) [1 k+0 S4 A32]))))
      95        (edge-to 5 (flags "FALLTHRU"))
      96      ) ;; block 4
      97      (block 5
      98        (edge-from 4 (flags "FALLTHRU"))
      99        (edge-from 3)
     100        (clabel 20 3)
     101        (cnote 21 [bb 5] NOTE_INSN_BASIC_BLOCK)
     102        (cinsn 27 (use (reg/i:SI ax)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":7)
     103        (cnote 36 NOTE_INSN_EPILOGUE_BEG)
     104        (cinsn 37 (set (mem/v:BLK (1|scratch:DI) [0  A8])
     105                      (unspec:BLK [
     106                              (mem/v:BLK (reuse_rtx 1) [0  A8])
     107                          ] UNSPEC_MEMORY_BLOCKAGE)) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":7)
     108        (cinsn/f 38 (set (reg/f:DI bp)
     109                      (mem:DI (post_inc:DI (reg/f:DI sp)) [0  S8 A8])) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":7
     110                   (expr_list:REG_CFA_DEF_CFA (plus:DI (reg/f:DI sp)
     111                          (const_int 8))))
     112        (cjump_insn 39 (simple_return) "../../src/gcc/testsuite/gcc.dg/rtl/test.c":7)
     113        (edge-to exit)
     114      ) ;; block 5
     115      (cbarrier 40)
     116      (cnote 31 NOTE_INSN_DELETED)
     117    ) ;; insn-chain
     118    (crtl
     119      (return_rtx 
     120        (reg/i:SI ax)
     121      ) ;; return_rtx
     122    ) ;; crtl
     123  ) ;; function "test_1"
     124  }
     125  
     126  /* Verify that asm was emitted.  */
     127  /* { dg-final { scan-assembler "test_1:" } } */
     128  /* { dg-final { scan-assembler ".cfi_startproc" } } */
     129  /* { dg-final { scan-assembler ".cfi_endproc" } } */
     130  
     131  /* Verify that the "simple_return" was recognized.
     132     FIXME: this assumes i386.md.  */
     133  /* { dg-final { scan-assembler "ret" } } */