~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to asmcomp/selectgen.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
(*                                                                     *)
11
11
(***********************************************************************)
12
12
 
13
 
(* $Id: selectgen.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
 
13
(* $Id: selectgen.mli 10450 2010-05-21 12:00:49Z doligez $ *)
14
14
 
15
15
(* Selection of pseudo-instructions, assignment of pseudo-registers,
16
16
   sequentialization. *)
20
20
val size_expr : environment -> Cmm.expression -> int
21
21
 
22
22
class virtual selector_generic : object
23
 
  (* The following methods must or can be overriden by the processor
 
23
  (* The following methods must or can be overridden by the processor
24
24
     description *)
25
25
  method virtual is_immediate : int -> bool
26
26
    (* Must be defined to indicate whether a constant is a suitable
29
29
    Cmm.expression -> Arch.addressing_mode * Cmm.expression
30
30
    (* Must be defined to select addressing modes *)
31
31
  method is_simple_expr: Cmm.expression -> bool
32
 
    (* Can be overriden to reflect special extcalls known to be pure *)
 
32
    (* Can be overridden to reflect special extcalls known to be pure *)
33
33
  method select_operation :
34
34
    Cmm.operation ->
35
35
    Cmm.expression list -> Mach.operation * Cmm.expression list
36
 
    (* Can be overriden to deal with special arithmetic instructions *)
 
36
    (* Can be overridden to deal with special arithmetic instructions *)
37
37
  method select_condition : Cmm.expression -> Mach.test * Cmm.expression
38
 
    (* Can be overriden to deal with special test instructions *)
 
38
    (* Can be overridden to deal with special test instructions *)
39
39
  method select_store :
40
40
    Arch.addressing_mode -> Cmm.expression -> Mach.operation * Cmm.expression
41
 
    (* Can be overriden to deal with special store constant instructions *)
 
41
    (* Can be overridden to deal with special store constant instructions *)
 
42
  method regs_for : Cmm.machtype -> Reg.t array
 
43
    (* Return an array of fresh registers of the given type.
 
44
       Default implementation is like Reg.createv.
 
45
       Can be overridden if float values are stored as pairs of
 
46
       integer registers. *)
42
47
  method insert_op :
43
48
    Mach.operation -> Reg.t array -> Reg.t array -> Reg.t array
44
 
    (* Can be overriden to deal with 2-address instructions
 
49
    (* Can be overridden to deal with 2-address instructions
45
50
       or instructions with hardwired input/output registers *)
46
51
  method insert_op_debug :
47
52
    Mach.operation -> Debuginfo.t -> Reg.t array -> Reg.t array -> Reg.t array
48
 
    (* Can be overriden to deal with 2-address instructions
 
53
    (* Can be overridden to deal with 2-address instructions
49
54
       or instructions with hardwired input/output registers *)
50
55
  method emit_extcall_args :
51
56
    environment -> Cmm.expression list -> Reg.t array * int
52
 
    (* Can be overriden to deal with stack-based calling conventions *)
 
57
    (* Can be overridden to deal with stack-based calling conventions *)
53
58
  method emit_stores :
54
59
    environment -> Cmm.expression list -> Reg.t array -> unit
55
 
    (* Fill a freshly allocated block.  Can be overriden for architectures
 
60
    (* Fill a freshly allocated block.  Can be overridden for architectures
56
61
       that do not provide Arch.offset_addressing. *)
57
62
 
58
 
  (* The following method is the entry point and should not be overriden *)
 
63
  (* The following method is the entry point and should not be overridden *)
59
64
  method emit_fundecl : Cmm.fundecl -> Mach.fundecl
60
 
  
61
 
  (* The following methods should not be overriden.  They cannot be
 
65
 
 
66
  (* The following methods should not be overridden.  They cannot be
62
67
     declared "private" in the current implementation because they
63
68
     are not always applied to "self", but ideally they should be private. *)
64
69
  method extract : Mach.instruction