asm: fix some forgotten # comments, mostly migration bugs

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-06-29 00:00:00 +00:00
parent 41de17d476
commit 42a4c45058
6 changed files with 35 additions and 44 deletions

View File

@@ -16,7 +16,7 @@ LKMC_PROLOGUE
mov r0, 0xFF
tst r0, 0x0F
LKMC_ASSERT(bne)
# r0 was not modified.
/* r0 was not modified. */
LKMC_ASSERT_EQ(r0, =0xFF)
LKMC_EPILOGUE

View File

@@ -1,6 +1,4 @@
# # bswap
# Little endian <=> big endian.
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-data-transfer-instructions */
#include <lkmc.h>

View File

@@ -1,7 +1,5 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
# Compare two arrays
#include <lkmc.h>
.section .rodata

View File

@@ -8,27 +8,27 @@
double_4_0: .double 4.0
LKMC_PROLOGUE
fldl double_4_0
# ST0 = 4.0
/* ST0 = 4.0 */
fldl double_2_5
# ST0 = 2.5
# ST1 = 4.0
/* ST0 = 2.5
* ST1 = 4.0 */
fldl double_1_0
# ST0 = 1.0
# ST1 = 2.5
# ST2 = 4.0
/* ST0 = 1.0
* ST1 = 2.5
* ST2 = 4.0 */
# ST0 = 1 * 2 ^ (RoundTowardZero(2.5))
# = 1 * 2 ^ 2
# = 4
/* ST0 = 1 * 2 ^ (RoundTowardZero(2.5))
* = 1 * 2 ^ 2
* = 4 */
fscale
# ST0 = 4.0
# ST1 = 2.5
# ST2 = 4.0
/* ST0 = 4.0
* ST1 = 2.5
* ST2 = 4.0 */
fcomip %st(2)
# ST0 = 4.0
# ST1 = 2.5
/* ST0 = 4.0
* ST1 = 2.5 */
LKMC_ASSERT(je)
LKMC_EPILOGUE

View File

@@ -7,39 +7,39 @@
double_1_0: .double 1.0
LKMC_PROLOGUE
fldz
# ST0 = 0.0
/* ST0 = 0.0 */
fld1
# ST0 = 1.0
# ST1 = 0.0
/* ST0 = 1.0
* ST1 = 0.0 */
# Swap ST0 and ST1.
/* Swap ST0 and ST1. */
fxch %st(1)
# ST0 = 0.0
# ST1 = 1.0
/* ST0 = 0.0
* ST1 = 1.0 */
fldz
# ST0 = 0.0
# ST1 = 0.0
# ST2 = 1.0
/* ST0 = 0.0
* ST1 = 0.0
* ST2 = 1.0 */
fcomip %st(1)
# ST0 = 0.0
# ST1 = 1.0
/* ST0 = 0.0
* ST1 = 1.0 */
LKMC_ASSERT(je)
# Swap ST0 and ST1.
/* Swap ST0 and ST1. */
fxch %st(1)
# ST0 = 1.0
# ST1 = 0.0
/* ST0 = 1.0
* ST1 = 0.0 */
fld1
# ST0 = 1.0
# ST1 = 1.0
# ST2 = 0.0
/* ST0 = 1.0
* ST1 = 1.0
* ST2 = 0.0 */
fcomip %st(1)
# ST0 = 1.0
# ST1 = 0.0
/* ST0 = 1.0
* ST1 = 0.0 */
LKMC_ASSERT(je)
LKMC_EPILOGUE

View File

@@ -1,9 +1,4 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
# # movs
# Copy one string into another.
# Input pointed by esi, output by edi.
#include <lkmc.h>