@@ -25,65 +25,65 @@ unsafe extern "C" fn wasmtime_fiber_switch_(top_of_stack: *mut u8 /* a0 */) {
2525 //
2626 // Note that this order for saving is important since we use CFI directives
2727 // below to point to where all the saved registers are.
28- sd ra,-0x8(sp)
29- sd fp,-0x10(sp)
30- sd s1,-0x18(sp)
31- sd s2,-0x20(sp)
32- sd s3,-0x28(sp)
33- sd s4,-0x30(sp)
34- sd s5,-0x38(sp)
35- sd s6,-0x40(sp)
36- sd s7,-0x48(sp)
37- sd s8,-0x50(sp)
38- sd s9,-0x58(sp)
39- sd s10,-0x60(sp)
40- sd s11,-0x68(sp)
41- fsd fs0,-0x70(sp)
42- fsd fs1,-0x78(sp)
43- fsd fs2,-0x80(sp)
44- fsd fs3,-0x88(sp)
45- fsd fs4,-0x90(sp)
46- fsd fs5,-0x98(sp)
47- fsd fs6,-0xa0(sp)
48- fsd fs7,-0xa8(sp)
49- fsd fs8,-0xb0(sp)
50- fsd fs9,-0xb8(sp)
51- fsd fs10,-0xc0(sp)
52- fsd fs11,-0xc8(sp)
53- addi sp , sp , -0xd0
54-
55- ld t0 , -0x10(a0)
56- sd sp , -0x10(a0)
28+ sd ra, -0x8(sp)
29+ sd fp, -0x10(sp)
30+ sd s1, -0x18(sp)
31+ sd s2, -0x20(sp)
32+ sd s3, -0x28(sp)
33+ sd s4, -0x30(sp)
34+ sd s5, -0x38(sp)
35+ sd s6, -0x40(sp)
36+ sd s7, -0x48(sp)
37+ sd s8, -0x50(sp)
38+ sd s9, -0x58(sp)
39+ sd s10, -0x60(sp)
40+ sd s11, -0x68(sp)
41+ fsd fs0, -0x70(sp)
42+ fsd fs1, -0x78(sp)
43+ fsd fs2, -0x80(sp)
44+ fsd fs3, -0x88(sp)
45+ fsd fs4, -0x90(sp)
46+ fsd fs5, -0x98(sp)
47+ fsd fs6, -0xa0(sp)
48+ fsd fs7, -0xa8(sp)
49+ fsd fs8, -0xb0(sp)
50+ fsd fs9, -0xb8(sp)
51+ fsd fs10, -0xc0(sp)
52+ fsd fs11, -0xc8(sp)
53+ addi sp, sp, -0xd0
54+
55+ ld t0, -0x10(a0)
56+ sd sp, -0x10(a0)
5757
5858 // Swap stacks and restore all our callee-saved registers
59- mv sp,t0
60-
61- fld fs11,0x8(sp)
62- fld fs10,0x10(sp)
63- fld fs9,0x18(sp)
64- fld fs8,0x20(sp)
65- fld fs7,0x28(sp)
66- fld fs6,0x30(sp)
67- fld fs5,0x38(sp)
68- fld fs4,0x40(sp)
69- fld fs3,0x48(sp)
70- fld fs2,0x50(sp)
71- fld fs1,0x58(sp)
72- fld fs0,0x60(sp)
73- ld s11,0x68(sp)
74- ld s10,0x70(sp)
75- ld s9,0x78(sp)
76- ld s8,0x80(sp)
77- ld s7,0x88(sp)
78- ld s6,0x90(sp)
79- ld s5,0x98(sp)
80- ld s4,0xa0(sp)
81- ld s3,0xa8(sp)
82- ld s2,0xb0(sp)
83- ld s1,0xb8(sp)
84- ld fp,0xc0(sp)
85- ld ra,0xc8(sp)
86- addi sp , sp , 0xd0
59+ mv sp, t0
60+
61+ fld fs11, 0x8(sp)
62+ fld fs10, 0x10(sp)
63+ fld fs9, 0x18(sp)
64+ fld fs8, 0x20(sp)
65+ fld fs7, 0x28(sp)
66+ fld fs6, 0x30(sp)
67+ fld fs5, 0x38(sp)
68+ fld fs4, 0x40(sp)
69+ fld fs3, 0x48(sp)
70+ fld fs2, 0x50(sp)
71+ fld fs1, 0x58(sp)
72+ fld fs0, 0x60(sp)
73+ ld s11, 0x68(sp)
74+ ld s10, 0x70(sp)
75+ ld s9, 0x78(sp)
76+ ld s8, 0x80(sp)
77+ ld s7, 0x88(sp)
78+ ld s6, 0x90(sp)
79+ ld s5, 0x98(sp)
80+ ld s4, 0xa0(sp)
81+ ld s3, 0xa8(sp)
82+ ld s2, 0xb0(sp)
83+ ld s1, 0xb8(sp)
84+ ld fp, 0xc0(sp)
85+ ld ra, 0xc8(sp)
86+ addi sp, sp, 0xd0
8787 jr ra
8888 " ,
8989 ) ;
@@ -146,38 +146,38 @@ unsafe extern "C" fn wasmtime_fiber_start() -> ! {
146146 5, /* the byte length of this expression */ \
147147 0x52, /* DW_OP_reg2 (sp) */ \
148148 0x06, /* DW_OP_deref */ \
149- 0x08, 0xd0 , /* DW_OP_const1u 0xc8 */ \
149+ 0x08, 0xd0, /* DW_OP_const1u 0xc8 */ \
150150 0x22 /* DW_OP_plus */
151151
152152
153- .cfi_rel_offset ra,-0x8
154- .cfi_rel_offset fp,-0x10
155- .cfi_rel_offset s1,-0x18
156- .cfi_rel_offset s2,-0x20
157- .cfi_rel_offset s3,-0x28
158- .cfi_rel_offset s4,-0x30
159- .cfi_rel_offset s5,-0x38
160- .cfi_rel_offset s6,-0x40
161- .cfi_rel_offset s7,-0x48
162- .cfi_rel_offset s8,-0x50
163- .cfi_rel_offset s9,-0x58
164- .cfi_rel_offset s10,-0x60
165- .cfi_rel_offset s11,-0x68
166- .cfi_rel_offset fs0,-0x70
167- .cfi_rel_offset fs1,-0x78
168- .cfi_rel_offset fs2,-0x80
169- .cfi_rel_offset fs3,-0x88
170- .cfi_rel_offset fs4,-0x90
171- .cfi_rel_offset fs5,-0x98
172- .cfi_rel_offset fs6,-0xa0
173- .cfi_rel_offset fs7,-0xa8
174- .cfi_rel_offset fs8,-0xb0
175- .cfi_rel_offset fs9,-0xb8
176- .cfi_rel_offset fs10,-0xc0
177- .cfi_rel_offset fs11,-0xc8
178-
179- mv a0,s2
180- mv a1,fp
153+ .cfi_rel_offset ra, -0x8
154+ .cfi_rel_offset fp, -0x10
155+ .cfi_rel_offset s1, -0x18
156+ .cfi_rel_offset s2, -0x20
157+ .cfi_rel_offset s3, -0x28
158+ .cfi_rel_offset s4, -0x30
159+ .cfi_rel_offset s5, -0x38
160+ .cfi_rel_offset s6, -0x40
161+ .cfi_rel_offset s7, -0x48
162+ .cfi_rel_offset s8, -0x50
163+ .cfi_rel_offset s9, -0x58
164+ .cfi_rel_offset s10, -0x60
165+ .cfi_rel_offset s11, -0x68
166+ .cfi_rel_offset fs0, -0x70
167+ .cfi_rel_offset fs1, -0x78
168+ .cfi_rel_offset fs2, -0x80
169+ .cfi_rel_offset fs3, -0x88
170+ .cfi_rel_offset fs4, -0x90
171+ .cfi_rel_offset fs5, -0x98
172+ .cfi_rel_offset fs6, -0xa0
173+ .cfi_rel_offset fs7, -0xa8
174+ .cfi_rel_offset fs8, -0xb0
175+ .cfi_rel_offset fs9, -0xb8
176+ .cfi_rel_offset fs10, -0xc0
177+ .cfi_rel_offset fs11, -0xc8
178+
179+ mv a0, s2
180+ mv a1, fp
181181 jalr s1
182182 // .4byte 0 will cause panic.
183183 // for safety just like x86_64.rs.
0 commit comments