besched: Add and use sched_replace().
[libfirm] / ir / be / ia32 / ia32_emitter.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief       This file implements the ia32 node emitter.
23  * @author      Christian Wuerdig, Matthias Braun
24  */
25 #ifndef FIRM_BE_IA32_IA32_EMITTER_H
26 #define FIRM_BE_IA32_IA32_EMITTER_H
27
28 #include "irnode.h"
29
30 #include "bearch.h"
31
32 #include "bearch_ia32_t.h"
33
34 /**
35  * fmt  parameter               output
36  * ---- ----------------------  ---------------------------------------------
37  * %%                           %
38  * %AF  <node>                  address mode or x87 register
39  * %AM  <node>                  address mode of the node
40  * %AR  arch_register_t const*  address mode of the node or register
41  * %ASx <node>                  address mode of the node or source register x
42  * %B   <node>                  operands for binary operation
43  * %Dx  <node>                  destination register x
44  * %Fx  <node>                  x87 register x
45  * %FM  <node>                  x87 mode suffix
46  * %FX  <node>                  SSE mode suffix
47  * %I   <node>                  immediate of the node
48  * %L   <node>                  control flow target of the node
49  * %M   <node>                  mode suffix of the node
50  * %Px  <node>                  condition code
51  * %PX  int                     condition code
52  * %R   arch_register_t const*  register
53  * %Sx  <node>                  source register x
54  * %s   char const*             string
55  * %u   unsigned int            unsigned int
56  * %d   signed int              signed int
57  *
58  * x starts at 0
59  * # modifier for %ASx, %D, %R, and %S uses ls mode of node to alter register width
60  * # modifier for %M for extend suffix
61  * * modifier does not prefix immediates with $, but AM with *
62  * l modifier for %lu and %ld
63  * > modifier to output high 8bit register (ah, bh)
64  * < modifier to output low 8bit register (al, bl)
65  */
66 void ia32_emitf(ir_node const *node, char const *fmt, ...);
67
68 void ia32_gen_routine(ir_graph *irg);
69 void ia32_gen_binary_routine(ir_graph *irg);
70
71 /** Initializes the Emitter. */
72 void ia32_init_emitter(void);
73 #endif