Adjust llasm, llabi to be aware of changes to rust_task structure. Still not working fully.
This commit is contained in:
parent
9935a48e95
commit
05f34b0886
@ -43,6 +43,7 @@ let declare_abi (llctx:Llvm.llcontext) (llmod:Llvm.llmodule) : abi =
|
||||
(* TODO: other architectures besides x86 *)
|
||||
Llvm.struct_type llctx [|
|
||||
i32; (* size_t refcnt *)
|
||||
Llvm.pointer_type i32; (* rust_task *_delegate *)
|
||||
Llvm.pointer_type i32; (* stk_seg *stk *)
|
||||
Llvm.pointer_type i32; (* uintptr_t runtime_sp *)
|
||||
Llvm.pointer_type i32; (* uintptr_t rust_sp *)
|
||||
|
@ -41,10 +41,23 @@ let x86_glue
|
||||
"popl %edi";
|
||||
"popl %ebp";]
|
||||
in
|
||||
let load_esp_from_rust_sp = ["movl 12(%edx), %esp"] in
|
||||
let load_esp_from_runtime_sp = ["movl 8(%edx), %esp"] in
|
||||
let store_esp_to_rust_sp = ["movl %esp, 12(%edx)"] in
|
||||
let store_esp_to_runtime_sp = ["movl %esp, 8(%edx)"] in
|
||||
let load_esp_from_rust_sp =
|
||||
[ Printf.sprintf "movl %d(%%edx), %%esp"
|
||||
(Abi.task_field_rust_sp * 4)]
|
||||
in
|
||||
let load_esp_from_runtime_sp =
|
||||
[ Printf.sprintf "movl %d(%%edx), %%esp"
|
||||
(Abi.task_field_runtime_sp * 4) ]
|
||||
in
|
||||
let store_esp_to_rust_sp =
|
||||
[ Printf.sprintf "movl %%esp, %d(%%edx)"
|
||||
(Abi.task_field_rust_sp * 4) ]
|
||||
in
|
||||
let store_esp_to_runtime_sp =
|
||||
[ Printf.sprintf "movl %%esp, %d(%%edx)"
|
||||
(Abi.task_field_runtime_sp * 4) ]
|
||||
in
|
||||
|
||||
let list_init i f = (Array.to_list (Array.init i f)) in
|
||||
let list_init_concat i f = List.concat (list_init i f) in
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user