-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da52a13
commit 4fb5bbd
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Arrowgene.Services.Assembly | ||
{ | ||
public abstract class OpCode | ||
{ | ||
// https://github.com/libcpu/libcpu/blob/master/arch/x86/x86_decode.cpp | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
|
||
namespace Arrowgene.Services.Assembly.X86 | ||
{ | ||
public class ROL : OpCode | ||
{ | ||
public static UInt64 RotateLeft(UInt64 x, int n) { | ||
return (x << n) | (x >> (64-n)); | ||
} | ||
|
||
public static UInt32 RotateLeft(UInt32 x, int n) { | ||
return (x << n) | (x >> (32-n)); | ||
} | ||
|
||
public static UInt16 RotateLeft(UInt16 x, int n) { | ||
return (ushort) ((x << n) | (x >> (16-n))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
namespace Arrowgene.Services.Assembly.X86 | ||
{ | ||
public class ROR : OpCode | ||
{ | ||
public static UInt64 RotateRight(UInt64 x, int n) | ||
{ | ||
return (x >> n) | (x << (64 - n)); | ||
} | ||
|
||
public static UInt32 RotateRight(UInt32 x, int n) | ||
{ | ||
return (x >> n) | (x << (32 - n)); | ||
} | ||
|
||
public static UInt16 RotateRight(UInt16 x, int n) | ||
{ | ||
return (ushort) ((x >> n) | (x << (16 - n))); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.13.2 | ||
1.13.3 |