« Previous | Next » 

Revision 24c9ae4e

ID24c9ae4eba5eec59256d0d0ace4d868a19f87528

Added by Richard Henderson over 11 years ago

tcg: Split out swap_commutative as a subroutine

Reduces code duplication and prefers

movcond d, c1, c2, const, s
to
movcond d, c1, c2, s, const

It also prefers

add r, r, c
over
add r, c, r

when both inputs are known constants. This doesn't matter for true add, as
we will fully constant fold that. But it matters for a follow-on patch using
this routine for add2 which may not be fully foldable.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences