mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-23 12:45:47 +00:00
Fix pr24832.
It is pretty simple now that the yak is shaved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ff5bdb1d8
commit
11431b640c
@ -125,7 +125,6 @@ public:
|
||||
void EmitGPRel32Value(const MCExpr *Value) override;
|
||||
void EmitGPRel64Value(const MCExpr *Value) override;
|
||||
void EmitFill(uint64_t NumBytes, uint8_t FillValue) override;
|
||||
void EmitZeros(uint64_t NumBytes) override;
|
||||
void FinishImpl() override;
|
||||
|
||||
/// Emit the absolute difference between two symbols if possible.
|
||||
|
@ -567,7 +567,7 @@ public:
|
||||
|
||||
/// \brief Emit NumBytes worth of zeros.
|
||||
/// This function properly handles data in virtual sections.
|
||||
virtual void EmitZeros(uint64_t NumBytes);
|
||||
void EmitZeros(uint64_t NumBytes);
|
||||
|
||||
/// \brief Emit some number of copies of \p Value until the byte alignment \p
|
||||
/// ByteAlignment is reached.
|
||||
|
@ -417,18 +417,10 @@ void MCObjectStreamer::EmitGPRel64Value(const MCExpr *Value) {
|
||||
}
|
||||
|
||||
void MCObjectStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
|
||||
// FIXME: A MCFillFragment would be more memory efficient but MCExpr has
|
||||
// problems evaluating expressions across multiple fragments.
|
||||
MCDataFragment *DF = getOrCreateDataFragment();
|
||||
flushPendingLabels(DF, DF->getContents().size());
|
||||
DF->getContents().append(NumBytes, FillValue);
|
||||
}
|
||||
|
||||
void MCObjectStreamer::EmitZeros(uint64_t NumBytes) {
|
||||
const MCSection *Sec = getCurrentSection().first;
|
||||
assert(Sec && "need a section");
|
||||
unsigned ItemSize = Sec->isVirtualSection() ? 0 : 1;
|
||||
insert(new MCFillFragment(0, ItemSize, NumBytes));
|
||||
insert(new MCFillFragment(FillValue, ItemSize, NumBytes));
|
||||
}
|
||||
|
||||
void MCObjectStreamer::FinishImpl() {
|
||||
|
14
test/MC/X86/large-bss.s
Normal file
14
test/MC/X86/large-bss.s
Normal file
@ -0,0 +1,14 @@
|
||||
// RUN: llvm-mc -triple x86_64-pc-linux -filetype=obj %s -o - | llvm-readobj -s | FileCheck %s
|
||||
|
||||
.bss
|
||||
.zero 0x10000000000000
|
||||
|
||||
// CHECK: Name: .bss
|
||||
// CHECK-NEXT: Type: SHT_NOBITS
|
||||
// CHECK-NEXT: Flags [
|
||||
// CHECK-NEXT: SHF_ALLOC
|
||||
// CHECK-NEXT: SHF_WRITE
|
||||
// CHECK-NEXT: ]
|
||||
// CHECK-NEXT: Address: 0x0
|
||||
// CHECK-NEXT: Offset: 0x40
|
||||
// CHECK-NEXT: Size: 4503599627370496
|
Loading…
x
Reference in New Issue
Block a user