x86 asm: move binary arithmetic instructions from x86-assembly-cheat except cmp

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-06-12 00:00:00 +00:00
parent 90925e7e06
commit 0028ff0ebd
12 changed files with 326 additions and 8 deletions

View File

@@ -10208,13 +10208,13 @@ There are not yet enabled, but it should be easy to so, see: <<add-new-buildroot
https://stackoverflow.com/questions/6147242/heap-vs-binary-search-tree-bst/29548834#29548834
Usage:
First we build it with <<m5ops-instructions>> enabled, and then we extract the stats:
....
./build-userland \
--arch aarch64 \
--ccflagg='-DLKMC_M5OPS_ENABLE=1' \
--force-build cpp/bst_vs_heap \
--ccflags='-DLKMC_M5OPS_ENABLE=1' \
--force-rebuild cpp/bst_vs_heap \
--static \
;
./run \
@@ -10910,7 +10910,7 @@ To use that file, first rebuild `m5ops.out` with the m5ops instructions enabled
./build-userland \
--arch aarch64 \
--ccflags='-DLKMC_M5OPS_ENABLE=1' \
--force-build c/m5ops \
--force-rebuild c/m5ops \
--static \
;
./build-buildroot --arch aarch64
@@ -10941,7 +10941,7 @@ In theory, the cleanest way to add m5ops to your benchmarks would be to do exact
However, I think it is usually not worth the trouble of hacking up the build system of the benchmark to do this, and I recommend just hardcoding in a few raw instructions here and there, and managing it with version control + `sed`.
Bibliography:x
Bibliography:
* https://stackoverflow.com/questions/56506154/how-to-analyze-only-interest-area-in-source-code-by-using-gem5/56506419#56506419
* https://www.mail-archive.com/gem5-users@gem5.org/msg15418.html
@@ -12352,9 +12352,18 @@ Bibliography:
<<intel-manual-1>> 5.1.2 "Binary Arithmetic Instructions":
* link:userland/arch/x86_64/add.S[ADD]
* link:userland/arch/x86_64/dec.S[DEC]
* link:userland/arch/x86_64/inc.S[INC]
** link:userland/arch/x86_64/inc.S[INC]
** link:userland/arch/x86_64/adc.S[ADC]
* link:userland/arch/x86_64/sub.S[SUB]
** link:userland/arch/x86_64/dec.S[DEC]
** link:userland/arch/x86_64/sbb.S[SBB]
* link:userland/arch/x86_64/mul.S[MUL]
** link:userland/arch/x86_64/neg.S[NEG]
** link:userland/arch/x86_64/imul.S[IMUL]
* link:userland/arch/x86_64/div.S[DIV]
** link:userland/arch/x86_64/div_overflow.S[DIV overflow]
** link:userland/arch/x86_64/div_zero.S[DIV zero]
** link:userland/arch/x86_64/idiv.S[IDIV]
=== x86 SIMD