Skip to content

Commit 42a4c45

Browse files
committed
asm: fix some forgotten # comments, mostly migration bugs
1 parent 41de17d commit 42a4c45

File tree

6 files changed

+35
-44
lines changed

6 files changed

+35
-44
lines changed

userland/arch/arm/tst.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ LKMC_PROLOGUE
1616
mov r0, 0xFF
1717
tst r0, 0x0F
1818
LKMC_ASSERT(bne)
19-
# r0 was not modified.
19+
/* r0 was not modified. */
2020
LKMC_ASSERT_EQ(r0, =0xFF)
2121

2222
LKMC_EPILOGUE

userland/arch/x86_64/bswap.S

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# # bswap
2-
3-
# Little endian <=> big endian.
1+
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-data-transfer-instructions */
42

53
#include <lkmc.h>
64

userland/arch/x86_64/cmps.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
22

3-
# Compare two arrays
4-
53
#include <lkmc.h>
64

75
.section .rodata

userland/arch/x86_64/fscale.S

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88
double_4_0: .double 4.0
99
LKMC_PROLOGUE
1010
fldl double_4_0
11-
# ST0 = 4.0
11+
/* ST0 = 4.0 */
1212

1313
fldl double_2_5
14-
# ST0 = 2.5
15-
# ST1 = 4.0
14+
/* ST0 = 2.5
15+
* ST1 = 4.0 */
1616

1717
fldl double_1_0
18-
# ST0 = 1.0
19-
# ST1 = 2.5
20-
# ST2 = 4.0
18+
/* ST0 = 1.0
19+
* ST1 = 2.5
20+
* ST2 = 4.0 */
2121

22-
# ST0 = 1 * 2 ^ (RoundTowardZero(2.5))
23-
# = 1 * 2 ^ 2
24-
# = 4
22+
/* ST0 = 1 * 2 ^ (RoundTowardZero(2.5))
23+
* = 1 * 2 ^ 2
24+
* = 4 */
2525
fscale
26-
# ST0 = 4.0
27-
# ST1 = 2.5
28-
# ST2 = 4.0
26+
/* ST0 = 4.0
27+
* ST1 = 2.5
28+
* ST2 = 4.0 */
2929

3030
fcomip %st(2)
31-
# ST0 = 4.0
32-
# ST1 = 2.5
31+
/* ST0 = 4.0
32+
* ST1 = 2.5 */
3333
LKMC_ASSERT(je)
3434
LKMC_EPILOGUE

userland/arch/x86_64/fxch.S

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
double_1_0: .double 1.0
88
LKMC_PROLOGUE
99
fldz
10-
# ST0 = 0.0
10+
/* ST0 = 0.0 */
1111

1212
fld1
13-
# ST0 = 1.0
14-
# ST1 = 0.0
13+
/* ST0 = 1.0
14+
* ST1 = 0.0 */
1515

16-
# Swap ST0 and ST1.
16+
/* Swap ST0 and ST1. */
1717
fxch %st(1)
18-
# ST0 = 0.0
19-
# ST1 = 1.0
18+
/* ST0 = 0.0
19+
* ST1 = 1.0 */
2020

2121
fldz
22-
# ST0 = 0.0
23-
# ST1 = 0.0
24-
# ST2 = 1.0
22+
/* ST0 = 0.0
23+
* ST1 = 0.0
24+
* ST2 = 1.0 */
2525

2626
fcomip %st(1)
27-
# ST0 = 0.0
28-
# ST1 = 1.0
27+
/* ST0 = 0.0
28+
* ST1 = 1.0 */
2929
LKMC_ASSERT(je)
3030

31-
# Swap ST0 and ST1.
31+
/* Swap ST0 and ST1. */
3232
fxch %st(1)
33-
# ST0 = 1.0
34-
# ST1 = 0.0
33+
/* ST0 = 1.0
34+
* ST1 = 0.0 */
3535

3636
fld1
37-
# ST0 = 1.0
38-
# ST1 = 1.0
39-
# ST2 = 0.0
37+
/* ST0 = 1.0
38+
* ST1 = 1.0
39+
* ST2 = 0.0 */
4040

4141
fcomip %st(1)
42-
# ST0 = 1.0
43-
# ST1 = 0.0
42+
/* ST0 = 1.0
43+
* ST1 = 0.0 */
4444
LKMC_ASSERT(je)
4545
LKMC_EPILOGUE

userland/arch/x86_64/movs.S

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
2-
# # movs
3-
4-
# Copy one string into another.
5-
6-
# Input pointed by esi, output by edi.
72

83
#include <lkmc.h>
94

0 commit comments

Comments
 (0)