Implement emitWordAt() for the JIT emitter.
authorBrian Gaeke <gaeke@uiuc.edu>
Fri, 23 Apr 2004 17:11:14 +0000 (17:11 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Fri, 23 Apr 2004 17:11:14 +0000 (17:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13118 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/JIT/JITEmitter.cpp

index 2bead72272d04bec755fd1a16e7a3281a77e5597..4cf4c15d3f9e698fb3aa255117fac7035133ce40 100644 (file)
@@ -150,6 +150,7 @@ namespace {
     virtual void* finishFunctionStub(const Function &F);
     virtual void emitByte(unsigned char B);
     virtual void emitWord(unsigned W);
+    virtual void emitWordAt(unsigned W, unsigned *Ptr);
 
     virtual uint64_t getGlobalValueAddress(GlobalValue *V);
     virtual uint64_t getGlobalValueAddress(const std::string &Name);
@@ -244,6 +245,10 @@ void Emitter::emitWord(unsigned W) {
   CurByte += sizeof(unsigned);
 }
 
+void Emitter::emitWordAt(unsigned W, unsigned *Ptr) {
+  *Ptr = W;
+}
+
 uint64_t Emitter::getGlobalValueAddress(GlobalValue *V) {
   // Try looking up the function to see if it is already compiled, if not return
   // 0.