You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[assembler] provides a fast, run-time assembler for x86-64 long mode instructions using function calls for Rust. In using a design that Rust's release build optimizations can work effectively with, it provides the ability to embed the assembled machine code instructions as templates inside Rust code, so as to make specialized code generation as fast as possible. It is particularly suited to being the backend to a JIT.
4
4
5
-
This technique differs to that used in [dynasm], but was driven by the need to programmatically generate complex assembler to optimize message filters at runtime. The code for instruction generation is inspired by that from Stanford's [x64asm].
5
+
This technique differs to that used in [dynasm], but was driven by the need to programmatically generate complex assembler to optimize message filter functions at runtime. The code for the instruction generation is inspired by that from Stanford's [x64asm].
6
6
7
7
As a consequence, jump (and similar) instruction relaxation is not performed, ie all jumps use 32-bit displacements instead of being optimized for 8-bit displacements. Additional dedicated support is also included (eg `BitMemory`) to work with code that might be placed outside of the first 2Gb (eg on Mac OS X).
8
8
@@ -33,18 +33,23 @@ Add the crate `assembler` to your Cargo.toml file as usual and add an `extern cr
33
33
34
34
Pull requests implementing these would be much appreciated\*.
35
35
* Any support at all of the AVX512 instructions and associated memory operands.
36
-
* 3D Now! (eg `PREFETCHW`).
36
+
* 3D Now!'s `PREFETCH`.
37
37
* Support for using the debug, control and bound registers.
38
38
*`if` clauses inside some instruction generation sequences to output more efficient known register forms, eg those that default to `RAX`.
39
39
40
40
41
41
<sup>\* With copyright assignment to the project, of course!</sup>
42
42
43
43
44
+
## Possible
45
+
46
+
* The instruction pointer should be an `u64` rather than `usize` so that assembling 64-bit code on 32-bit platforms is possible. That said, the main use of this project is to generate assembler to be used at runtime.
47
+
48
+
44
49
### Unlikely to be added
45
50
46
-
*XOP (deprecated)
47
-
* AMD's bit manipulation
51
+
*Intel Xeon Phi specific instructions.
52
+
* AMD's deprecated bit manipulation instructions and `XOP` encoding prefix.
48
53
* Instruction relaxation; requires using a linked list to manage 'bundles' of instructions
49
54
* Dynamic relocation
50
55
* 32-bit compatibility mode
@@ -53,7 +58,7 @@ Pull requests implementing these would be much appreciated\*.
53
58
54
59
## Licensing
55
60
56
-
The license for this project is Affero GNU Public License 3.0 (AGPL-3.0). Note that very early, unreleased versions of used source code forked from the [dynasm] project; this code is no longer in use within the code base. However, the authors of [assembler] are grateful to the authors of [dynasm] for the inspiration behind this work.
61
+
The license for this project is Affero GNU Public License 3.0 (AGPL-3.0). Note that very early, unreleased versions used source code forked from the [dynasm] project; this code is no longer in use within the code base. However, the authors of [assembler] are grateful to the authors of [dynasm] for the inspiration behind this work.
/// Computes the absolute differences of the packed unsigned byte integers from `mm2/m64` and `mm1`; differences are then summed to produce an unsigned word integer result.
0 commit comments