Skip to content

Commit abf067c

Browse files
authored
src: convert tabs to spaces (#384)
1 parent 5ef26d0 commit abf067c

File tree

240 files changed

+16997
-16997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+16997
-16997
lines changed

src/asm/alpha_freebsd-rswitch.s

+37-37
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@
22
* coswitch(old_cs, new_cs, first) for Dec Alpha architecture
33
* $16 $17 $18
44
*/
5-
.data
6-
errmsg: .ascii "new_context() returned in coswitch\X00"
5+
.data
6+
errmsg: .ascii "new_context() returned in coswitch\X00"
77

8-
.text
9-
.globl coswitch
10-
.ent coswitch
8+
.text
9+
.globl coswitch
10+
.ent coswitch
1111
coswitch:
12-
lda $sp, -72($sp) /* make room on stack */
13-
stq $sp, 0($16) /* save stack pointer */
14-
stq $9, 0($sp) /* save registers on stack */
15-
stq $10, 8($sp)
16-
stq $11, 16($sp)
17-
stq $12, 24($sp)
18-
stq $13, 32($sp)
19-
stq $14, 40($sp)
20-
stq $15, 48($sp)
21-
stq $27, 56($sp)
22-
stq $26, 64($sp) /* return address */
23-
beq $18, first /* if first time */
12+
lda $sp, -72($sp) /* make room on stack */
13+
stq $sp, 0($16) /* save stack pointer */
14+
stq $9, 0($sp) /* save registers on stack */
15+
stq $10, 8($sp)
16+
stq $11, 16($sp)
17+
stq $12, 24($sp)
18+
stq $13, 32($sp)
19+
stq $14, 40($sp)
20+
stq $15, 48($sp)
21+
stq $27, 56($sp)
22+
stq $26, 64($sp) /* return address */
23+
beq $18, first /* if first time */
2424

25-
ldq $sp, 0($17) /* load new stack pointer */
26-
ldq $9, 0($sp) /* load registers from stack */
27-
ldq $10, 8($sp)
28-
ldq $11, 16($sp)
29-
ldq $12, 24($sp)
30-
ldq $13, 32($sp)
31-
ldq $14, 40($sp)
32-
ldq $15, 48($sp)
33-
ldq $27, 56($sp)
34-
ldq $26, 64($sp) /* return address */
35-
lda $sp, 72($sp) /* reset sp */
36-
jsr_coroutine $31, ($26), 0 /* jump into new_context */
25+
ldq $sp, 0($17) /* load new stack pointer */
26+
ldq $9, 0($sp) /* load registers from stack */
27+
ldq $10, 8($sp)
28+
ldq $11, 16($sp)
29+
ldq $12, 24($sp)
30+
ldq $13, 32($sp)
31+
ldq $14, 40($sp)
32+
ldq $15, 48($sp)
33+
ldq $27, 56($sp)
34+
ldq $26, 64($sp) /* return address */
35+
lda $sp, 72($sp) /* reset sp */
36+
jsr_coroutine $31, ($26), 0 /* jump into new_context */
3737

38-
first:
39-
ldq $sp, 0($17) /* load stack pointer only */
40-
bis $31, $31, $16 /* r16 = 0 */
41-
bis $31, $31, $17 /* r17 = 0 */
42-
jsr $26, new_context /* new_context(0,0) */
43-
lda $16, errmsg
44-
jsr $26, syserr /* shouldn't get here */
38+
first:
39+
ldq $sp, 0($17) /* load stack pointer only */
40+
bis $31, $31, $16 /* r16 = 0 */
41+
bis $31, $31, $17 /* r17 = 0 */
42+
jsr $26, new_context /* new_context(0,0) */
43+
lda $16, errmsg
44+
jsr $26, syserr /* shouldn't get here */
4545

46-
.end coswitch
46+
.end coswitch

src/asm/alpha_linux-rswitch.s

+37-37
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@
22
* coswitch(old_cs, new_cs, first) for Dec Alpha architecture
33
* $16 $17 $18
44
*/
5-
.data
6-
errmsg: .ascii "new_context() returned in coswitch\X00"
5+
.data
6+
errmsg: .ascii "new_context() returned in coswitch\X00"
77

8-
.text
9-
.globl coswitch
10-
.ent coswitch
8+
.text
9+
.globl coswitch
10+
.ent coswitch
1111
coswitch:
12-
lda $sp, -72($sp) /* make room on stack */
13-
stq $sp, 0($16) /* save stack pointer */
14-
stq $9, 0($sp) /* save registers on stack */
15-
stq $10, 8($sp)
16-
stq $11, 16($sp)
17-
stq $12, 24($sp)
18-
stq $13, 32($sp)
19-
stq $14, 40($sp)
20-
stq $15, 48($sp)
21-
stq $27, 56($sp)
22-
stq $26, 64($sp) /* return address */
23-
beq $18, first /* if first time */
12+
lda $sp, -72($sp) /* make room on stack */
13+
stq $sp, 0($16) /* save stack pointer */
14+
stq $9, 0($sp) /* save registers on stack */
15+
stq $10, 8($sp)
16+
stq $11, 16($sp)
17+
stq $12, 24($sp)
18+
stq $13, 32($sp)
19+
stq $14, 40($sp)
20+
stq $15, 48($sp)
21+
stq $27, 56($sp)
22+
stq $26, 64($sp) /* return address */
23+
beq $18, first /* if first time */
2424

25-
ldq $sp, 0($17) /* load new stack pointer */
26-
ldq $9, 0($sp) /* load registers from stack */
27-
ldq $10, 8($sp)
28-
ldq $11, 16($sp)
29-
ldq $12, 24($sp)
30-
ldq $13, 32($sp)
31-
ldq $14, 40($sp)
32-
ldq $15, 48($sp)
33-
ldq $27, 56($sp)
34-
ldq $26, 64($sp) /* return address */
35-
lda $sp, 72($sp) /* reset sp */
36-
jsr_coroutine $31, ($26), 0 /* jump into new_context */
25+
ldq $sp, 0($17) /* load new stack pointer */
26+
ldq $9, 0($sp) /* load registers from stack */
27+
ldq $10, 8($sp)
28+
ldq $11, 16($sp)
29+
ldq $12, 24($sp)
30+
ldq $13, 32($sp)
31+
ldq $14, 40($sp)
32+
ldq $15, 48($sp)
33+
ldq $27, 56($sp)
34+
ldq $26, 64($sp) /* return address */
35+
lda $sp, 72($sp) /* reset sp */
36+
jsr_coroutine $31, ($26), 0 /* jump into new_context */
3737

38-
first:
39-
ldq $sp, 0($17) /* load stack pointer only */
40-
bis $31, $31, $16 /* r16 = 0 */
41-
bis $31, $31, $17 /* r17 = 0 */
42-
jsr $26, new_context /* new_context(0,0) */
43-
lda $16, errmsg
44-
jsr $26, syserr /* shouldn't get here */
38+
first:
39+
ldq $sp, 0($17) /* load stack pointer only */
40+
bis $31, $31, $16 /* r16 = 0 */
41+
bis $31, $31, $17 /* r17 = 0 */
42+
jsr $26, new_context /* new_context(0,0) */
43+
lda $16, errmsg
44+
jsr $26, syserr /* shouldn't get here */
4545

46-
.end coswitch
46+
.end coswitch

src/asm/arm_32_linux-rswitch.s

+57-57
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#
22
# Context switch for ARM32/Linux. (Position-independent code.)
33
# Jafar Al-Gharaibeh, April 2016.
4-
#
4+
#
55
#
66
.file "rswitch.s"
77
.section .rodata
8-
.ERR: .string "new_context() returned in coswitch"
8+
.ERR: .string "new_context() returned in coswitch"
99
.text
1010
.globl coswitch
11-
.type coswitch, %function
11+
.type coswitch, %function
1212

1313
coswitch:
1414
# coswitch(old_cstate, new_cstate, first)
@@ -17,63 +17,63 @@ coswitch:
1717
# r1 new_cstate
1818
# r2 first (equals 0 if first activation)
1919
#
20-
# sp is r13
21-
# lr is r14
22-
# pc is r15
23-
#
24-
# Must save : r11, r13-r14
25-
# Don't touch : r15
26-
# Good measure: r10
27-
# Scratch : r0-r3, r12
28-
# Others : r4-r9
29-
#
30-
# Old stack pointer -> old_cstate[0]
31-
# Old link register -> old_cstate[1]
32-
str sp, [r0]
33-
str lr, [r0, #4]
34-
# frame pointer
35-
str r11, [r0, #8]
36-
str r10, [r0, #12]
37-
38-
# str r9, [r0, #16]
39-
# str r8, [r0, #20]
40-
# str r7, [r0, #24]
41-
# str r6, [r0, #28]
42-
# str r5, [r0, #32]
43-
# str r4, [r0, #36]
44-
45-
# Otherwise load the new state
46-
# new_cstate[0] -> new stack pointer
47-
# new_cstate[1] -> new link register
48-
ldr sp, [r1]
49-
ldr lr, [r1, #4]
50-
# frame pointer
51-
ldr r11, [r1, #8]
52-
ldr r10, [r1, #12]
53-
54-
# ldr r9, [r1, #16]
55-
# ldr r8, [r1, #20]
56-
# ldr r7, [r1, #24]
57-
# ldr r6, [r1, #28]
58-
# ldr r5, [r1, #32]
59-
# ldr r4, [r1, #36]
20+
# sp is r13
21+
# lr is r14
22+
# pc is r15
23+
#
24+
# Must save : r11, r13-r14
25+
# Don't touch : r15
26+
# Good measure: r10
27+
# Scratch : r0-r3, r12
28+
# Others : r4-r9
29+
#
30+
# Old stack pointer -> old_cstate[0]
31+
# Old link register -> old_cstate[1]
32+
str sp, [r0]
33+
str lr, [r0, #4]
34+
# frame pointer
35+
str r11, [r0, #8]
36+
str r10, [r0, #12]
37+
38+
# str r9, [r0, #16]
39+
# str r8, [r0, #20]
40+
# str r7, [r0, #24]
41+
# str r6, [r0, #28]
42+
# str r5, [r0, #32]
43+
# str r4, [r0, #36]
44+
45+
# Otherwise load the new state
46+
# new_cstate[0] -> new stack pointer
47+
# new_cstate[1] -> new link register
48+
ldr sp, [r1]
49+
ldr lr, [r1, #4]
50+
# frame pointer
51+
ldr r11, [r1, #8]
52+
ldr r10, [r1, #12]
53+
54+
# ldr r9, [r1, #16]
55+
# ldr r8, [r1, #20]
56+
# ldr r7, [r1, #24]
57+
# ldr r6, [r1, #28]
58+
# ldr r5, [r1, #32]
59+
# ldr r4, [r1, #36]
6060

6161
# If this the first activation
62-
# skip to call new_context()
63-
cmp r2, #0
64-
beq .L1
62+
# skip to call new_context()
63+
cmp r2, #0
64+
beq .L1
6565

66-
# Ready to return, lr (r13) now has the return address
67-
bx lr
66+
# Ready to return, lr (r13) now has the return address
67+
bx lr
6868

6969
.L1:
70-
# Executed only once, first==0
71-
#
70+
# Executed only once, first==0
71+
#
7272
# Call new_context((int) 0, (ptr) 0)
73-
# set the arguments r0 and r1 to zeros
74-
mov r0, #0
75-
mov r1, #0
76-
bl new_context@PLT
77-
# we should never get here, if we do call syserr(...)
78-
ldr r0, =.ERR
79-
bl syserr@PLT
73+
# set the arguments r0 and r1 to zeros
74+
mov r0, #0
75+
mov r1, #0
76+
bl new_context@PLT
77+
# we should never get here, if we do call syserr(...)
78+
ldr r0, =.ERR
79+
bl syserr@PLT

0 commit comments

Comments
 (0)