Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support ARM architectures again#887

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filmor merged 1 commit intopythonnet:masterfromfilmor:support-arm
Jun 24, 2019
Merged
Show file tree
Hide file tree
Changes fromall 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
4 changes: 4 additions & 0 deletionssrc/runtime/runtime.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -229,6 +229,8 @@ public enum MachineType
{
i386,
x86_64,
armv7l,
armv8,
Other
};

Expand All@@ -247,6 +249,8 @@ public enum MachineType
["amd64"] = MachineType.x86_64,
["x64"] = MachineType.x86_64,
["em64t"] = MachineType.x86_64,
["armv7l"] = MachineType.armv7l,
["armv8"] = MachineType.armv8,
};

/// <summary>
Expand Down
32 changes: 32 additions & 0 deletionssrc/runtime/typemanager.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -510,6 +510,10 @@ public static NativeCode Active
return I386;
case Runtime.MachineType.x86_64:
return X86_64;
case Runtime.MachineType.armv7l:
return Armv7l;
case Runtime.MachineType.armv8:
return Armv8;
default:
throw new NotImplementedException($"No support for {Runtime.MachineName}");
}
Expand DownExpand Up@@ -546,6 +550,34 @@ public static NativeCode Active
/// <see cref="NativeCode.X86_64"/>
/// </summary>
public static readonly NativeCode I386 = X86_64;

public static readonly NativeCode Armv7l = new NativeCode()
{
Return0 = 0,
Return1 = 0x08,
Code = new byte[]
{
0xe3, 0xa0, 0x00, 0x00, // mov r0, #0
0xe1, 0x2f, 0xff, 0x1e, // bx lr

0xe3, 0xa0, 0x00, 0x01, // mov r0, #1
0xe1, 0x2f, 0xff, 0x1e, // bx lr
}
};

public static readonly NativeCode Armv8 = new NativeCode()
{
Return0 = 0,
Return1 = 0x08,
Code = new byte[]
{
0x52, 0x80, 0x00, 0x00, // mov w0, #0x0
0xd6, 0x5f, 0x03, 0xc0, // ret

0x52, 0x80, 0x00, 0x20, // mov w0, #0x1
0xd6, 0x5f, 0x03, 0xc0, // ret
}
};
}

/// <summary>
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp