• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
2# RUN:     | llvm-objdump -d -M no-aliases  - | FileCheck --check-prefix=CHECK-INST %s
3
4# alpha and main are 8 byte alignment
5# but the alpha function's size is 6
6# So assembler will insert a c.nop to make sure 8 byte alignment.
7
8        .text
9       .p2align        3
10       .type   alpha,@function
11alpha:
12# BB#0:
13       c.addi  sp, -16
14       c.lw    a0, 0(a0)
15       c.lw    a1, 4(a0)
16# CHECK-INST: c.nop
17.Lfunc_end0:
18       .size   alpha, .Lfunc_end0-alpha
19                                        # -- End function
20       .globl  main
21       .p2align        3
22       .type   main,@function
23main:                                   # @main
24# BB#0:
25.Lfunc_end1:
26       .size   main, .Lfunc_end1-main
27                                        # -- End function
28