2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief This file implements the ia32 node emitter.
23 * @author Christian Wuerdig, Matthias Braun
25 #ifndef FIRM_BE_IA32_IA32_EMITTER_H
26 #define FIRM_BE_IA32_IA32_EMITTER_H
32 #include "bearch_ia32_t.h"
35 * fmt parameter output
36 * ---- ---------------------- ---------------------------------------------
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
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)
66 void ia32_emitf(ir_node const *node, char const *fmt, ...);
68 void ia32_gen_routine(ir_graph *irg);
69 void ia32_gen_binary_routine(ir_graph *irg);
71 /** Initializes the Emitter. */
72 void ia32_init_emitter(void);