[vmkit-commits] [vmkit] r119039 - in /vmkit/trunk: include/mvm/Threads/Thread.h lib/J3/Compiler/JavaJIT.cpp lib/J3/LLVMRuntime/runtime-default.ll

Gael Thomas gael.thomas at lip6.fr
Sun Nov 14 04:33:47 PST 2010


Author: gthomas
Date: Sun Nov 14 06:33:47 2010
New Revision: 119039

URL: http://llvm.org/viewvc/llvm-project?rev=119039&view=rev
Log:
The C++ bool type is compiled to the i8 type, not i1! Modify the definition of mvm::Thread in Thread.h and runtime-default.ll to avoid any confusion.
Add a new field in mvm::Thread to hold a pointer to the vm specific virtual machine data (to go from one vm to another in the same thread:)).

Modified:
    vmkit/trunk/include/mvm/Threads/Thread.h
    vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
    vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll

Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=119039&r1=119038&r2=119039&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Sun Nov 14 06:33:47 2010
@@ -194,15 +194,19 @@
  
   /// doYield - Flag to tell the thread to yield for GC reasons.
   ///
-  bool doYield;
+  char doYield;
+
+  /// vmData - vm specific data
+  ///
+  void* vmData;
 
   /// inRV - Flag to tell that the thread is being part of a rendezvous.
   ///
-  bool inRV;
+  char inRV;
 
   /// joinedRV - Flag to tell that the thread has joined a rendezvous.
   ///
-  bool joinedRV;
+  char joinedRV;
 
   /// get - Get the thread specific data of the current thread.
   ///

Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=119039&r1=119038&r2=119039&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Sun Nov 14 06:33:47 2010
@@ -1208,6 +1208,7 @@
     Value* YieldPtr = getDoYieldPtr(getMutatorThreadPtr());
 
     Value* Yield = new LoadInst(YieldPtr, "", currentBlock);
+		Yield =        new ICmpInst(*currentBlock, ICmpInst::ICMP_EQ, Yield, intrinsics->constantInt8Zero, "");
 
     BasicBlock* continueBlock = createBasicBlock("After safe point");
     BasicBlock* yieldBlock = createBasicBlock("In safe point");

Modified: vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll?rev=119039&r1=119038&r2=119039&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll (original)
+++ vmkit/trunk/lib/J3/LLVMRuntime/runtime-default.ll Sun Nov 14 06:33:47 2010
@@ -29,19 +29,20 @@
 
 %CircularBase = type { %VT*, %CircularBase*, %CircularBase* }
 
-;;; Field 0: the parent (circular base)
-;;; Field 1: IsolateID
-;;; Field 2: MyVM
-;;; Field 3: baseSP
-;;; Field 4: doYield
-;;; Field 5: inRV
-;;; Field 6: joinedRV
-;;; Field 7: lastSP
-;;; Field 8: internalThreadID
-;;; field 9: routine
-;;; field 10: lastKnownFrame
-;;; field 11: lastExceptionBuffer
-%Thread = type { %CircularBase, i8*, i8*, i8*, i1, i1, i1, i8*, i8*, i8*, i8*, i8*}
+;;; Field 0:  the parent (circular base)
+;;; Field 1:  size_t IsolateID
+;;; Field 2:  void*  MyVM
+;;; Field 3:  void*  baseSP
+;;; Field 4:  char   doYield
+;;; field 5:  void*  vmData
+;;; Field 6:  char   inRV
+;;; Field 7:  char   joinedRV
+;;; Field 8:  void*  lastSP
+;;; Field 9:  void*  internalThreadID
+;;; field 10: void*  routine
+;;; field 11: void*  lastKnownFrame
+;;; field 12: void*  lastExceptionBuffer
+%Thread = type { %CircularBase, i32, i8*, i8*, i8, i8*, i8, i8, i8*, i8*, i8*, i8*, i8* }
 
 %JavaThread = type { %MutatorThread, i8*, %JavaObject* }
 





More information about the vmkit-commits mailing list