sparc: fix bitopcc bugs
authorMatthias Braun <matze@braunis.de>
Mon, 6 Sep 2010 13:05:05 +0000 (13:05 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 6 Sep 2010 13:05:05 +0000 (13:05 +0000)
[r27971]

ir/be/sparc/sparc_spec.pl
ir/be/sparc/sparc_transform.c

index ccf0bf2..6502bc2 100644 (file)
@@ -462,7 +462,7 @@ And => {
 
 AndCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. and %S1, %R2I, %%g0',
+       emit         => '. andcc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
@@ -476,7 +476,7 @@ AndN => {
 
 AndNCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. andn %S1, %R2I, %%g0',
+       emit         => '. andncc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
@@ -490,7 +490,7 @@ Or => {
 
 OrCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. or %S1, %R2I, %%g0',
+       emit         => '. orcc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
@@ -504,7 +504,7 @@ OrN => {
 
 OrNCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. orn %S1, %R2I, %%g0',
+       emit         => '. orncc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
@@ -518,7 +518,7 @@ Xor => {
 
 XorCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. xor %S1, %R2I, %%g0',
+       emit         => '. xorcc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
@@ -532,7 +532,7 @@ XNor => {
 
 XNorCCZero => {
        irn_flags    => [ "rematerializable", "modifies_flags" ],
-       emit         => '. xnor %S1, %R2I, %%g0',
+       emit         => '. xnorcc %S1, %R2I, %%g0',
        mode         => $mode_flags,
        constructors => \%binopcczero_operand_constructors,
 },
index 4027c18..b5599ad 100644 (file)
@@ -726,7 +726,7 @@ static ir_node *gen_helper_bitop(ir_node *node,
        ir_node *op1 = get_binop_left(node);
        ir_node *op2 = get_binop_right(node);
        if (is_Not(op1)) {
-               return gen_helper_binop_args(node, get_Not_op(op1), op2,
+               return gen_helper_binop_args(node, op2, get_Not_op(op1),
                                             MATCH_MODE_NEUTRAL,
                                             new_not_reg, new_not_imm);
        }