Fix swapped CASA operands.

Found by SingleSource/UnitTests/AtomicOps.c
Only generate the popc instruction for SPARC CPUs that implement it.

The popc instruction is defined in the SPARCv9 instruction set
architecture, but it was emulated on CPUs older than Niagara 2.