mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Do relaxations with FT_Org fragments. Fixes the FIXME:
// FIXME: We should compute this sooner, we don't want to recurse here, and // we would like to be more functional. In MCAssembler::ComputeFragmentSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -319,10 +319,13 @@ class MCOrgFragment : public MCFragment {
|
||||
/// Value - Value to use for filling bytes.
|
||||
int8_t Value;
|
||||
|
||||
/// Size - The current estimate of the size.
|
||||
unsigned Size;
|
||||
|
||||
public:
|
||||
MCOrgFragment(const MCExpr &_Offset, int8_t _Value, MCSectionData *SD = 0)
|
||||
: MCFragment(FT_Org, SD),
|
||||
Offset(&_Offset), Value(_Value) {}
|
||||
Offset(&_Offset), Value(_Value), Size(0) {}
|
||||
|
||||
/// @name Accessors
|
||||
/// @{
|
||||
@@ -331,6 +334,9 @@ public:
|
||||
|
||||
uint8_t getValue() const { return Value; }
|
||||
|
||||
unsigned getSize() const { return Size; }
|
||||
|
||||
void setSize(unsigned Size_) { Size = Size_; }
|
||||
/// @}
|
||||
|
||||
static bool classof(const MCFragment *F) {
|
||||
@@ -715,6 +721,9 @@ private:
|
||||
bool RelaxInstruction(const MCObjectWriter &Writer, MCAsmLayout &Layout,
|
||||
MCInstFragment &IF);
|
||||
|
||||
bool RelaxOrg(const MCObjectWriter &Writer, MCAsmLayout &Layout,
|
||||
MCOrgFragment &OF);
|
||||
|
||||
bool RelaxLEB(const MCObjectWriter &Writer, MCAsmLayout &Layout,
|
||||
MCLEBFragment &IF);
|
||||
|
||||
|
Reference in New Issue
Block a user