Message ID | 20180904081528.6407-1-jcmvbkbc@gmail.com |
---|---|
State | New |
Headers | show |
Series | gcc: xtensa: fix NAND code in xtensa_expand_atomic | expand |
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 7cfe64d42895..b88556625223 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -1614,10 +1614,10 @@ xtensa_expand_atomic (enum rtx_code code, rtx target, rtx mem, rtx val, break; case MULT: /* NAND */ - tmp = expand_simple_binop (SImode, XOR, old, ac.modemask, - NULL_RTX, 1, OPTAB_DIRECT); - tmp = expand_simple_binop (SImode, AND, tmp, val, + tmp = expand_simple_binop (SImode, AND, old, val, new_rtx, 1, OPTAB_DIRECT); + tmp = expand_simple_binop (SImode, XOR, tmp, ac.modemask, + NULL_RTX, 1, OPTAB_DIRECT); break; default: