From: Uros Bizjak Date: Mon, 5 Jan 2015 22:08:07 +0000 (+0100) Subject: i386.c (output_387_binary_op): Use std::swap. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=389d63bb1ec188038162e599ca21cd5d72af219b;p=gcc.git i386.c (output_387_binary_op): Use std::swap. * config/i386/i386.c (output_387_binary_op): Use std::swap. From-SVN: r219204 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aaa8cc843e5..bf805fbf52d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-01-05 Uros Bizjak + + * config/i386/i386.c (output_387_binary_op): Use std::swap. + 2015-01-05 Oleg Endo * rtlanal.c (refers_to_regno_p): Change return value from int to bool. @@ -201,7 +205,7 @@ * config/pa/predicates.md (reg_before_reload_operand): Tighten predicate to reject register index and LO_SUM DLT memory forms after reload. - + 2015-01-02 Sandra Loosemore * doc/invoke.texi (Option Summary): Fix spelling of diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0e710713fba..dc2b7d80887 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -16414,11 +16414,7 @@ output_387_binary_op (rtx insn, rtx *operands) case MULT: case PLUS: if (REG_P (operands[2]) && REGNO (operands[0]) == REGNO (operands[2])) - { - rtx temp = operands[2]; - operands[2] = operands[1]; - operands[1] = temp; - } + std::swap (operands[1], operands[2]); /* know operands[0] == operands[1]. */