Skip to content

Commit

Permalink
reg
Browse files Browse the repository at this point in the history
  • Loading branch information
czhower committed Aug 28, 2017
1 parent 1f85c1b commit efe5caf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions playground/Test.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
; +EAX
2 changes: 1 addition & 1 deletion playground/Test.xs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
 +EAX
//END
//! nop
EAX++

Expand Down Expand Up @@ -28,7 +29,6 @@ function ProcessCommand {
// in case any commands modify AL.
// We push EAX to keep stack aligned.
+EAX
//END

// Noop has no data at all (see notes in client DebugConnector), so skip Command ID
// Noop also does not send ACK.
Expand Down
14 changes: 7 additions & 7 deletions source/XSharp/Emitters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected void Namespace(string aNamespace, string aText)

// MUST be before RegXX,OpMath,... because of + vs ++
[Emitter(typeof(RegXX), typeof(OpIncDec))]
protected void IncrementDecrement(string aRegister, object aOpIncrementDecrement)
protected void IncrementDecrement(Register aRegister, object aOpIncrementDecrement)
{
}

Expand All @@ -49,7 +49,7 @@ protected void IncrementDecrement(string aRegister, object aOpIncrementDecrement
[Emitter(typeof(RegXX), typeof(OpEquals), typeof(Variable))]
[Emitter(typeof(RegXX), typeof(OpEquals), typeof(Const))]
[Emitter(typeof(Reg32), typeof(OpEquals), typeof(VariableAddress))]
protected void RegAssignment(string aReg, string aEquals, object aVal)
protected void RegAssignment(Register aReg, string aEquals, object aVal)
{
Asm.Emit(OpCode.Mov, aReg, aVal);
}
Expand Down Expand Up @@ -165,7 +165,7 @@ protected void VariableArrayAssignment(string aVariableName, string aOpOpenBrack
}

[Emitter(typeof(RegXX), typeof(OpEquals), typeof(Variable), typeof(OpOpenBracket), typeof(Int32u), typeof(OpCloseBracket))]
protected void AssignmentToVariable(string aRegister, string aOpEquals, string aVariableName, string aOpOpenBracket, object aIndex, string aOpCloseBracket)
protected void AssignmentToVariable(Register aRegister, string aOpEquals, string aVariableName, string aOpOpenBracket, object aIndex, string aOpCloseBracket)
{
}

Expand All @@ -179,7 +179,7 @@ protected void AssignmentToVariable(string aRegister, string aOpEquals, string a
[Emitter(typeof(Reg32), typeof(OpMath), typeof(Reg32))]
[Emitter(typeof(Reg32), typeof(OpMath), typeof(Int32u))]
[Emitter(typeof(Reg32), typeof(OpMath), typeof(VariableAddress))]
protected void Arithmetic(string aRegister, string aOpArithmetic, object aValue)
protected void Arithmetic(Register aRegister, string aOpArithmetic, object aValue)
{
}

Expand All @@ -192,21 +192,21 @@ protected void Arithmetic(string aRegister, string aOpArithmetic, object aValue)
[Emitter(typeof(Reg32), typeof(OpBitwise), typeof(Reg32))]
[Emitter(typeof(Reg32), typeof(OpBitwise), typeof(Int32u))]
[Emitter(typeof(Reg32), typeof(OpBitwise), typeof(VariableAddress))]
protected void BitwiseArithmetic(string aRegister, string aOpBitwise, object aValue)
protected void BitwiseArithmetic(Register aRegister, string aOpBitwise, object aValue)
{
}

[Emitter(typeof(Reg08), typeof(OpEquals), typeof(OpTilde), typeof(Reg08))]
[Emitter(typeof(Reg16), typeof(OpEquals), typeof(OpTilde), typeof(Reg16))]
[Emitter(typeof(Reg32), typeof(OpEquals), typeof(OpTilde), typeof(Reg32))]
protected void BitwiseNot(string aRegister, string aOpEquals, string aOpTilde, string aSourceRegister)
protected void BitwiseNot(Register aRegister, string aOpEquals, string aOpTilde, string aSourceRegister)
{
}

[Emitter(typeof(RegXX), typeof(OpShift), typeof(Int08u))]
[Emitter(typeof(RegXX), typeof(OpShift), typeof(Int16u))]
[Emitter(typeof(RegXX), typeof(OpShift), typeof(Int32u))]
protected void BitwiseShift(string aRegister, string aBitwiseShift, object aNumberBits)
protected void BitwiseShift(Register aRegister, string aBitwiseShift, object aNumberBits)
{
}

Expand Down

0 comments on commit efe5caf

Please sign in to comment.