Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Implement MM registers #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions source/XSharp/XSharp/Assembler/Gen1/x86/Registers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ public enum RegistersEnum: byte
CR2,
CR3,
CR4,
MM0,
MM1,
MM2,
MM3,
MM4,
MM5,
MM6,
MM7,
XMM0,
XMM1,
XMM2,
Expand Down
17 changes: 17 additions & 0 deletions source/XSharp/XSharp/Gen1/XSRegisters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public enum RegisterSize : byte
Short16 = 16,
Int32 = 32,
Long64 = 64,
MM = 64,
FPU = 128,
XMM = 128
}
Expand Down Expand Up @@ -85,6 +86,13 @@ public RegisterFPU(string name, RegistersEnum regEnum) : base(name, regEnum, Reg
}
}

public class RegisterMM : Register
{
public RegisterMM(string name, RegistersEnum regEnum) : base(name, regEnum, RegisterSize.MM)
{
}
}

public class RegisterXMM : Register
{
public RegisterXMM(string name, RegistersEnum regEnum) : base(name, regEnum, RegisterSize.XMM)
Expand Down Expand Up @@ -141,6 +149,15 @@ public RegisterSegment(string name, RegistersEnum regEnum) : base(name, regEnum,
public static readonly RegisterFPU ST6 = new RegisterFPU(nameof(ST6), RegistersEnum.ST6);
public static readonly RegisterFPU ST7 = new RegisterFPU(nameof(ST7), RegistersEnum.ST7);

public static readonly RegisterMM MM0 = new RegisterMM(nameof(MM0), RegistersEnum.MM0);
public static readonly RegisterMM MM1 = new RegisterMM(nameof(MM1), RegistersEnum.MM1);
public static readonly RegisterMM MM2 = new RegisterMM(nameof(MM2), RegistersEnum.MM2);
public static readonly RegisterMM MM3 = new RegisterMM(nameof(MM3), RegistersEnum.MM3);
public static readonly RegisterMM MM4 = new RegisterMM(nameof(MM4), RegistersEnum.MM4);
public static readonly RegisterMM MM5 = new RegisterMM(nameof(MM5), RegistersEnum.MM5);
public static readonly RegisterMM MM6 = new RegisterMM(nameof(MM6), RegistersEnum.MM6);
public static readonly RegisterMM MM7 = new RegisterMM(nameof(MM7), RegistersEnum.MM7);

public static readonly RegisterXMM XMM0 = new RegisterXMM(nameof(XMM0), RegistersEnum.XMM0);
public static readonly RegisterXMM XMM1 = new RegisterXMM(nameof(XMM1), RegistersEnum.XMM1);
public static readonly RegisterXMM XMM2 = new RegisterXMM(nameof(XMM2), RegistersEnum.XMM2);
Expand Down
Loading