mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -74,24 +74,6 @@ public:
|
||||
/// false.
|
||||
///
|
||||
virtual bool finishFunction(MachineFunction &F) = 0;
|
||||
|
||||
/// startGVStub - This callback is invoked when the JIT needs the
|
||||
/// address of a GV (e.g. function) that has not been code generated yet.
|
||||
/// The StubSize specifies the total size required by the stub.
|
||||
///
|
||||
virtual void startGVStub(const GlobalValue* GV, unsigned StubSize,
|
||||
unsigned Alignment = 1) = 0;
|
||||
|
||||
/// startGVStub - This callback is invoked when the JIT needs the address of a
|
||||
/// GV (e.g. function) that has not been code generated yet. Buffer points to
|
||||
/// memory already allocated for this stub.
|
||||
///
|
||||
virtual void startGVStub(const GlobalValue* GV, void *Buffer,
|
||||
unsigned StubSize) = 0;
|
||||
|
||||
/// finishGVStub - This callback is invoked to terminate a GV stub.
|
||||
///
|
||||
virtual void *finishGVStub(const GlobalValue* F) = 0;
|
||||
|
||||
/// emitByte - This callback is invoked when a byte needs to be written to the
|
||||
/// output stream.
|
||||
@@ -288,14 +270,13 @@ public:
|
||||
|
||||
/// getCurrentPCOffset - Return the offset from the start of the emitted
|
||||
/// buffer that we are currently writing to.
|
||||
uintptr_t getCurrentPCOffset() const {
|
||||
virtual uintptr_t getCurrentPCOffset() const {
|
||||
return CurBufferPtr-BufferBegin;
|
||||
}
|
||||
|
||||
/// addRelocation - Whenever a relocatable address is needed, it should be
|
||||
/// noted with this interface.
|
||||
virtual void addRelocation(const MachineRelocation &MR) = 0;
|
||||
|
||||
|
||||
/// FIXME: These should all be handled with relocations!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user