To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 78b3dfd0 authored by Kunshan Wang's avatar Kunshan Wang
Browse files

WIP: HAIL assignment

parent 28426491
......@@ -48,6 +48,13 @@ class MicroVM(heapSize: Word = MicroVM.DEFAULT_HEAP_SIZE,
globalBundle.typeNs.add(InternalTypes.BYTES_R)
globalBundle.typeNs.add(InternalTypes.REFS)
globalBundle.typeNs.add(InternalTypes.REFS_R)
// Some internal constants needed
constantPool.addGlobalVar(InternalTypes.NULL_REF_VOID)
constantPool.addGlobalVar(InternalTypes.NULL_IREF_VOID)
constantPool.addGlobalVar(InternalTypes.NULL_FUNCREF_VV)
constantPool.addGlobalVar(InternalTypes.NULL_THREADREF)
constantPool.addGlobalVar(InternalTypes.NULL_STACKREF)
}
/**
......
......@@ -17,20 +17,20 @@ import java.nio.charset.Charset
object MuValue {
def apply(ty: Type, vb: ValueBox): MuValue = (ty, vb) match {
case (t: TypeInt, v: BoxInt) => MuIntValue(t, v)
case (t: TypeFloat, v: BoxFloat) => MuFloatValue(t, v)
case (t: TypeDouble, v: BoxDouble) => MuDoubleValue(t, v)
case (t: TypeRef, v: BoxRef) => MuRefValue(t, v)
case (t: TypeIRef, v: BoxIRef) => MuIRefValue(t, v)
case (t: TypeStruct, v: BoxSeq) => MuStructValue(t, v)
case (t: TypeArray, v: BoxSeq) => MuArrayValue(t, v)
case (t: TypeVector, v: BoxSeq) => MuVectorValue(t, v)
case (t: TypeFuncRef, v: BoxFunc) => MuFuncRefValue(t, v)
case (t: TypeThreadRef, v: BoxThread) => MuThreadRefValue(t, v)
case (t: TypeStackRef, v: BoxStack) => MuStackRefValue(t, v)
case (t: TypeInt, v: BoxInt) => MuIntValue(t, v)
case (t: TypeFloat, v: BoxFloat) => MuFloatValue(t, v)
case (t: TypeDouble, v: BoxDouble) => MuDoubleValue(t, v)
case (t: TypeRef, v: BoxRef) => MuRefValue(t, v)
case (t: TypeIRef, v: BoxIRef) => MuIRefValue(t, v)
case (t: TypeStruct, v: BoxSeq) => MuStructValue(t, v)
case (t: TypeArray, v: BoxSeq) => MuArrayValue(t, v)
case (t: TypeVector, v: BoxSeq) => MuVectorValue(t, v)
case (t: TypeFuncRef, v: BoxFunc) => MuFuncRefValue(t, v)
case (t: TypeThreadRef, v: BoxThread) => MuThreadRefValue(t, v)
case (t: TypeStackRef, v: BoxStack) => MuStackRefValue(t, v)
case (t: TypeTagRef64, v: BoxTagRef64) => MuTagRef64Value(t, v)
case (t: TypeUPtr, v: BoxPointer) => MuUPtrValue(t, v)
case (t: TypeUFuncPtr, v: BoxPointer) => MuUFPValue(t, v)
case (t: TypeUPtr, v: BoxPointer) => MuUPtrValue(t, v)
case (t: TypeUFuncPtr, v: BoxPointer) => MuUFPValue(t, v)
case (t, v) => {
throw new IllegalArgumentException("Improper type-box pair: %s,%s".format(t.toString, vb.getClass.getSimpleName))
}
......@@ -254,11 +254,11 @@ class MuCtx(_mutator: Mutator)(
/** Compare general reference types for equality. */
def refEq(lhs: MuGenRefValue, rhs: MuGenRefValue): Boolean = (lhs, rhs) match {
case (l: MuRefValue, r: MuRefValue) => l.vb.objRef == r.vb.objRef
case (l: MuIRefValue, r: MuIRefValue) => l.vb.oo == r.vb.oo
case (l: MuFuncRefValue, r: MuFuncRefValue) => l.vb.func == r.vb.func
case (l: MuRefValue, r: MuRefValue) => l.vb.objRef == r.vb.objRef
case (l: MuIRefValue, r: MuIRefValue) => l.vb.oo == r.vb.oo
case (l: MuFuncRefValue, r: MuFuncRefValue) => l.vb.func == r.vb.func
case (l: MuThreadRefValue, r: MuThreadRefValue) => l.vb.thread == r.vb.thread
case (l: MuStackRefValue, r: MuStackRefValue) => l.vb.stack == r.vb.stack
case (l: MuStackRefValue, r: MuStackRefValue) => l.vb.stack == r.vb.stack
case (l, r) => {
throw new IllegalArgumentException("Bad types for refEq: %s and %s".format(
l.showTy, r.showTy))
......@@ -336,8 +336,8 @@ class MuCtx(_mutator: Mutator)(
val nt = microVM.globalBundle.typeNs(newType)
val nh = (opnd, nt) match {
case (MuRefValue(ty, vb), ty2 @ TypeRef(_)) => MuRefValue(ty2, vb)
case (MuIRefValue(ty, vb), ty2 @ TypeIRef(_)) => MuIRefValue(ty2, vb)
case (MuRefValue(ty, vb), ty2 @ TypeRef(_)) => MuRefValue(ty2, vb)
case (MuIRefValue(ty, vb), ty2 @ TypeIRef(_)) => MuIRefValue(ty2, vb)
case (MuFuncRefValue(ty, vb), ty2 @ TypeFuncRef(_)) => MuFuncRefValue(ty2, vb)
case _ => {
throw new IllegalArgumentException("Bad types for refcast: opnd:%s, newType:%s".format(
......@@ -481,7 +481,7 @@ class MuCtx(_mutator: Mutator)(
val sta = microVM.threadStackManager.newStack(funcVal, mutator)
val nb = BoxStack(Some(sta))
addHandle(MuStackRefValue(InternalTypes.STACK, nb))
addHandle(MuStackRefValue(InternalTypes.STACKREF, nb))
}
private def getStackNotNull(stack: MuStackRefValue): InterpreterStack = {
......@@ -495,12 +495,12 @@ class MuCtx(_mutator: Mutator)(
val sv = getStackNotNull(stack)
val itprHtr = htr match {
case HowToResume.PassValues(values) => ItprHowToResume.PassValues(values.map(_.vb))
case HowToResume.ThrowExc(exc) => ItprHowToResume.ThrowExc(exc.vb.objRef)
case HowToResume.ThrowExc(exc) => ItprHowToResume.ThrowExc(exc.vb.objRef)
}
val thr = microVM.threadStackManager.newThread(sv, itprHtr)
val nb = BoxThread(Some(thr))
addHandle(MuThreadRefValue(InternalTypes.THREAD, nb))
addHandle(MuThreadRefValue(InternalTypes.THREADREF, nb))
}
/** Kill a Mu stack. */
......@@ -660,7 +660,7 @@ class MuCtx(_mutator: Mutator)(
def pin(loc: MuValue): MuUPtrValue = {
val (objTy, (objRef, offset)) = loc match {
case MuRefValue(t, vb) => (t, (vb.objRef, 0L))
case MuRefValue(t, vb) => (t, (vb.objRef, 0L))
case MuIRefValue(t, vb) => (t, vb.oo)
case _ => {
throw new IllegalArgumentException("loc must be ref or iref. Found %s".format(loc.ty))
......@@ -674,7 +674,7 @@ class MuCtx(_mutator: Mutator)(
def unpin(loc: MuValue): Unit = {
val (objTy, objRef) = loc match {
case MuRefValue(t, vb) => (t, vb.objRef)
case MuRefValue(t, vb) => (t, vb.objRef)
case MuIRefValue(t, vb) => (t, vb.objRef)
case _ => {
throw new IllegalArgumentException("loc must be ref or iref. Found %s".format(loc.ty))
......@@ -703,21 +703,29 @@ class MuCtx(_mutator: Mutator)(
// Internal methods for the micro VM
def handleFromInterpreterThread(thr: Option[InterpreterThread]): MuThreadRefValue = {
val t = InternalTypes.THREAD
val t = InternalTypes.THREADREF
val box = BoxThread(thr)
addHandle(MuThreadRefValue(t, box))
}
def handleFromInterpreterStack(sta: Option[InterpreterStack]): MuStackRefValue = {
val s = InternalTypes.STACK
val s = InternalTypes.STACKREF
val box = BoxStack(sta)
addHandle(MuStackRefValue(s, box))
}
def handleFromAddr(addr: Long): MuRefValue = {
val t = InternalTypes.REF_VOID
val box = BoxRef(addr)
addHandle(MuRefValue(t, box))
}
}
object RichMuCtx {
/** Allow you to use the `val h = x << ctx.makeSomeHandle()` or `val h = x(ctx.makeSomeHandle())`
* syntax to dispose it later*/
/**
* Allow you to use the `val h = x << ctx.makeSomeHandle()` or `val h = x(ctx.makeSomeHandle())`
* syntax to dispose it later
*/
class DelayedDisposer(garbageList: Buffer[MuValue]) {
def apply[T <: MuValue](v: T): T = {
garbageList += v
......
package uvm.refimpl.hail
import scala.collection.JavaConversions.asScalaBuffer
import scala.collection.JavaConversions._
import scala.collection.mutable.HashMap
import org.antlr.v4.runtime.ANTLRInputStream
import org.antlr.v4.runtime.CommonTokenStream
......@@ -8,47 +8,14 @@ import org.antlr.v4.runtime.ParserRuleContext
import uvm.ir.textinput.TextIRParsingException
import uvm.ir.textinput.gen.HAILLexer
import uvm.ir.textinput.gen.HAILParser
import uvm.ir.textinput.gen.HAILParser.DoubleBitsContext
import uvm.ir.textinput.gen.HAILParser.DoubleInfContext
import uvm.ir.textinput.gen.HAILParser.DoubleLiteralContext
import uvm.ir.textinput.gen.HAILParser.DoubleNanContext
import uvm.ir.textinput.gen.HAILParser.DoubleNumberContext
import uvm.ir.textinput.gen.HAILParser.FixedAllocContext
import uvm.ir.textinput.gen.HAILParser.FloatBitsContext
import uvm.ir.textinput.gen.HAILParser.FloatInfContext
import uvm.ir.textinput.gen.HAILParser.FloatLiteralContext
import uvm.ir.textinput.gen.HAILParser.FloatNanContext
import uvm.ir.textinput.gen.HAILParser.FloatNumberContext
import uvm.ir.textinput.gen.HAILParser.HailContext
import uvm.ir.textinput.gen.HAILParser.HybridAllocContext
import uvm.ir.textinput.gen.HAILParser.IntGlobalContext
import uvm.ir.textinput.gen.HAILParser.IntLitContext
import uvm.ir.textinput.gen.HAILParser.IntLiteralContext
import uvm.ir.textinput.gen.HAILParser.LValueContext
import uvm.ir.textinput.gen.HAILParser.MemInitContext
import uvm.ir.textinput.gen.HAILParser.RValueContext
import uvm.ir.textinput.gen.HAILParser.TypeContext
import uvm.refimpl.MicroVM
import uvm.refimpl.MuCtx
import uvm.refimpl.MuIRefValue
import uvm.refimpl.MuRefValue
import uvm.refimpl.UvmHailParsingException
import uvm.refimpl.UvmHailParsingException
import uvm.refimpl.UvmHailParsingException
import uvm.refimpl.UvmHailParsingException
import uvm.ssavariables.ConstInt
import uvm.types.Type
import uvm.types.TypeHybrid
import uvm.utils.AntlrHelpers.AccumulativeAntlrErrorListener
import uvm.utils.AntlrHelpers.inCtx
import uvm.ir.textinput.gen.HAILParser.IntExprContext
import uvm.refimpl.MuStructValue
import uvm.types.TypeStruct
import uvm.refimpl.UvmHailParsingException
import uvm.types.AbstractSeqType
import uvm.ir.textinput.gen.HAILParser._
import uvm.refimpl._
import uvm.refimpl.mem.HeaderUtils
import uvm.refimpl.itpr.MemoryOperations
import uvm.refimpl.mem.MemorySupport
import uvm.ssavariables._
import uvm.types._
import uvm.utils.AntlrHelpers._
import uvm.ssavariables.MemoryOrder.NOT_ATOMIC
class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport) {
def loadHail(hailScript: String): Unit = {
......@@ -70,28 +37,6 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
loadTopLevel(ast)
}
def catchIn[T](ctx: ParserRuleContext, s: String)(func: => T): T = try {
func
} catch {
case e: UvmHailParsingException => throw new UvmHailParsingException(inCtx(ctx, e.getMessage), e)
case e: Exception => throw new UvmHailParsingException(inCtx(ctx, s), e)
}
implicit def resTy(ctx: TypeContext): Type = catchIn(ctx, "Unable to resolve type") { resTyByName(ctx.getText) }
private def resTyByName(name: String): Type = microVM.globalBundle.typeNs(name)
implicit def resConstInt(ctx: IntGlobalContext): BigInt = catchIn(ctx, "Unable to resolve constant int") { resConstIntByName(ctx.getText) }
private def resConstIntByName(name: String): BigInt = {
val const = microVM.globalBundle.constantNs.get(name).getOrElse {
throw new UvmHailParsingException("Type %s not found".format(name))
}
const match {
case ConstInt(ty, num) => num
case _ => throw new UvmHailParsingException("Expected constant int. Found %s: ty=".format(const.repr, const.constTy))
}
}
private type HailObjMap = HashMap[String, MuRefValue]
private def loadTopLevel(ast: HailContext): Unit = {
......@@ -160,7 +105,7 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
val nir = mc.getVarPartIRef(iref)
// For debug purpose, we keep the upperbound recorded. Out-of-bound access has undefined behaviour.
val len = HeaderUtils.getVarLength(iref.vb.objRef)
(nir, Some(len))
(nir, Some(len))
} else {
val nir = mc.getFieldIRef(iref, index.toInt)
(nir, None)
......@@ -191,7 +136,7 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
(nir, None)
}
}
new LValue(newIRef, newVarLen, baseCtx, ctx)
}
}
......@@ -214,7 +159,7 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
iref
}
}
new LValue(base, None, baseCtx, baseCtx)
}
}
......@@ -235,65 +180,76 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
cur
}
/**
* Index into an iref in a general way.
* @param varLen: None if base is not the var part. Some(l) if base is the 0-th elem of the var part of a hybrid whose actual length is l.
*/
private def generalIndex(base: MuIRefValue, index: Long, varLen: Option[Long])(
implicit mc: MuCtx, ctx: ParserRuleContext): MuIRefValue = {
varLen match {
case None => { // not in the var-part of a hybrid
base.ty.ty match {
case t: TypeStruct => {
val ii = index.toInt
if (ii < 0 || ii >= t.fieldTys.length) {
throw new UvmHailParsingException(inCtx(ctx, "Index out of bound. Struct %s has %d fields. Found index: %d".format(
t, t.fieldTys.length, ii)))
}
mc.getFieldIRef(base, index.toInt)
}
case t: TypeHybrid => {
val ii = index.toInt
if (ii < 0 || ii > t.fieldTys.length) {
throw new UvmHailParsingException(inCtx(ctx, "Index out of bound. Hybrid %s has %d fields. Found index: %d".format(
t, t.fieldTys.length, ii)))
}
mc.getFieldIRef(base, index.toInt)
}
case t: AbstractSeqType => {
val ii = index.toLong
if (ii < 0 || ii >= t.len) {
throw new UvmHailParsingException(inCtx(ctx, "Index out of bound. Sequence type %s has %d elements. Found index: %d".format(
t, t.len, ii)))
}
val hII = mc.handleFromInt(ii, 64)
val nc = mc.getElemIRef(base, hII)
mc.deleteValue(hII)
nc
}
def assign(lv: LValue, rv: RValueContext)(implicit mc: MuCtx, hailObjMap: HailObjMap): Unit = {
val lir = lv.iref
val lty = lir.ty.ty // LValue referent type.
def unexpectedRValueError(): Nothing = {
throw new UvmHailParsingException(inCtx(rv, "Unsuitable RValue for LValue type %s".format(lty)))
}
def unexpectedGlobalTypeError(gv: GlobalVariable): Nothing = {
throw new UvmHailParsingException(inCtx(rv, "Unsuitable global variable type. Expected: %s, Found: %s".format(
lty, TypeInferer.inferType(gv))))
}
(lty, rv) match {
case (TypeInt(len), rv) => {
val hi = rv match {
case il: RVIntContext => mc.handleFromInt(il.intLiteral, len)
case RVGlobalOf(gv: ConstInt) => mc.handleFromConst(gv.id)
case RVGlobalOf(gv) => unexpectedGlobalTypeError(gv)
case _ => unexpectedRValueError()
}
mc.store(NOT_ATOMIC, lir, hi)
mc.deleteValue(hi)
}
case Some(l) => { // in the var-part of a hybrid
val ii = index.toLong
if (ii < 0 || ii >= l) {
throw new UvmHailParsingException(inCtx(ctx, "Index out of bound. Hybrid %s has %d actual var-part elements. Found index: %d".format(
base.ty, l, ii)))
case (TypeFloat(), rv) => {
val hf = rv match {
case fl: RVFloatContext => mc.handleFromFloat(fl.floatLiteral)
case RVGlobalOf(gv: ConstFloat) => mc.handleFromConst(gv.id)
case RVGlobalOf(gv) => unexpectedGlobalTypeError(gv)
case _ => unexpectedRValueError()
}
val hII = mc.handleFromInt(ii, 64)
val nc = mc.shiftIRef(base, hII)
mc.deleteValue(hII)
nc
mc.store(NOT_ATOMIC, lir, hf)
mc.deleteValue(hf)
}
case (TypeDouble(), rv) => {
val hf = rv match {
case fl: RVDoubleContext => mc.handleFromDouble(fl.doubleLiteral)
case RVGlobalOf(gv: ConstDouble) => mc.handleFromConst(gv.id)
case RVGlobalOf(gv) => unexpectedGlobalTypeError(gv)
case _ => unexpectedRValueError()
}
mc.store(NOT_ATOMIC, lir, hf)
mc.deleteValue(hf)
}
case (TypeRef(ty), rv) => {
val (hr, del) = rv match {
case nu: RVNullContext => (mc.handleFromConst(InternalTypes.NULL_REF_VOID.id), true)
case hr: RVHailRefContext => {
val name = hr.HAIL_NAME().getText
val href = hailObjMap.getOrElse(name, {
throw new UvmHailParsingException(inCtx(rv, "HAIL name %s not defined. It needs to be defined BEFORE this".format(name)))
})
(href, false)
}
case _ => unexpectedRValueError()
}
mc.store(NOT_ATOMIC, lir, hr)
if (del) mc.deleteValue(hr)
}
case (t: TypeIRef, rv) => {
???
}
case _ => unexpectedRValueError()
}
}
def assign(lv: LValue, rv: RValueContext): Unit = {
???
}
def evalIntExpr(ie: IntExprContext): BigInt = {
ie match {
case i: IntLitContext => IntLiteralToBigInt(i.intLiteral())
case i: IntLitContext => IntLiteralToBigInt(i.intLiteral())
case i: IntGlobalContext => resConstInt(i)
}
}
......@@ -308,12 +264,12 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
val neg = sign match {
case "+" => false
case "-" => true
case "" => false
case "" => false
}
val abs = prefix match {
case "0x" => BigInt(nums, 16)
case "0" => if (nums == "") BigInt(0) else BigInt(nums, 8)
case "" => BigInt(nums, 10)
case "0" => if (nums == "") BigInt(0) else BigInt(nums, 8)
case "" => BigInt(nums, 10)
}
return if (neg) -abs else abs
}
......@@ -327,7 +283,7 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
java.lang.Float.NEGATIVE_INFINITY
else java.lang.Float.POSITIVE_INFINITY
}
case _: FloatNanContext => java.lang.Float.NaN
case _: FloatNanContext => java.lang.Float.NaN
case bits: FloatBitsContext => java.lang.Float.intBitsToFloat(bits.intLiteral().intValue())
}
......@@ -338,7 +294,45 @@ class HailScriptLoader(implicit microVM: MicroVM, memorySupport: MemorySupport)
java.lang.Double.NEGATIVE_INFINITY
else java.lang.Double.POSITIVE_INFINITY
}
case _: DoubleNanContext => java.lang.Double.NaN
case _: DoubleNanContext => java.lang.Double.NaN
case bits: DoubleBitsContext => java.lang.Double.longBitsToDouble(bits.intLiteral().longValue())
}
def catchIn[T](ctx: ParserRuleContext, s: String)(func: => T): T = try {
func
} catch {
case e: UvmHailParsingException => throw new UvmHailParsingException(inCtx(ctx, e.getMessage), e)
case e: Exception => throw new UvmHailParsingException(inCtx(ctx, s), e)
}
implicit def resTy(ctx: TypeContext): Type = catchIn(ctx, "Unable to resolve type") { resTyByName(ctx.getText) }
private def resTyByName(name: String): Type = microVM.globalBundle.typeNs(name)
implicit def resConstInt(ctx: IntGlobalContext): BigInt = catchIn(ctx, "Unable to resolve constant int") { resConstIntByName(ctx.getText) }
private def resConstIntByName(name: String): BigInt = {
val const = microVM.globalBundle.constantNs.get(name).getOrElse {
throw new UvmHailParsingException("Type %s not found".format(name))
}
const match {
case ConstInt(ty, num) => num
case _ => throw new UvmHailParsingException("Expected constant int. Found %s: ty=".format(const.repr, const.constTy))
}
}
def resRVGlobal(ctx: RVGlobalContext): GlobalVariable = {
val name = ctx.GLOBAL_NAME.getText
val gv = microVM.globalBundle.globalVarNs.get(name).getOrElse {
throw new UvmHailParsingException(inCtx(ctx, "Global variable %s not found".format(name)))
}
gv
}
object RVGlobalOf {
def unapply(g: RVGlobalContext): Option[GlobalVariable] = {
val gv = resRVGlobal(g)
Some(gv)
}
}
}
\ No newline at end of file
......@@ -35,15 +35,25 @@ object InternalTypes {
val BYTE_ARRAY = TypeHybrid(Seq(), BYTE) := internal("byte_array")
val REF_VOID = TypeRef(VOID) := internal("ref_void")
val IREF_VOID = TypeIRef(VOID) := internal("iref_void")
val STACK = TypeStackRef() := internal("stack")
val THREAD = TypeThreadRef() := internal("thread")
val SIG_VV = FuncSig(Seq(), Seq()) := internal("sig_vv")
val FUNCREF_VV = TypeFuncRef(SIG_VV) := internal("funcref_vv")
val STACKREF = TypeStackRef() := internal("stackref")
val THREADREF = TypeThreadRef() := internal("threadref")
val TAGREF64 = TypeTagRef64() := internal("tagref64")
val BYTES = TypeHybrid(Seq(I64), I8) := (0x260, "@uvm.meta.bytes")
val BYTES_R = TypeRef(BYTES) := (0x261, "@uvm.meta.bytes_r")
val REFS = TypeHybrid(Seq(I64), REF_VOID) := (0x262, "@uvm.meta.refs")
val REFS_R = TypeRef(BYTES) := (0x263, "@uvm.meta.refs_r")
val NULL_REF_VOID = ConstNull(REF_VOID) := internal("null_ref_void")
val NULL_IREF_VOID = ConstNull(IREF_VOID) := internal("null_iref_void")
val NULL_FUNCREF_VV = ConstNull(FUNCREF_VV) := internal("null_funcref_vv")
val NULL_THREADREF = ConstNull(STACKREF) := internal("null_threadref")
val NULL_STACKREF = ConstNull(THREADREF) := internal("null_stackref")
}
object InternalTypePool {
......@@ -122,16 +132,16 @@ object TypeInferer {
case i: InstTrap => i.retTys
case i: InstWatchPoint => i.retTys
case i: InstCCall => i.sig.retTys
case i: InstNewThread => Seq(THREAD)
case i: InstNewThread => Seq(THREADREF)
case i: InstSwapStack => i.curStackAction match {
case RetWith(t) => t
case _: KillOld => Seq()
}
case i: InstCommInst => i.inst.name.get match {
case "@uvm.new_stack" => Seq(STACK)
case "@uvm.new_stack" => Seq(STACKREF)
case "@uvm.kill_stack" => Seq()
case "@uvm.thread_exit" => Seq()
case "@uvm.current_stack" => Seq(STACK)
case "@uvm.current_stack" => Seq(STACKREF)
case "@uvm.tr64.is_fp" => Seq(I1)
case "@uvm.tr64.is_int" => Seq(I1)
case "@uvm.tr64.is_ref" => Seq(I1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment