mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[AARCH64][FIX] Emit data symbol for constant pool data
The ARM64 elf emitter would omit printing data symbol for zero filled constant data. This patch overrides the emitFill method as to enforce that the symbol is correctly printed. Differential revision: https://reviews.llvm.org/D53132 llvm-svn: 344248
This commit is contained in:
parent
833f40979d
commit
8218713482
@ -154,6 +154,11 @@ public:
|
||||
MCELFStreamer::EmitValueImpl(Value, Size, Loc);
|
||||
}
|
||||
|
||||
void emitFill(const MCExpr &NumBytes, uint64_t FillValue,
|
||||
SMLoc Loc) override {
|
||||
EmitDataMappingSymbol();
|
||||
MCObjectStreamer::emitFill(NumBytes, FillValue, Loc);
|
||||
}
|
||||
private:
|
||||
enum ElfMappingSymbol {
|
||||
EMS_None,
|
||||
|
15
test/MC/AArch64/CheckDataSymbol.s
Normal file
15
test/MC/AArch64/CheckDataSymbol.s
Normal file
@ -0,0 +1,15 @@
|
||||
# RUN: llvm-mc -filetype=obj -assemble \
|
||||
# RUN: -triple=aarch64- %s -o - \
|
||||
# RUN: | llvm-readobj -s -t - | FileCheck %s
|
||||
# CHECK: Name: $d.1 ({{[1-9][0-9]+}})
|
||||
# CHECK-NEXT: Value: 0x4
|
||||
# CHECK-NEXT: Size: 0
|
||||
# CHECK-NEXT: Binding: Local (0x0)
|
||||
# CHECK-NEXT: Type: None (0x0)
|
||||
# CHECK-NEXT: Other: 0
|
||||
# CHECK-NEXT: Section: .text (0x2)
|
||||
# CHECK-NEXT: }
|
||||
|
||||
.text
|
||||
nop
|
||||
.zero 4
|
Loading…
Reference in New Issue
Block a user