Split main project into core,graphics and chocolarm4 subproject (#29)
This commit is contained in:
parent
cb665bb715
commit
62b827f474
257 changed files with 415 additions and 285 deletions
41
ChocolArm64/Instruction/AInstEmitMove.cs
Normal file
41
ChocolArm64/Instruction/AInstEmitMove.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
using ChocolArm64.Decoder;
|
||||
using ChocolArm64.Translation;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace ChocolArm64.Instruction
|
||||
{
|
||||
static partial class AInstEmit
|
||||
{
|
||||
public static void Movk(AILEmitterCtx Context)
|
||||
{
|
||||
AOpCodeMov Op = (AOpCodeMov)Context.CurrOp;
|
||||
|
||||
Context.EmitLdintzr(Op.Rd);
|
||||
Context.EmitLdc_I(~(0xffffL << Op.Pos));
|
||||
|
||||
Context.Emit(OpCodes.And);
|
||||
|
||||
Context.EmitLdc_I(Op.Imm);
|
||||
|
||||
Context.Emit(OpCodes.Or);
|
||||
|
||||
Context.EmitStintzr(Op.Rd);
|
||||
}
|
||||
|
||||
public static void Movn(AILEmitterCtx Context)
|
||||
{
|
||||
AOpCodeMov Op = (AOpCodeMov)Context.CurrOp;
|
||||
|
||||
Context.EmitLdc_I(~Op.Imm);
|
||||
Context.EmitStintzr(Op.Rd);
|
||||
}
|
||||
|
||||
public static void Movz(AILEmitterCtx Context)
|
||||
{
|
||||
AOpCodeMov Op = (AOpCodeMov)Context.CurrOp;
|
||||
|
||||
Context.EmitLdc_I(Op.Imm);
|
||||
Context.EmitStintzr(Op.Rd);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue