2018-01-17 15:17:12 +01:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
|
2020-03-16 00:17:52 +01:00
|
|
|
# RUN: | llvm-objdump -d -M no-aliases - | FileCheck --check-prefix=CHECK-INST %s
|
2018-01-17 15:17:12 +01:00
|
|
|
|
|
|
|
# alpha and main are 8 byte alignment
|
|
|
|
# but the alpha function's size is 6
|
|
|
|
# So assembler will insert a c.nop to make sure 8 byte alignment.
|
|
|
|
|
|
|
|
.text
|
|
|
|
.p2align 3
|
|
|
|
.type alpha,@function
|
|
|
|
alpha:
|
|
|
|
# BB#0:
|
[RISCV] Update MC compression tests
Summary:
This patch updates MC tests related to compression in RISCV to
insure they work correctly with automatic compression and relaxation
enabled. This is the first part of a series of patches to implement
automatic compression for RISCV.
Reviewers: asb, apazos
Reviewed By: asb
Subscribers: shiva0217, efriedma, llvm-commits, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, niosHD, kito-cheng
Differential Revision: https://reviews.llvm.org/D43328
llvm-svn: 329441
2018-04-06 20:27:45 +02:00
|
|
|
c.addi sp, -16
|
2018-01-17 15:17:12 +01:00
|
|
|
c.lw a0, 0(a0)
|
[RISCV] Update MC compression tests
Summary:
This patch updates MC tests related to compression in RISCV to
insure they work correctly with automatic compression and relaxation
enabled. This is the first part of a series of patches to implement
automatic compression for RISCV.
Reviewers: asb, apazos
Reviewed By: asb
Subscribers: shiva0217, efriedma, llvm-commits, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, niosHD, kito-cheng
Differential Revision: https://reviews.llvm.org/D43328
llvm-svn: 329441
2018-04-06 20:27:45 +02:00
|
|
|
c.lw a1, 4(a0)
|
2018-01-17 15:17:12 +01:00
|
|
|
# CHECK-INST: c.nop
|
|
|
|
.Lfunc_end0:
|
|
|
|
.size alpha, .Lfunc_end0-alpha
|
|
|
|
# -- End function
|
|
|
|
.globl main
|
|
|
|
.p2align 3
|
|
|
|
.type main,@function
|
|
|
|
main: # @main
|
|
|
|
# BB#0:
|
|
|
|
.Lfunc_end1:
|
|
|
|
.size main, .Lfunc_end1-main
|
|
|
|
# -- End function
|