Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
HJLebbink committed Jun 26, 2017
1 parent be9eef3 commit 5eef420
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ labelx:
jnz labelx
mov rax, rcx

aaa
vaddpd

mov rcx, 10
mov r10, rcx ; store the parameter rcx in r10
Expand Down
5 changes: 4 additions & 1 deletion VS/CSHARP/asm-dude-vsix/Tools/AsmSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,9 @@ string ToString_LOCAL(Tv[] array)
{
try
{
if (this._syntax_Errors.ContainsKey(lineNumber)) return (HasValue: false, Bussy: false);
if (this._isNotImplemented.Contains(lineNumber)) return (HasValue: false, Bussy: false);

var state = (before)
? this.Get_State_Before(lineNumber, false, false)
: this.Get_State_After(lineNumber, false, false);
Expand All @@ -683,7 +686,7 @@ string ToString_LOCAL(Tv[] array)
}
foreach (Tv tv in content)
{
if ((tv == Tv.ONE) || (tv == Tv.ZERO) || (tv == Tv.UNDEFINED)) return (true, false);
if ((tv == Tv.ONE) || (tv == Tv.ZERO) || (tv == Tv.UNDEFINED) || (tv == Tv.INCONSISTENT)) return (true, false);
}
return (false, false);
}
Expand Down
15 changes: 11 additions & 4 deletions VS/CSHARP/asm-sim-lib/StateUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,16 +671,23 @@ public void SetMem(BitVecExpr address, BitVecExpr value, BitVecExpr undef)
ArrayExpr memKey = Tools.Create_Mem_Key(this.NextKey, ctx);

//Console.WriteLine("SetMem: memKey=" + memKey + "; new Value=" + newMemContent);
if (this._mem_Update != null) throw new Exception("Multiple memory updates are not allowed");

if (this._mem_Update != null)
{
Console.WriteLine("WARNING: StateUpdate:SetMem: multiple memory updates are not allowed");
//throw new Exception("Multiple memory updates are not allowed");
}
this._mem_Update = ctx.MkEq(memKey, newMemContent);
this._mem_Update_U = ctx.MkEq(memKey, newMemContent_U);
}
}
public void SetMem(ArrayExpr memContent)
{
if (this._mem_Full != null) throw new Exception();
this._mem_Full = memContent;
if (this._mem_Full != null)
{
Console.WriteLine("WARNING: StateUpdate:SetMem: multiple memory updates are not allowed");
//throw new Exception("Multiple memory updates are not allowed");
}
this._mem_Full = memContent.Translate(this._ctx) as ArrayExpr;
}
#endregion

Expand Down

0 comments on commit 5eef420

Please sign in to comment.