diff options
| author | Brian Anderson <[email protected]> | 2011-03-07 21:21:01 -0500 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-03-07 21:21:01 -0500 |
| commit | 9fc4db6b89213afdf45c02fc2bd2be62b0ddc40c (patch) | |
| tree | 6c84574116273f91cbe89abd256b9f809adf97de /src/boot/be/abi.ml | |
| parent | Allow the else part of an expr_if to be either expr_if or expr_block (diff) | |
| parent | rustc: Cast the LLVM representations of tag types when constructing boxes. Un... (diff) | |
| download | rust-9fc4db6b89213afdf45c02fc2bd2be62b0ddc40c.tar.xz rust-9fc4db6b89213afdf45c02fc2bd2be62b0ddc40c.zip | |
Merge branch 'master' into recursive-elseif
Conflicts:
src/Makefile
src/comp/front/ast.rs
src/comp/front/parser.rs
src/comp/middle/fold.rs
src/comp/middle/trans.rs
Diffstat (limited to 'src/boot/be/abi.ml')
| -rw-r--r-- | src/boot/be/abi.ml | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/boot/be/abi.ml b/src/boot/be/abi.ml index 035d1f05..89e308bf 100644 --- a/src/boot/be/abi.ml +++ b/src/boot/be/abi.ml @@ -110,23 +110,33 @@ let indirect_args_elt_closure = 0;; (* Current worst case is by vec grow glue *) let worst_case_glue_call_args = 8;; +(* + * ABI tags used to inform the runtime which sort of frame to set up for new + * spawned functions. FIXME: There is almost certainly a better abstraction to + * use. + *) +let abi_x86_rustboot_cdecl = 1;; +let abi_x86_rustc_fastcall = 2;; + type abi = - { - abi_word_sz: int64; - abi_word_bits: Il.bits; - abi_word_ty: Common.ty_mach; + { + abi_word_sz: int64; + abi_word_bits: Il.bits; + abi_word_ty: Common.ty_mach; + + abi_tag: int; - abi_has_pcrel_data: bool; - abi_has_pcrel_code: bool; + abi_has_pcrel_data: bool; + abi_has_pcrel_code: bool; - abi_n_hardregs: int; - abi_str_of_hardreg: (int -> string); + abi_n_hardregs: int; + abi_str_of_hardreg: (int -> string); - abi_emit_target_specific: (Il.emitter -> Il.quad -> unit); - abi_constrain_vregs: (Il.quad -> (Il.vreg,Bits.t) Hashtbl.t -> unit); + abi_emit_target_specific: (Il.emitter -> Il.quad -> unit); + abi_constrain_vregs: (Il.quad -> (Il.vreg,Bits.t) Hashtbl.t -> unit); - abi_emit_fn_prologue: (Il.emitter - -> Common.size (* framesz *) + abi_emit_fn_prologue: (Il.emitter + -> Common.size (* framesz *) -> Common.size (* callsz *) -> Common.nabi -> Common.fixup (* grow_task *) |