1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/MC/RISCV/compress-debug-info.s
Sam Elliott ab5c772c29 [RISCV] Move DebugLoc Copy into CompressInstEmitter
Summary:
This copy ensures that debug location information is kept for
compressed instructions. There are places where both compressInstruction and
uncompressInstruction are called that were not doing this copy, discarding some
debug info.

This change merely moves the copy into the generated file, so you cannot forget
to copy the location over when compressing or uncompressing.

Reviewers: asb, luismarques

Reviewed By: luismarques

Subscribers: sameer.abuasal, aprantl, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67493
2019-12-13 20:01:04 +00:00

21 lines
553 B
ArmAsm

# RUN: llvm-mc -triple riscv32 -mattr=+c %s -g -o - -riscv-no-aliases \
# RUN: | FileCheck %s -check-prefixes=COMPRESS,BOTH
# RUN: llvm-mc -triple riscv32 %s -g -o - -riscv-no-aliases \
# RUN: | FileCheck %s -check-prefixes=UNCOMPRESS,BOTH
# This file ensures that compressing an instruction preserves its debug info.
# BOTH-LABEL: .text
# BOTH: .file 1
# BOTH-SAME: "compress-debug-info.s"
# BOTH: .loc 1 [[# @LINE + 3 ]] 0
# UNCOMPRESS-NEXT: addi a0, a1, 0
# COMPRESS-NEXT: c.mv a0, a1
addi a0, a1, 0
# BOTH-LABEL: .debug_info