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

Commitd834b65

Browse files
committed
Support ARM architectures again
1 parent2bc514f commitd834b65

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

‎src/runtime/runtime.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ public enum MachineType
229229
{
230230
i386,
231231
x86_64,
232+
armv7l,
233+
armv8,
232234
Other
233235
};
234236

@@ -247,6 +249,8 @@ public enum MachineType
247249
["amd64"]=MachineType.x86_64,
248250
["x64"]=MachineType.x86_64,
249251
["em64t"]=MachineType.x86_64,
252+
["armv7l"]=MachineType.armv7l,
253+
["armv8"]=MachineType.armv8,
250254
};
251255

252256
/// <summary>

‎src/runtime/typemanager.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,10 @@ public static NativeCode Active
510510
returnI386;
511511
caseRuntime.MachineType.x86_64:
512512
returnX86_64;
513+
caseRuntime.MachineType.armv7l:
514+
returnArmv7l;
515+
caseRuntime.MachineType.armv8:
516+
returnArmv8;
513517
default:
514518
thrownewNotImplementedException($"No support for{Runtime.MachineName}");
515519
}
@@ -546,6 +550,34 @@ public static NativeCode Active
546550
/// <see cref="NativeCode.X86_64"/>
547551
/// </summary>
548552
publicstaticreadonlyNativeCodeI386=X86_64;
553+
554+
publicstaticreadonlyNativeCodeArmv7l=newNativeCode()
555+
{
556+
Return0=0,
557+
Return1=0x08,
558+
Code=newbyte[]
559+
{
560+
0xe3,0xa0,0x00,0x00,// mov r0, #0
561+
0xe1,0x2f,0xff,0x1e,// bx lr
562+
563+
0xe3,0xa0,0x00,0x01,// mov r0, #1
564+
0xe1,0x2f,0xff,0x1e,// bx lr
565+
}
566+
};
567+
568+
publicstaticreadonlyNativeCodeArmv8=newNativeCode()
569+
{
570+
Return0=0,
571+
Return1=0x08,
572+
Code=newbyte[]
573+
{
574+
0x52,0x80,0x00,0x00,// mov w0, #0x0
575+
0xd6,0x5f,0x03,0xc0,// ret
576+
577+
0x52,0x80,0x00,0x20,// mov w0, #0x1
578+
0xd6,0x5f,0x03,0xc0,// ret
579+
}
580+
};
549581
}
550582

551583
/// <summary>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp