X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firop.c;h=7241d5ee99743d318b4917a1f10db659b195cd3b;hb=b78bdd4d94de46de4156272e6dbfe44e97933a5b;hp=adba9f930b1e34f9e3db0e4638729811f1acfa06;hpb=8ac7f010beb0c30fcbae390e6582661f9f98d417;p=libfirm diff --git a/ir/ir/irop.c b/ir/ir/irop.c index adba9f930..7241d5ee9 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -67,6 +67,8 @@ ir_op *op_Shrs; ir_op *get_op_Shrs (void) { return op_Shrs; } ir_op *op_Rot; ir_op *get_op_Rot (void) { return op_Rot; } ir_op *op_Conv; ir_op *get_op_Conv (void) { return op_Conv; } ir_op *op_Cast; ir_op *get_op_Cast (void) { return op_Cast; } +ir_op *op_Carry; ir_op *get_op_Carry (void) { return op_Carry; } +ir_op *op_Borrow; ir_op *get_op_Borrow (void) { return op_Borrow; } ir_op *op_Phi; ir_op *get_op_Phi (void) { return op_Phi; } @@ -91,6 +93,7 @@ ir_op *op_EndExcept; ir_op *get_op_EndExcept (void) { return op_EndExcept; } ir_op *op_NoMem; ir_op *get_op_NoMem (void) { return op_NoMem; } ir_op *op_Mux; ir_op *get_op_Mux (void) { return op_Mux; } +ir_op *op_Psi; ir_op *get_op_Psi (void) { return op_Psi; } ir_op *op_CopyB; ir_op *get_op_CopyB (void) { return op_CopyB; } ir_op *op_Raise; ir_op *get_op_Raise (void) { return op_Raise; } @@ -183,12 +186,16 @@ new_ir_op(opcode code, const char *name, op_pin_state p, firm_set_default_verifyer(code, &res->ops); firm_set_default_reassoc(code, &res->ops); + add_irp_opcode(res); + hook_new_ir_op(res); return res; } void free_ir_op(ir_op *code) { hook_free_ir_op(code); + + remove_irp_opcode(code); free(code); } @@ -241,6 +248,8 @@ init_op(void) op_Rot = new_ir_op(iro_Rot, "Rot", op_pin_state_floats, N, oparity_binary, 0, 0, NULL); op_Conv = new_ir_op(iro_Conv, "Conv", op_pin_state_floats, N, oparity_unary, 0, 0, NULL); op_Cast = new_ir_op(iro_Cast, "Cast", op_pin_state_floats, N|H, oparity_unary, 0, sizeof(cast_attr), NULL); + op_Carry = new_ir_op(iro_Carry, "Carry", op_pin_state_floats, C, oparity_binary, 0, 0, NULL); + op_Borrow = new_ir_op(iro_Borrow, "Borrow", op_pin_state_floats, N, oparity_binary, 0, 0, NULL); op_Phi = new_ir_op(iro_Phi, "Phi", op_pin_state_pinned, N, oparity_variable, -1, sizeof(int), NULL); @@ -265,6 +274,7 @@ init_op(void) op_NoMem = new_ir_op(iro_NoMem, "NoMem", op_pin_state_pinned, N, oparity_zero, -1, 0, NULL); op_Mux = new_ir_op(iro_Mux, "Mux", op_pin_state_floats, N, oparity_trinary, -1, 0, NULL); + op_Psi = new_ir_op(iro_Psi, "Psi", op_pin_state_floats, N, oparity_variable, -1, 0, NULL); op_CopyB = new_ir_op(iro_CopyB, "CopyB", op_pin_state_mem_pinned, F|H, oparity_trinary, -1, sizeof(copyb_attr), NULL); op_InstOf = new_ir_op(iro_InstOf, "InstOf", op_pin_state_mem_pinned, H, oparity_unary, -1, sizeof(io_attr), NULL); @@ -317,6 +327,8 @@ void finish_op(void) { free_ir_op (op_Rot ); op_Rot = NULL; free_ir_op (op_Conv ); op_Conv = NULL; free_ir_op (op_Cast ); op_Cast = NULL; + free_ir_op (op_Carry ); op_Carry = NULL; + free_ir_op (op_Borrow ); op_Borrow = NULL; free_ir_op (op_Phi ); op_Phi = NULL; @@ -340,6 +352,7 @@ void finish_op(void) { free_ir_op (op_EndExcept); op_EndExcept = NULL; free_ir_op (op_NoMem ); op_NoMem = NULL; + free_ir_op (op_Psi ); op_Psi = NULL; free_ir_op (op_Mux ); op_Mux = NULL; free_ir_op (op_CopyB ); op_CopyB = NULL;