mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
asm: fix some forgotten # comments, mostly migration bugs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# # bswap
|
||||
|
||||
# Little endian <=> big endian.
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-data-transfer-instructions */
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
|
||||
|
||||
# Compare two arrays
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
.section .rodata
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user