File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 9935a48e95e1a56b64f08e42abfae496f2906705
2
+ refs/heads/master: 05f34b088668b9b087c77363c2c359bcb40ae2ed
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ let declare_abi (llctx:Llvm.llcontext) (llmod:Llvm.llmodule) : abi =
43
43
(* TODO: other architectures besides x86 *)
44
44
Llvm. struct_type llctx [|
45
45
i32; (* size_t refcnt *)
46
+ Llvm. pointer_type i32; (* rust_task *_delegate *)
46
47
Llvm. pointer_type i32; (* stk_seg *stk *)
47
48
Llvm. pointer_type i32; (* uintptr_t runtime_sp *)
48
49
Llvm. pointer_type i32; (* uintptr_t rust_sp *)
Original file line number Diff line number Diff line change @@ -41,10 +41,23 @@ let x86_glue
41
41
" popl %edi" ;
42
42
" popl %ebp" ;]
43
43
in
44
- let load_esp_from_rust_sp = [" movl 12(%edx), %esp" ] in
45
- let load_esp_from_runtime_sp = [" movl 8(%edx), %esp" ] in
46
- let store_esp_to_rust_sp = [" movl %esp, 12(%edx)" ] in
47
- let store_esp_to_runtime_sp = [" movl %esp, 8(%edx)" ] in
44
+ let load_esp_from_rust_sp =
45
+ [ Printf. sprintf " movl %d(%%edx), %%esp"
46
+ (Abi. task_field_rust_sp * 4 )]
47
+ in
48
+ let load_esp_from_runtime_sp =
49
+ [ Printf. sprintf " movl %d(%%edx), %%esp"
50
+ (Abi. task_field_runtime_sp * 4 ) ]
51
+ in
52
+ let store_esp_to_rust_sp =
53
+ [ Printf. sprintf " movl %%esp, %d(%%edx)"
54
+ (Abi. task_field_rust_sp * 4 ) ]
55
+ in
56
+ let store_esp_to_runtime_sp =
57
+ [ Printf. sprintf " movl %%esp, %d(%%edx)"
58
+ (Abi. task_field_runtime_sp * 4 ) ]
59
+ in
60
+
48
61
let list_init i f = (Array. to_list (Array. init i f)) in
49
62
let list_init_concat i f = List. concat (list_init i f) in
50
63
You can’t perform that action at this time.
0 commit comments