1 #include "gen_amd64_new_nodes.h" 4 #include "amd64_bearch_t.h" 5 #include "gen_amd64_regalloc_if.h" 6 #include "amd64_new_nodes_t.h" 11 ir_op *op_amd64_add = NULL;
12 ir_op *op_amd64_adds = NULL;
13 ir_op *op_amd64_and = NULL;
14 ir_op *op_amd64_bsf = NULL;
15 ir_op *op_amd64_bsr = NULL;
16 ir_op *op_amd64_call = NULL;
17 ir_op *op_amd64_cltd = NULL;
18 ir_op *op_amd64_cmp = NULL;
19 ir_op *op_amd64_cmpxchg = NULL;
20 ir_op *op_amd64_cqto = NULL;
21 ir_op *op_amd64_cvtsd2ss = NULL;
22 ir_op *op_amd64_cvtsi2sd = NULL;
23 ir_op *op_amd64_cvtsi2ss = NULL;
24 ir_op *op_amd64_cvtss2sd = NULL;
25 ir_op *op_amd64_cvttsd2si = NULL;
26 ir_op *op_amd64_cvttss2si = NULL;
27 ir_op *op_amd64_div = NULL;
28 ir_op *op_amd64_divs = NULL;
29 ir_op *op_amd64_fadd = NULL;
30 ir_op *op_amd64_fchs = NULL;
31 ir_op *op_amd64_fdiv = NULL;
32 ir_op *op_amd64_fdup = NULL;
33 ir_op *op_amd64_fild = NULL;
34 ir_op *op_amd64_fisttp = NULL;
35 ir_op *op_amd64_fld = NULL;
36 ir_op *op_amd64_fld1 = NULL;
37 ir_op *op_amd64_fldz = NULL;
38 ir_op *op_amd64_fmul = NULL;
39 ir_op *op_amd64_fpop = NULL;
40 ir_op *op_amd64_fst = NULL;
41 ir_op *op_amd64_fstp = NULL;
42 ir_op *op_amd64_fsub = NULL;
43 ir_op *op_amd64_fucomi = NULL;
44 ir_op *op_amd64_fxch = NULL;
45 ir_op *op_amd64_haddpd = NULL;
46 ir_op *op_amd64_idiv = NULL;
47 ir_op *op_amd64_ijmp = NULL;
48 ir_op *op_amd64_imul = NULL;
49 ir_op *op_amd64_imul_1op = NULL;
50 ir_op *op_amd64_jcc = NULL;
51 ir_op *op_amd64_jmp = NULL;
52 ir_op *op_amd64_jmp_switch = NULL;
53 ir_op *op_amd64_l_haddpd = NULL;
54 ir_op *op_amd64_l_punpckldq = NULL;
55 ir_op *op_amd64_l_subpd = NULL;
56 ir_op *op_amd64_lea = NULL;
57 ir_op *op_amd64_leave = NULL;
58 ir_op *op_amd64_mov_gp = NULL;
59 ir_op *op_amd64_mov_imm = NULL;
60 ir_op *op_amd64_mov_store = NULL;
61 ir_op *op_amd64_movd = NULL;
62 ir_op *op_amd64_movd_gp_xmm = NULL;
63 ir_op *op_amd64_movd_xmm_gp = NULL;
64 ir_op *op_amd64_movdqa = NULL;
65 ir_op *op_amd64_movdqu = NULL;
66 ir_op *op_amd64_movdqu_store = NULL;
67 ir_op *op_amd64_movs = NULL;
68 ir_op *op_amd64_movs_store_xmm = NULL;
69 ir_op *op_amd64_movs_xmm = NULL;
70 ir_op *op_amd64_mul = NULL;
71 ir_op *op_amd64_muls = NULL;
72 ir_op *op_amd64_neg = NULL;
73 ir_op *op_amd64_not = NULL;
74 ir_op *op_amd64_or = NULL;
75 ir_op *op_amd64_pop_am = NULL;
76 ir_op *op_amd64_punpckldq = NULL;
77 ir_op *op_amd64_push_am = NULL;
78 ir_op *op_amd64_push_reg = NULL;
79 ir_op *op_amd64_ret = NULL;
80 ir_op *op_amd64_sar = NULL;
81 ir_op *op_amd64_sbb = NULL;
82 ir_op *op_amd64_setcc = NULL;
83 ir_op *op_amd64_shl = NULL;
84 ir_op *op_amd64_shr = NULL;
85 ir_op *op_amd64_sub = NULL;
86 ir_op *op_amd64_sub_sp = NULL;
87 ir_op *op_amd64_subpd = NULL;
88 ir_op *op_amd64_subs = NULL;
89 ir_op *op_amd64_ucomis = NULL;
90 ir_op *op_amd64_xor = NULL;
91 ir_op *op_amd64_xor_0 = NULL;
92 ir_op *op_amd64_xorp = NULL;
93 ir_op *op_amd64_xorp_0 = NULL;
96 static int amd64_opcode_start = -1;
99 #define amd64_op_tag FOURCC('a', 'm', 'd', '6') 102 int is_amd64_op(
const ir_op *op)
104 return get_op_tag(op) == amd64_op_tag;
108 int is_amd64_irn(
const ir_node *node)
113 int get_amd64_irn_opcode(
const ir_node *node)
115 assert(is_amd64_irn(node));
120 #define BIT(x) (1 << (x)) 122 static const unsigned amd64_limit_gp_rbp[] = { BIT(REG_GP_RBP), 0 };
123 static const unsigned amd64_limit_gp_rsp[] = { BIT(REG_GP_RSP), 0 };
125 static const arch_register_req_t amd64_requirements_gp_rbp_I = {
126 .cls = &amd64_reg_classes[CLASS_amd64_gp],
127 .limited = amd64_limit_gp_rbp,
129 .must_be_different = 0,
134 static const arch_register_req_t amd64_requirements_gp_rsp_I = {
135 .cls = &amd64_reg_classes[CLASS_amd64_gp],
136 .limited = amd64_limit_gp_rsp,
138 .must_be_different = 0,
143 static const arch_register_req_t amd64_requirements_gp_in_r0 = {
144 .cls = &amd64_reg_classes[CLASS_amd64_gp],
147 .must_be_different = 0,
153 ir_node *new_bd_amd64_add(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
161 arch_irn_flags_t irn_flags = arch_irn_flags_none;
162 irn_flags |= arch_irn_flag_modify_flags;
163 irn_flags |= arch_irn_flag_rematerializable;
164 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
170 be_info_init_irn(res, irn_flags, in_reqs, n_res);
172 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
173 out_infos[0].req = &amd64_class_reg_req_gp;
174 out_infos[1].req = &amd64_class_reg_req_flags;
175 out_infos[2].req = &arch_memory_requirement;
181 ir_node *new_bd_amd64_adds(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
189 arch_irn_flags_t irn_flags = arch_irn_flags_none;
190 irn_flags |= arch_irn_flag_rematerializable;
191 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
197 be_info_init_irn(res, irn_flags, in_reqs, n_res);
199 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
200 out_infos[0].req = &amd64_class_reg_req_xmm;
201 out_infos[1].req = &arch_no_requirement;
202 out_infos[2].req = &arch_memory_requirement;
208 ir_node *new_bd_amd64_and(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
216 arch_irn_flags_t irn_flags = arch_irn_flags_none;
217 irn_flags |= arch_irn_flag_modify_flags;
218 irn_flags |= arch_irn_flag_rematerializable;
219 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
225 be_info_init_irn(res, irn_flags, in_reqs, n_res);
227 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
228 out_infos[0].req = &amd64_class_reg_req_gp;
229 out_infos[1].req = &amd64_class_reg_req_flags;
230 out_infos[2].req = &arch_memory_requirement;
236 ir_node *new_bd_amd64_bsf(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
244 arch_irn_flags_t irn_flags = arch_irn_flags_none;
245 irn_flags |= arch_irn_flag_modify_flags;
246 irn_flags |= arch_irn_flag_rematerializable;
252 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
254 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
255 out_infos[0].req = &amd64_class_reg_req_gp;
256 out_infos[1].req = &amd64_class_reg_req_flags;
257 out_infos[2].req = &arch_memory_requirement;
263 ir_node *new_bd_amd64_bsr(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
271 arch_irn_flags_t irn_flags = arch_irn_flags_none;
272 irn_flags |= arch_irn_flag_modify_flags;
273 irn_flags |= arch_irn_flag_rematerializable;
279 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
281 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
282 out_infos[0].req = &amd64_class_reg_req_gp;
283 out_infos[1].req = &amd64_class_reg_req_flags;
284 out_infos[2].req = &arch_memory_requirement;
290 ir_node *new_bd_amd64_call(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
int n_res,
const amd64_call_addr_attr_t *attr_init)
298 arch_irn_flags_t irn_flags = arch_irn_flags_none;
299 irn_flags |= arch_irn_flag_modify_flags;
304 be_info_init_irn(res, irn_flags, in_reqs, n_res);
313 static arch_register_req_t
const *in_reqs[] = {
314 &amd64_single_reg_req_gp_rax,
326 arch_irn_flags_t irn_flags = arch_irn_flags_none;
332 amd64_op_mode_t op_mode = AMD64_OP_NONE;
333 x86_insn_size_t size = X86_SIZE_32;
335 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
336 arch_set_additional_pressure(res, &amd64_reg_classes[CLASS_amd64_gp], 1);
337 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
338 out_infos[0].req = &amd64_single_reg_req_gp_rdx;
344 ir_node *new_bd_amd64_cmp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
352 arch_irn_flags_t irn_flags = arch_irn_flags_none;
353 irn_flags |= arch_irn_flag_modify_flags;
354 irn_flags |= arch_irn_flag_rematerializable;
360 be_info_init_irn(res, irn_flags, in_reqs, n_res);
362 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
363 out_infos[0].req = &arch_no_requirement;
364 out_infos[1].req = &amd64_class_reg_req_flags;
365 out_infos[2].req = &arch_memory_requirement;
371 ir_node *new_bd_amd64_cmpxchg(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
379 arch_irn_flags_t irn_flags = arch_irn_flags_none;
380 irn_flags |= arch_irn_flag_modify_flags;
386 be_info_init_irn(res, irn_flags, in_reqs, n_res);
388 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
389 out_infos[0].req = &amd64_single_reg_req_gp_rax;
390 out_infos[1].req = &amd64_class_reg_req_flags;
391 out_infos[2].req = &arch_memory_requirement;
399 static arch_register_req_t
const *in_reqs[] = {
400 &amd64_single_reg_req_gp_rax,
412 arch_irn_flags_t irn_flags = arch_irn_flags_none;
418 amd64_op_mode_t op_mode = AMD64_OP_NONE;
419 x86_insn_size_t size = X86_SIZE_64;
421 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
422 arch_set_additional_pressure(res, &amd64_reg_classes[CLASS_amd64_gp], 1);
423 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
424 out_infos[0].req = &amd64_single_reg_req_gp_rdx;
430 ir_node *new_bd_amd64_cvtsd2ss(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, amd64_op_mode_t op_mode, x86_addr_t addr)
438 arch_irn_flags_t irn_flags = arch_irn_flags_none;
444 x86_insn_size_t size = X86_SIZE_64;
446 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
448 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
449 out_infos[0].req = &amd64_class_reg_req_xmm;
450 out_infos[1].req = &arch_no_requirement;
451 out_infos[2].req = &arch_memory_requirement;
457 ir_node *new_bd_amd64_cvtsi2sd(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
465 arch_irn_flags_t irn_flags = arch_irn_flags_none;
471 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
473 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
474 out_infos[0].req = &amd64_class_reg_req_xmm;
475 out_infos[1].req = &arch_no_requirement;
476 out_infos[2].req = &arch_memory_requirement;
482 ir_node *new_bd_amd64_cvtsi2ss(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
490 arch_irn_flags_t irn_flags = arch_irn_flags_none;
496 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
498 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
499 out_infos[0].req = &amd64_class_reg_req_xmm;
500 out_infos[1].req = &arch_no_requirement;
501 out_infos[2].req = &arch_memory_requirement;
507 ir_node *new_bd_amd64_cvtss2sd(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
515 arch_irn_flags_t irn_flags = arch_irn_flags_none;
521 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
523 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
524 out_infos[0].req = &amd64_class_reg_req_xmm;
525 out_infos[1].req = &arch_no_requirement;
526 out_infos[2].req = &arch_memory_requirement;
532 ir_node *new_bd_amd64_cvttsd2si(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
540 arch_irn_flags_t irn_flags = arch_irn_flags_none;
546 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
548 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
549 out_infos[0].req = &amd64_class_reg_req_gp;
550 out_infos[1].req = &arch_no_requirement;
551 out_infos[2].req = &arch_memory_requirement;
557 ir_node *new_bd_amd64_cvttss2si(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
565 arch_irn_flags_t irn_flags = arch_irn_flags_none;
571 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
573 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
574 out_infos[0].req = &amd64_class_reg_req_gp;
575 out_infos[1].req = &arch_no_requirement;
576 out_infos[2].req = &arch_memory_requirement;
582 ir_node *new_bd_amd64_div(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size)
590 arch_irn_flags_t irn_flags = arch_irn_flags_none;
591 irn_flags |= arch_irn_flag_modify_flags;
597 x86_addr_t addr = { .base_input = 0, .variant = X86_ADDR_REG };
598 amd64_op_mode_t op_mode = AMD64_OP_REG;
600 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
602 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
603 out_infos[0].req = &amd64_single_reg_req_gp_rax;
604 out_infos[1].req = &amd64_class_reg_req_flags;
605 out_infos[2].req = &arch_memory_requirement;
606 out_infos[3].req = &amd64_single_reg_req_gp_rdx;
612 ir_node *new_bd_amd64_divs(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
620 arch_irn_flags_t irn_flags = arch_irn_flags_none;
621 irn_flags |= arch_irn_flag_rematerializable;
627 be_info_init_irn(res, irn_flags, in_reqs, n_res);
629 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
630 out_infos[0].req = &amd64_class_reg_req_xmm;
631 out_infos[1].req = &arch_no_requirement;
632 out_infos[2].req = &arch_memory_requirement;
640 static arch_register_req_t
const *in_reqs[] = {
641 &amd64_class_reg_req_x87,
642 &amd64_class_reg_req_x87,
655 arch_irn_flags_t irn_flags = arch_irn_flags_none;
656 irn_flags |= arch_irn_flag_rematerializable;
662 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
664 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
665 out_infos[0].req = &amd64_class_reg_req_x87;
673 static arch_register_req_t
const *in_reqs[] = {
674 &amd64_class_reg_req_x87,
686 arch_irn_flags_t irn_flags = arch_irn_flags_none;
687 irn_flags |= arch_irn_flag_rematerializable;
693 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
695 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
696 out_infos[0].req = &amd64_class_reg_req_x87;
704 static arch_register_req_t
const *in_reqs[] = {
705 &amd64_class_reg_req_x87,
706 &amd64_class_reg_req_x87,
719 arch_irn_flags_t irn_flags = arch_irn_flags_none;
720 irn_flags |= arch_irn_flag_rematerializable;
726 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
728 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
729 out_infos[0].req = &amd64_class_reg_req_x87;
737 static arch_register_req_t
const *in_reqs[] = {
738 &amd64_class_reg_req_x87,
750 arch_irn_flags_t irn_flags = arch_irn_flags_none;
756 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
759 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
760 out_infos[0].req = &amd64_class_reg_req_x87;
766 ir_node *new_bd_amd64_fild(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
774 arch_irn_flags_t irn_flags = arch_irn_flags_none;
775 irn_flags |= arch_irn_flag_rematerializable;
781 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
782 attr->base.addr = addr;
784 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
785 out_infos[0].req = &amd64_class_reg_req_x87;
786 out_infos[1].req = &arch_no_requirement;
787 out_infos[2].req = &arch_memory_requirement;
793 ir_node *new_bd_amd64_fisttp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
801 arch_irn_flags_t irn_flags = arch_irn_flags_none;
805 amd64_x87_binop_addr_attr_t *
const attr = (amd64_x87_binop_addr_attr_t*)
get_irn_generic_attr(res);
807 be_info_init_irn(res, irn_flags, in_reqs, n_res);
808 attr->base = *attr_init;
809 assert(attr_init->base.base.op_mode == AMD64_OP_ADDR_REG);
810 attr->base.base.base.op_mode = AMD64_OP_X87_ADDR_REG;
812 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
813 out_infos[0].req = &arch_memory_requirement;
819 ir_node *new_bd_amd64_fld(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
827 arch_irn_flags_t irn_flags = arch_irn_flags_none;
828 irn_flags |= arch_irn_flag_rematerializable;
834 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
835 attr->base.addr = addr;
837 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
838 out_infos[0].req = &amd64_class_reg_req_x87;
839 out_infos[1].req = &arch_no_requirement;
840 out_infos[2].req = &arch_memory_requirement;
848 arch_register_req_t
const **
const in_reqs = NULL;
852 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_fld1, x86_mode_E, 0, NULL);
855 arch_irn_flags_t irn_flags = arch_irn_flags_none;
856 irn_flags |= arch_irn_flag_rematerializable;
862 amd64_op_mode_t op_mode = AMD64_OP_X87;
863 x86_insn_size_t size = X86_SIZE_80;
865 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
866 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
867 out_infos[0].req = &amd64_class_reg_req_x87;
875 arch_register_req_t
const **
const in_reqs = NULL;
879 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_fldz, x86_mode_E, 0, NULL);
882 arch_irn_flags_t irn_flags = arch_irn_flags_none;
883 irn_flags |= arch_irn_flag_rematerializable;
889 amd64_op_mode_t op_mode = AMD64_OP_X87;
890 x86_insn_size_t size = X86_SIZE_80;
892 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
893 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
894 out_infos[0].req = &amd64_class_reg_req_x87;
902 static arch_register_req_t
const *in_reqs[] = {
903 &amd64_class_reg_req_x87,
904 &amd64_class_reg_req_x87,
917 arch_irn_flags_t irn_flags = arch_irn_flags_none;
918 irn_flags |= arch_irn_flag_rematerializable;
924 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
926 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
927 out_infos[0].req = &amd64_class_reg_req_x87;
935 arch_register_req_t
const **
const in_reqs = NULL;
942 arch_irn_flags_t irn_flags = arch_irn_flags_none;
948 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
951 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
952 out_infos[0].req = &arch_no_requirement;
958 ir_node *new_bd_amd64_fst(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
966 arch_irn_flags_t irn_flags = arch_irn_flags_none;
970 amd64_x87_binop_addr_attr_t *
const attr = (amd64_x87_binop_addr_attr_t*)
get_irn_generic_attr(res);
972 be_info_init_irn(res, irn_flags, in_reqs, n_res);
973 attr->base = *attr_init;
974 assert(attr_init->base.base.op_mode == AMD64_OP_ADDR_REG);
975 attr->base.base.base.op_mode = AMD64_OP_X87_ADDR_REG;
977 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
978 out_infos[0].req = &arch_memory_requirement;
984 ir_node *new_bd_amd64_fstp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
992 arch_irn_flags_t irn_flags = arch_irn_flags_none;
996 amd64_x87_binop_addr_attr_t *
const attr = (amd64_x87_binop_addr_attr_t*)
get_irn_generic_attr(res);
998 be_info_init_irn(res, irn_flags, in_reqs, n_res);
999 attr->base = *attr_init;
1000 assert(attr_init->base.base.op_mode == AMD64_OP_ADDR_REG);
1001 attr->base.base.base.op_mode = AMD64_OP_X87_ADDR_REG;
1003 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1004 out_infos[0].req = &arch_memory_requirement;
1012 static arch_register_req_t
const *in_reqs[] = {
1013 &amd64_class_reg_req_x87,
1014 &amd64_class_reg_req_x87,
1024 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_fsub, x86_mode_E, 2, in);
1027 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1028 irn_flags |= arch_irn_flag_rematerializable;
1031 int const n_res = 1;
1034 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
1036 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1037 out_infos[0].req = &amd64_class_reg_req_x87;
1045 static arch_register_req_t
const *in_reqs[] = {
1046 &amd64_class_reg_req_x87,
1047 &amd64_class_reg_req_x87,
1060 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1061 irn_flags |= arch_irn_flag_rematerializable;
1064 int const n_res = 1;
1067 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
1069 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1070 out_infos[0].req = &amd64_class_reg_req_flags;
1078 arch_register_req_t
const **
const in_reqs = NULL;
1085 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1088 int const n_res = 1;
1091 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_X87, X86_SIZE_80);
1093 attr->x87.reg = reg;
1094 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1095 out_infos[0].req = &arch_no_requirement;
1101 ir_node *new_bd_amd64_haddpd(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1109 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1110 irn_flags |= arch_irn_flag_rematerializable;
1113 int const n_res = 3;
1116 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1118 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1119 out_infos[0].req = &amd64_class_reg_req_xmm;
1120 out_infos[1].req = &arch_no_requirement;
1121 out_infos[2].req = &arch_memory_requirement;
1127 ir_node *new_bd_amd64_idiv(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size)
1135 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1136 irn_flags |= arch_irn_flag_modify_flags;
1139 int const n_res = 4;
1142 x86_addr_t addr = { .base_input = 0, .variant = X86_ADDR_REG };
1143 amd64_op_mode_t op_mode = AMD64_OP_REG;
1145 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1147 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1148 out_infos[0].req = &amd64_single_reg_req_gp_rax;
1149 out_infos[1].req = &amd64_class_reg_req_flags;
1150 out_infos[2].req = &arch_memory_requirement;
1151 out_infos[3].req = &amd64_single_reg_req_gp_rdx;
1157 ir_node *new_bd_amd64_ijmp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1165 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1168 int const n_res = 3;
1171 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1173 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1174 out_infos[0].req = &arch_exec_requirement;
1175 out_infos[1].req = &arch_no_requirement;
1176 out_infos[2].req = &arch_memory_requirement;
1182 ir_node *new_bd_amd64_imul(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1190 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1191 irn_flags |= arch_irn_flag_modify_flags;
1192 irn_flags |= arch_irn_flag_rematerializable;
1193 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
1196 int const n_res = 3;
1199 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1201 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1202 out_infos[0].req = &amd64_class_reg_req_gp;
1203 out_infos[1].req = &amd64_class_reg_req_flags;
1204 out_infos[2].req = &arch_memory_requirement;
1210 ir_node *new_bd_amd64_imul_1op(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1218 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1219 irn_flags |= arch_irn_flag_modify_flags;
1222 int const n_res = 4;
1225 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1227 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1228 out_infos[0].req = &amd64_single_reg_req_gp_rax;
1229 out_infos[1].req = &amd64_class_reg_req_flags;
1230 out_infos[2].req = &arch_memory_requirement;
1231 out_infos[3].req = &amd64_single_reg_req_gp_rdx;
1239 static arch_register_req_t
const *in_reqs[] = {
1240 &amd64_single_reg_req_flags_eflags,
1252 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1255 int const n_res = 2;
1258 x86_insn_size_t size = X86_SIZE_64;
1259 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_CC, size);
1260 init_amd64_cc_attributes(res, cc);
1261 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1262 out_infos[0].req = &arch_exec_requirement;
1263 out_infos[1].req = &arch_exec_requirement;
1271 arch_register_req_t
const **
const in_reqs = NULL;
1278 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1279 irn_flags |= arch_irn_flag_simple_jump;
1282 int const n_res = 1;
1285 amd64_op_mode_t op_mode = AMD64_OP_NONE;
1286 x86_insn_size_t size = X86_SIZE_64;
1288 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1289 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1290 out_infos[0].req = &arch_exec_requirement;
1296 ir_node *new_bd_amd64_jmp_switch(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
int n_res, amd64_op_mode_t op_mode, x86_insn_size_t size,
const x86_addr_t *addr,
const ir_switch_table *table,
ir_entity *table_entity)
1304 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1309 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1310 attr->base.addr = *addr;
1311 be_switch_attr_init(res, &attr->swtch, table, table_entity);
1327 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_l_haddpd, amd64_mode_xmm, 2, in);
1330 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1333 int const n_res = 1;
1334 (void)irn_flags, (
void)n_res;
1350 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_l_punpckldq, amd64_mode_xmm, 2, in);
1353 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1356 int const n_res = 1;
1357 (void)irn_flags, (
void)n_res;
1373 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_l_subpd, amd64_mode_xmm, 2, in);
1376 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1379 int const n_res = 1;
1380 (void)irn_flags, (
void)n_res;
1386 ir_node *new_bd_amd64_lea(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, x86_addr_t addr)
1394 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1395 irn_flags |= arch_irn_flag_rematerializable;
1398 int const n_res = 1;
1401 amd64_op_mode_t op_mode = AMD64_OP_ADDR;
1403 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1405 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1406 out_infos[0].req = &amd64_class_reg_req_gp;
1414 static arch_register_req_t
const *in_reqs[] = {
1415 &amd64_single_reg_req_gp_rbp,
1416 &arch_memory_requirement,
1429 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1432 int const n_res = 3;
1435 amd64_op_mode_t op_mode = AMD64_OP_NONE;
1436 x86_insn_size_t size = X86_SIZE_64;
1438 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1439 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1440 out_infos[0].req = &amd64_requirements_gp_rbp_I;
1441 out_infos[1].req = &arch_memory_requirement;
1442 out_infos[2].req = &amd64_requirements_gp_rsp_I;
1448 ir_node *new_bd_amd64_mov_gp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1456 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1459 int const n_res = 3;
1462 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1464 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1465 out_infos[0].req = &amd64_class_reg_req_gp;
1466 out_infos[1].req = &arch_no_requirement;
1467 out_infos[2].req = &arch_memory_requirement;
1473 ir_node *new_bd_amd64_mov_imm(
dbg_info *dbgi,
ir_node *block, x86_insn_size_t size,
const amd64_imm64_t *imm)
1475 arch_register_req_t
const **
const in_reqs = NULL;
1482 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1483 irn_flags |= arch_irn_flag_rematerializable;
1486 int const n_res = 1;
1489 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_IMM64, size);
1490 init_amd64_movimm_attributes(res, imm);
1491 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1492 out_infos[0].req = &amd64_class_reg_req_gp;
1498 ir_node *new_bd_amd64_mov_store(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1506 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1509 int const n_res = 1;
1512 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1514 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1515 out_infos[0].req = &arch_memory_requirement;
1521 ir_node *new_bd_amd64_movd(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, amd64_op_mode_t op_mode, x86_addr_t addr)
1529 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1532 int const n_res = 3;
1535 x86_insn_size_t size = X86_SIZE_64;
1537 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1539 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1540 out_infos[0].req = &amd64_class_reg_req_xmm;
1541 out_infos[1].req = &arch_no_requirement;
1542 out_infos[2].req = &arch_memory_requirement;
1548 ir_node *new_bd_amd64_movd_gp_xmm(
dbg_info *dbgi,
ir_node *block,
ir_node *operand, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1550 static arch_register_req_t
const *in_reqs[] = {
1551 &amd64_class_reg_req_gp,
1560 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_movd_gp_xmm, amd64_mode_xmm, 1, in);
1563 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1566 int const n_res = 1;
1569 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1571 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1572 out_infos[0].req = &amd64_class_reg_req_xmm;
1578 ir_node *new_bd_amd64_movd_xmm_gp(
dbg_info *dbgi,
ir_node *block,
ir_node *operand, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1580 static arch_register_req_t
const *in_reqs[] = {
1581 &amd64_class_reg_req_xmm,
1593 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1596 int const n_res = 1;
1599 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1601 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1602 out_infos[0].req = &amd64_class_reg_req_gp;
1608 ir_node *new_bd_amd64_movdqa(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, amd64_op_mode_t op_mode, x86_addr_t addr)
1616 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1619 int const n_res = 3;
1622 x86_insn_size_t size = X86_SIZE_128;
1624 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1626 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1627 out_infos[0].req = &amd64_class_reg_req_xmm;
1628 out_infos[1].req = &arch_no_requirement;
1629 out_infos[2].req = &arch_memory_requirement;
1635 ir_node *new_bd_amd64_movdqu(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, amd64_op_mode_t op_mode, x86_addr_t addr)
1643 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1646 int const n_res = 3;
1649 x86_insn_size_t size = X86_SIZE_128;
1651 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1653 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1654 out_infos[0].req = &amd64_class_reg_req_xmm;
1655 out_infos[1].req = &arch_no_requirement;
1656 out_infos[2].req = &arch_memory_requirement;
1662 ir_node *new_bd_amd64_movdqu_store(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1670 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1673 int const n_res = 1;
1676 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1678 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1679 out_infos[0].req = &arch_memory_requirement;
1685 ir_node *new_bd_amd64_movs(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1693 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1696 int const n_res = 3;
1699 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1701 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1702 out_infos[0].req = &amd64_class_reg_req_gp;
1703 out_infos[1].req = &arch_no_requirement;
1704 out_infos[2].req = &arch_memory_requirement;
1710 ir_node *new_bd_amd64_movs_store_xmm(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1718 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1721 int const n_res = 1;
1724 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1726 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1727 out_infos[0].req = &arch_memory_requirement;
1733 ir_node *new_bd_amd64_movs_xmm(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1741 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1744 int const n_res = 3;
1747 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1749 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1750 out_infos[0].req = &amd64_class_reg_req_xmm;
1751 out_infos[1].req = &arch_no_requirement;
1752 out_infos[2].req = &arch_memory_requirement;
1758 ir_node *new_bd_amd64_mul(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, amd64_op_mode_t op_mode, x86_addr_t addr)
1766 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1767 irn_flags |= arch_irn_flag_modify_flags;
1770 int const n_res = 4;
1773 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1775 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1776 out_infos[0].req = &amd64_single_reg_req_gp_rax;
1777 out_infos[1].req = &amd64_class_reg_req_flags;
1778 out_infos[2].req = &arch_memory_requirement;
1779 out_infos[3].req = &amd64_single_reg_req_gp_rdx;
1785 ir_node *new_bd_amd64_muls(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1793 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1794 irn_flags |= arch_irn_flag_rematerializable;
1795 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
1798 int const n_res = 3;
1801 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1803 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1804 out_infos[0].req = &amd64_class_reg_req_xmm;
1805 out_infos[1].req = &arch_no_requirement;
1806 out_infos[2].req = &arch_memory_requirement;
1814 static arch_register_req_t
const *in_reqs[] = {
1815 &amd64_class_reg_req_gp,
1827 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1828 irn_flags |= arch_irn_flag_modify_flags;
1829 irn_flags |= arch_irn_flag_rematerializable;
1832 int const n_res = 2;
1835 amd64_op_mode_t op_mode = AMD64_OP_REG;
1836 x86_addr_t addr = { .base_input = 0, .variant = X86_ADDR_REG };
1837 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1839 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1840 out_infos[0].req = &amd64_requirements_gp_in_r0;
1841 out_infos[1].req = &amd64_class_reg_req_flags;
1849 static arch_register_req_t
const *in_reqs[] = {
1850 &amd64_class_reg_req_gp,
1862 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1863 irn_flags |= arch_irn_flag_modify_flags;
1864 irn_flags |= arch_irn_flag_rematerializable;
1867 int const n_res = 2;
1870 amd64_op_mode_t op_mode = AMD64_OP_REG;
1871 x86_addr_t addr = { .base_input = 0, .variant = X86_ADDR_REG };
1872 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1874 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1875 out_infos[0].req = &amd64_requirements_gp_in_r0;
1876 out_infos[1].req = &amd64_class_reg_req_flags;
1882 ir_node *new_bd_amd64_or(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1890 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1891 irn_flags |= arch_irn_flag_modify_flags;
1892 irn_flags |= arch_irn_flag_rematerializable;
1893 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
1896 int const n_res = 3;
1899 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1901 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1902 out_infos[0].req = &amd64_class_reg_req_gp;
1903 out_infos[1].req = &amd64_class_reg_req_flags;
1904 out_infos[2].req = &arch_memory_requirement;
1910 ir_node *new_bd_amd64_pop_am(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, x86_addr_t addr)
1918 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1921 int const n_res = 2;
1924 amd64_op_mode_t op_mode = AMD64_OP_ADDR;
1926 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1928 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1929 out_infos[0].req = &amd64_requirements_gp_rsp_I;
1930 out_infos[1].req = &arch_memory_requirement;
1936 ir_node *new_bd_amd64_punpckldq(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
1944 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1945 irn_flags |= arch_irn_flag_rematerializable;
1948 int const n_res = 3;
1951 be_info_init_irn(res, irn_flags, in_reqs, n_res);
1953 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1954 out_infos[0].req = &amd64_class_reg_req_xmm;
1955 out_infos[1].req = &arch_no_requirement;
1956 out_infos[2].req = &arch_memory_requirement;
1962 ir_node *new_bd_amd64_push_am(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs, x86_insn_size_t size, x86_addr_t addr)
1970 arch_irn_flags_t irn_flags = arch_irn_flags_none;
1973 int const n_res = 2;
1976 amd64_op_mode_t op_mode = AMD64_OP_ADDR;
1978 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
1980 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
1981 out_infos[0].req = &amd64_requirements_gp_rsp_I;
1982 out_infos[1].req = &arch_memory_requirement;
1990 static arch_register_req_t
const *in_reqs[] = {
1991 &amd64_single_reg_req_gp_rsp,
1992 &arch_memory_requirement,
1993 &amd64_class_reg_req_gp,
2007 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2010 int const n_res = 2;
2013 amd64_op_mode_t op_mode = AMD64_OP_NONE;
2015 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
2016 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2017 out_infos[0].req = &amd64_requirements_gp_rsp_I;
2018 out_infos[1].req = &arch_memory_requirement;
2024 ir_node *new_bd_amd64_ret(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs)
2032 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2035 int const n_res = 1;
2038 amd64_op_mode_t op_mode = AMD64_OP_NONE;
2039 x86_insn_size_t size = X86_SIZE_64;
2041 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
2042 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2043 out_infos[0].req = &arch_exec_requirement;
2049 ir_node *new_bd_amd64_sar(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_shift_attr_t *attr_init)
2057 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2058 irn_flags |= arch_irn_flag_modify_flags;
2059 irn_flags |= arch_irn_flag_rematerializable;
2062 int const n_res = 2;
2065 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2068 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2069 out_infos[0].req = &amd64_class_reg_req_gp;
2070 out_infos[1].req = &amd64_class_reg_req_flags;
2076 ir_node *new_bd_amd64_sbb(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2084 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2085 irn_flags |= arch_irn_flag_modify_flags;
2088 int const n_res = 3;
2091 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2093 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2094 out_infos[0].req = &amd64_class_reg_req_gp;
2095 out_infos[1].req = &amd64_class_reg_req_flags;
2096 out_infos[2].req = &arch_memory_requirement;
2104 static arch_register_req_t
const *in_reqs[] = {
2105 &amd64_single_reg_req_flags_eflags,
2117 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2120 int const n_res = 1;
2123 x86_insn_size_t size = X86_SIZE_8;
2124 init_amd64_attributes(res, irn_flags, in_reqs, n_res, AMD64_OP_CC, size);
2125 init_amd64_cc_attributes(res, cc);
2126 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2127 out_infos[0].req = &amd64_class_reg_req_gp;
2133 ir_node *new_bd_amd64_shl(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_shift_attr_t *attr_init)
2141 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2142 irn_flags |= arch_irn_flag_modify_flags;
2143 irn_flags |= arch_irn_flag_rematerializable;
2146 int const n_res = 2;
2149 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2152 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2153 out_infos[0].req = &amd64_class_reg_req_gp;
2154 out_infos[1].req = &amd64_class_reg_req_flags;
2160 ir_node *new_bd_amd64_shr(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_shift_attr_t *attr_init)
2168 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2169 irn_flags |= arch_irn_flag_modify_flags;
2170 irn_flags |= arch_irn_flag_rematerializable;
2173 int const n_res = 2;
2176 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2179 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2180 out_infos[0].req = &amd64_class_reg_req_gp;
2181 out_infos[1].req = &amd64_class_reg_req_flags;
2187 ir_node *new_bd_amd64_sub(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2195 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2196 irn_flags |= arch_irn_flag_modify_flags;
2197 irn_flags |= arch_irn_flag_rematerializable;
2200 int const n_res = 3;
2203 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2205 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2206 out_infos[0].req = &amd64_class_reg_req_gp;
2207 out_infos[1].req = &amd64_class_reg_req_flags;
2208 out_infos[2].req = &arch_memory_requirement;
2214 ir_node *new_bd_amd64_sub_sp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2222 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2223 irn_flags |= arch_irn_flag_modify_flags;
2226 int const n_res = 3;
2229 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2231 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2232 out_infos[0].req = &amd64_requirements_gp_rsp_I;
2233 out_infos[1].req = &amd64_class_reg_req_gp;
2234 out_infos[2].req = &arch_memory_requirement;
2240 ir_node *new_bd_amd64_subpd(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2248 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2249 irn_flags |= arch_irn_flag_rematerializable;
2252 int const n_res = 3;
2255 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2257 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2258 out_infos[0].req = &amd64_class_reg_req_xmm;
2259 out_infos[1].req = &arch_no_requirement;
2260 out_infos[2].req = &arch_memory_requirement;
2266 ir_node *new_bd_amd64_subs(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2274 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2275 irn_flags |= arch_irn_flag_rematerializable;
2278 int const n_res = 3;
2281 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2283 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2284 out_infos[0].req = &amd64_class_reg_req_xmm;
2285 out_infos[1].req = &arch_no_requirement;
2286 out_infos[2].req = &arch_memory_requirement;
2292 ir_node *new_bd_amd64_ucomis(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2300 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2301 irn_flags |= arch_irn_flag_modify_flags;
2302 irn_flags |= arch_irn_flag_rematerializable;
2305 int const n_res = 3;
2308 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2310 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2311 out_infos[0].req = &arch_no_requirement;
2312 out_infos[1].req = &amd64_class_reg_req_flags;
2313 out_infos[2].req = &arch_memory_requirement;
2319 ir_node *new_bd_amd64_xor(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2327 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2328 irn_flags |= arch_irn_flag_modify_flags;
2329 irn_flags |= arch_irn_flag_rematerializable;
2330 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
2333 int const n_res = 3;
2336 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2338 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2339 out_infos[0].req = &amd64_class_reg_req_gp;
2340 out_infos[1].req = &amd64_class_reg_req_flags;
2341 out_infos[2].req = &arch_memory_requirement;
2349 arch_register_req_t
const **
const in_reqs = NULL;
2356 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2357 irn_flags |= arch_irn_flag_modify_flags;
2358 irn_flags |= arch_irn_flag_rematerializable;
2361 int const n_res = 2;
2364 amd64_op_mode_t op_mode = AMD64_OP_NONE;
2365 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
2366 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2367 out_infos[0].req = &amd64_class_reg_req_gp;
2368 out_infos[1].req = &amd64_class_reg_req_flags;
2374 ir_node *new_bd_amd64_xorp(
dbg_info *dbgi,
ir_node *block,
int const arity,
ir_node *
const *
const in, arch_register_req_t
const **
const in_reqs,
const amd64_binop_addr_attr_t *attr_init)
2382 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2383 irn_flags |= arch_irn_flag_rematerializable;
2384 irn_flags |= (arch_irn_flags_t)amd64_arch_irn_flag_commutative_binop;
2387 int const n_res = 3;
2390 be_info_init_irn(res, irn_flags, in_reqs, n_res);
2392 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2393 out_infos[0].req = &amd64_class_reg_req_xmm;
2394 out_infos[1].req = &arch_no_requirement;
2395 out_infos[2].req = &arch_memory_requirement;
2403 arch_register_req_t
const **
const in_reqs = NULL;
2407 ir_node *
const res =
new_ir_node(dbgi, irg, block, op_amd64_xorp_0, amd64_mode_xmm, 0, NULL);
2410 arch_irn_flags_t irn_flags = arch_irn_flags_none;
2411 irn_flags |= arch_irn_flag_rematerializable;
2414 int const n_res = 1;
2417 amd64_op_mode_t op_mode = AMD64_OP_NONE;
2418 init_amd64_attributes(res, irn_flags, in_reqs, n_res, op_mode, size);
2419 reg_out_info_t *
const out_infos = be_get_info(res)->out_infos;
2420 out_infos[0].req = &amd64_class_reg_req_xmm;
2431 void amd64_create_opcodes(
void)
2436 amd64_opcode_start = cur_opcode;
2441 set_op_tag(op, amd64_op_tag);
2447 set_op_tag(op, amd64_op_tag);
2453 set_op_tag(op, amd64_op_tag);
2459 set_op_tag(op, amd64_op_tag);
2465 set_op_tag(op, amd64_op_tag);
2471 set_op_tag(op, amd64_op_tag);
2477 set_op_tag(op, amd64_op_tag);
2483 set_op_tag(op, amd64_op_tag);
2489 set_op_tag(op, amd64_op_tag);
2490 op_amd64_cmpxchg = op;
2495 set_op_tag(op, amd64_op_tag);
2501 set_op_tag(op, amd64_op_tag);
2502 op_amd64_cvtsd2ss = op;
2507 set_op_tag(op, amd64_op_tag);
2508 op_amd64_cvtsi2sd = op;
2513 set_op_tag(op, amd64_op_tag);
2514 op_amd64_cvtsi2ss = op;
2519 set_op_tag(op, amd64_op_tag);
2520 op_amd64_cvtss2sd = op;
2525 set_op_tag(op, amd64_op_tag);
2526 op_amd64_cvttsd2si = op;
2531 set_op_tag(op, amd64_op_tag);
2532 op_amd64_cvttss2si = op;
2537 set_op_tag(op, amd64_op_tag);
2543 set_op_tag(op, amd64_op_tag);
2549 set_op_tag(op, amd64_op_tag);
2555 set_op_tag(op, amd64_op_tag);
2561 set_op_tag(op, amd64_op_tag);
2567 set_op_tag(op, amd64_op_tag);
2573 set_op_tag(op, amd64_op_tag);
2579 set_op_tag(op, amd64_op_tag);
2580 op_amd64_fisttp = op;
2585 set_op_tag(op, amd64_op_tag);
2591 set_op_tag(op, amd64_op_tag);
2597 set_op_tag(op, amd64_op_tag);
2603 set_op_tag(op, amd64_op_tag);
2609 set_op_tag(op, amd64_op_tag);
2615 set_op_tag(op, amd64_op_tag);
2621 set_op_tag(op, amd64_op_tag);
2627 set_op_tag(op, amd64_op_tag);
2633 set_op_tag(op, amd64_op_tag);
2634 op_amd64_fucomi = op;
2639 set_op_tag(op, amd64_op_tag);
2645 set_op_tag(op, amd64_op_tag);
2646 op_amd64_haddpd = op;
2651 set_op_tag(op, amd64_op_tag);
2657 set_op_tag(op, amd64_op_tag);
2663 set_op_tag(op, amd64_op_tag);
2669 set_op_tag(op, amd64_op_tag);
2670 op_amd64_imul_1op = op;
2675 set_op_tag(op, amd64_op_tag);
2681 set_op_tag(op, amd64_op_tag);
2687 set_op_tag(op, amd64_op_tag);
2688 op_amd64_jmp_switch = op;
2691 set_op_tag(op, amd64_op_tag);
2692 op_amd64_l_haddpd = op;
2695 set_op_tag(op, amd64_op_tag);
2696 op_amd64_l_punpckldq = op;
2699 set_op_tag(op, amd64_op_tag);
2700 op_amd64_l_subpd = op;
2705 set_op_tag(op, amd64_op_tag);
2711 set_op_tag(op, amd64_op_tag);
2712 op_amd64_leave = op;
2717 set_op_tag(op, amd64_op_tag);
2718 op_amd64_mov_gp = op;
2723 set_op_tag(op, amd64_op_tag);
2724 op_amd64_mov_imm = op;
2729 set_op_tag(op, amd64_op_tag);
2730 op_amd64_mov_store = op;
2735 set_op_tag(op, amd64_op_tag);
2741 set_op_tag(op, amd64_op_tag);
2742 op_amd64_movd_gp_xmm = op;
2747 set_op_tag(op, amd64_op_tag);
2748 op_amd64_movd_xmm_gp = op;
2753 set_op_tag(op, amd64_op_tag);
2754 op_amd64_movdqa = op;
2759 set_op_tag(op, amd64_op_tag);
2760 op_amd64_movdqu = op;
2765 set_op_tag(op, amd64_op_tag);
2766 op_amd64_movdqu_store = op;
2771 set_op_tag(op, amd64_op_tag);
2777 set_op_tag(op, amd64_op_tag);
2778 op_amd64_movs_store_xmm = op;
2783 set_op_tag(op, amd64_op_tag);
2784 op_amd64_movs_xmm = op;
2789 set_op_tag(op, amd64_op_tag);
2795 set_op_tag(op, amd64_op_tag);
2801 set_op_tag(op, amd64_op_tag);
2807 set_op_tag(op, amd64_op_tag);
2813 set_op_tag(op, amd64_op_tag);
2819 set_op_tag(op, amd64_op_tag);
2820 op_amd64_pop_am = op;
2825 set_op_tag(op, amd64_op_tag);
2826 op_amd64_punpckldq = op;
2831 set_op_tag(op, amd64_op_tag);
2832 op_amd64_push_am = op;
2837 set_op_tag(op, amd64_op_tag);
2838 op_amd64_push_reg = op;
2843 set_op_tag(op, amd64_op_tag);
2849 set_op_tag(op, amd64_op_tag);
2855 set_op_tag(op, amd64_op_tag);
2861 set_op_tag(op, amd64_op_tag);
2862 op_amd64_setcc = op;
2867 set_op_tag(op, amd64_op_tag);
2873 set_op_tag(op, amd64_op_tag);
2879 set_op_tag(op, amd64_op_tag);
2885 set_op_tag(op, amd64_op_tag);
2886 op_amd64_sub_sp = op;
2891 set_op_tag(op, amd64_op_tag);
2892 op_amd64_subpd = op;
2897 set_op_tag(op, amd64_op_tag);
2903 set_op_tag(op, amd64_op_tag);
2904 op_amd64_ucomis = op;
2909 set_op_tag(op, amd64_op_tag);
2915 set_op_tag(op, amd64_op_tag);
2916 op_amd64_xor_0 = op;
2921 set_op_tag(op, amd64_op_tag);
2927 set_op_tag(op, amd64_op_tag);
2928 op_amd64_xorp_0 = op;
2932 void amd64_free_opcodes(
void)
2934 free_ir_op(op_amd64_add); op_amd64_add = NULL;
2935 free_ir_op(op_amd64_adds); op_amd64_adds = NULL;
2936 free_ir_op(op_amd64_and); op_amd64_and = NULL;
2937 free_ir_op(op_amd64_bsf); op_amd64_bsf = NULL;
2938 free_ir_op(op_amd64_bsr); op_amd64_bsr = NULL;
2939 free_ir_op(op_amd64_call); op_amd64_call = NULL;
2940 free_ir_op(op_amd64_cltd); op_amd64_cltd = NULL;
2941 free_ir_op(op_amd64_cmp); op_amd64_cmp = NULL;
2942 free_ir_op(op_amd64_cmpxchg); op_amd64_cmpxchg = NULL;
2943 free_ir_op(op_amd64_cqto); op_amd64_cqto = NULL;
2944 free_ir_op(op_amd64_cvtsd2ss); op_amd64_cvtsd2ss = NULL;
2945 free_ir_op(op_amd64_cvtsi2sd); op_amd64_cvtsi2sd = NULL;
2946 free_ir_op(op_amd64_cvtsi2ss); op_amd64_cvtsi2ss = NULL;
2947 free_ir_op(op_amd64_cvtss2sd); op_amd64_cvtss2sd = NULL;
2948 free_ir_op(op_amd64_cvttsd2si); op_amd64_cvttsd2si = NULL;
2949 free_ir_op(op_amd64_cvttss2si); op_amd64_cvttss2si = NULL;
2950 free_ir_op(op_amd64_div); op_amd64_div = NULL;
2951 free_ir_op(op_amd64_divs); op_amd64_divs = NULL;
2952 free_ir_op(op_amd64_fadd); op_amd64_fadd = NULL;
2953 free_ir_op(op_amd64_fchs); op_amd64_fchs = NULL;
2954 free_ir_op(op_amd64_fdiv); op_amd64_fdiv = NULL;
2955 free_ir_op(op_amd64_fdup); op_amd64_fdup = NULL;
2956 free_ir_op(op_amd64_fild); op_amd64_fild = NULL;
2957 free_ir_op(op_amd64_fisttp); op_amd64_fisttp = NULL;
2958 free_ir_op(op_amd64_fld); op_amd64_fld = NULL;
2959 free_ir_op(op_amd64_fld1); op_amd64_fld1 = NULL;
2960 free_ir_op(op_amd64_fldz); op_amd64_fldz = NULL;
2961 free_ir_op(op_amd64_fmul); op_amd64_fmul = NULL;
2962 free_ir_op(op_amd64_fpop); op_amd64_fpop = NULL;
2963 free_ir_op(op_amd64_fst); op_amd64_fst = NULL;
2964 free_ir_op(op_amd64_fstp); op_amd64_fstp = NULL;
2965 free_ir_op(op_amd64_fsub); op_amd64_fsub = NULL;
2966 free_ir_op(op_amd64_fucomi); op_amd64_fucomi = NULL;
2967 free_ir_op(op_amd64_fxch); op_amd64_fxch = NULL;
2968 free_ir_op(op_amd64_haddpd); op_amd64_haddpd = NULL;
2969 free_ir_op(op_amd64_idiv); op_amd64_idiv = NULL;
2970 free_ir_op(op_amd64_ijmp); op_amd64_ijmp = NULL;
2971 free_ir_op(op_amd64_imul); op_amd64_imul = NULL;
2972 free_ir_op(op_amd64_imul_1op); op_amd64_imul_1op = NULL;
2973 free_ir_op(op_amd64_jcc); op_amd64_jcc = NULL;
2974 free_ir_op(op_amd64_jmp); op_amd64_jmp = NULL;
2975 free_ir_op(op_amd64_jmp_switch); op_amd64_jmp_switch = NULL;
2976 free_ir_op(op_amd64_l_haddpd); op_amd64_l_haddpd = NULL;
2977 free_ir_op(op_amd64_l_punpckldq); op_amd64_l_punpckldq = NULL;
2978 free_ir_op(op_amd64_l_subpd); op_amd64_l_subpd = NULL;
2979 free_ir_op(op_amd64_lea); op_amd64_lea = NULL;
2980 free_ir_op(op_amd64_leave); op_amd64_leave = NULL;
2981 free_ir_op(op_amd64_mov_gp); op_amd64_mov_gp = NULL;
2982 free_ir_op(op_amd64_mov_imm); op_amd64_mov_imm = NULL;
2983 free_ir_op(op_amd64_mov_store); op_amd64_mov_store = NULL;
2984 free_ir_op(op_amd64_movd); op_amd64_movd = NULL;
2985 free_ir_op(op_amd64_movd_gp_xmm); op_amd64_movd_gp_xmm = NULL;
2986 free_ir_op(op_amd64_movd_xmm_gp); op_amd64_movd_xmm_gp = NULL;
2987 free_ir_op(op_amd64_movdqa); op_amd64_movdqa = NULL;
2988 free_ir_op(op_amd64_movdqu); op_amd64_movdqu = NULL;
2989 free_ir_op(op_amd64_movdqu_store); op_amd64_movdqu_store = NULL;
2990 free_ir_op(op_amd64_movs); op_amd64_movs = NULL;
2991 free_ir_op(op_amd64_movs_store_xmm); op_amd64_movs_store_xmm = NULL;
2992 free_ir_op(op_amd64_movs_xmm); op_amd64_movs_xmm = NULL;
2993 free_ir_op(op_amd64_mul); op_amd64_mul = NULL;
2994 free_ir_op(op_amd64_muls); op_amd64_muls = NULL;
2995 free_ir_op(op_amd64_neg); op_amd64_neg = NULL;
2996 free_ir_op(op_amd64_not); op_amd64_not = NULL;
2998 free_ir_op(op_amd64_pop_am); op_amd64_pop_am = NULL;
2999 free_ir_op(op_amd64_punpckldq); op_amd64_punpckldq = NULL;
3000 free_ir_op(op_amd64_push_am); op_amd64_push_am = NULL;
3001 free_ir_op(op_amd64_push_reg); op_amd64_push_reg = NULL;
3002 free_ir_op(op_amd64_ret); op_amd64_ret = NULL;
3003 free_ir_op(op_amd64_sar); op_amd64_sar = NULL;
3004 free_ir_op(op_amd64_sbb); op_amd64_sbb = NULL;
3005 free_ir_op(op_amd64_setcc); op_amd64_setcc = NULL;
3006 free_ir_op(op_amd64_shl); op_amd64_shl = NULL;
3007 free_ir_op(op_amd64_shr); op_amd64_shr = NULL;
3008 free_ir_op(op_amd64_sub); op_amd64_sub = NULL;
3009 free_ir_op(op_amd64_sub_sp); op_amd64_sub_sp = NULL;
3010 free_ir_op(op_amd64_subpd); op_amd64_subpd = NULL;
3011 free_ir_op(op_amd64_subs); op_amd64_subs = NULL;
3012 free_ir_op(op_amd64_ucomis); op_amd64_ucomis = NULL;
3013 free_ir_op(op_amd64_xor); op_amd64_xor = NULL;
3014 free_ir_op(op_amd64_xor_0); op_amd64_xor_0 = NULL;
3015 free_ir_op(op_amd64_xorp); op_amd64_xorp = NULL;
3016 free_ir_op(op_amd64_xorp_0); op_amd64_xorp_0 = NULL;
unsigned get_irn_opcode(const ir_node *node)
Returns the opcode-enum of the node.
Forking control flow at this operation.
ir_graph * get_irn_irg(const ir_node *node)
Returns the ir_graph this node belongs to.
struct ir_op ir_op
Node Opcode.
void set_op_attrs_equal(ir_op *op, node_attrs_equal_func func)
Sets attrs_equal callback func for operation op.
ir_mode * mode_ANY
undefined mode
void verify_new_node(ir_node *node)
If firm is built in debug mode, verify that a newly created node is fine.
struct dbg_info dbg_info
Source Reference.
void * get_irn_generic_attr(ir_node *node)
Returns a pointer to the node attributes.
This operation jumps to an unknown destination.
ir_op * get_irn_op(const ir_node *node)
Returns the opcode struct of the node.
ir_node * optimize_node(ir_node *n)
Applies local optimizations to a single node.
ir_node * new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode, int arity, ir_node *const *in)
IR node constructor.
This operation is a control flow operation.
struct ir_switch_table ir_switch_table
A switch table mapping integer numbers to proj-numbers of a Switch-node.
ir_mode * mode_T
tuple (none)
Nodes must remain in this basic block.
This operation can be kept in End's keep-alive list.
This operation has a memory input and may change the memory state.
Node must remain in this basic block if it can throw an exception, else can float.
void set_op_copy_attr(ir_op *op, copy_attr_func func)
Sets attribute copy callback func for operation op.
The arity is not fixed by opcode, but statically known.
ir_op * new_ir_op(unsigned code, const char *name, op_pin_state p, irop_flags flags, op_arity opar, int op_index, size_t attr_size)
Creates a new IR operation.
This operation has no arguments and is some kind of a constant.
unsigned get_next_ir_opcodes(unsigned num)
Returns the next free n IR opcode number, allows to register a bunch of user ops. ...
void set_op_dump(ir_op *op, dump_node_func func)
Sets dump callback func for operation op.
struct ir_entity ir_entity
Entity.
struct ir_node ir_node
Procedure Graph Node.
void free_ir_op(ir_op *code)
Frees an ir operation.
struct ir_graph ir_graph
Procedure Graph.
ir_mode * mode_X
execution
Nodes of this opcode can be placed in any basic block.