Commit df638b27 by Jesper Nilsson Committed by Hans-Peter Nilsson

cris.h (TARGET_HAS_SWAP): Defined to describe availability of swap instruction.

	* config/cris/cris.h (TARGET_HAS_SWAP): Defined to describe
	availability of swap instruction.
	* config/cris/cris.md (bswapsi2): Implement using swap instruction.

From-SVN: r128043
parent 12749440
2007-09-03 Jesper Nilsson <jesper.nilsson@axis.com>
* config/cris/cris.h (TARGET_HAS_SWAP): Defined to describe
availability of swap instruction.
* config/cris/cris.md (bswapsi2): Implement using swap instruction.
2007-09-03 Revital Eres <eres@il.ibm.com>
* doc/invoke.texi (-fmodulo-sched-allow-regmoves): Update
......
......@@ -279,6 +279,7 @@ extern int target_flags;
#define TARGET_HAS_MUL_INSNS (cris_cpu_version >= CRIS_CPU_NG)
#define TARGET_HAS_LZ (cris_cpu_version >= CRIS_CPU_ETRAX4)
#define TARGET_HAS_SWAP (cris_cpu_version >= CRIS_CPU_SVINTO)
#define CRIS_SUBTARGET_HANDLE_OPTION(x, y, z)
......
......@@ -2671,6 +2671,13 @@
"lz %1,%0"
[(set_attr "slottable" "yes")])
(define_insn "bswapsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
(bswap:SI (match_operand:SI 1 "register_operand" "0")))]
"TARGET_HAS_SWAP"
"swapwb %0"
[(set_attr "slottable" "yes")])
;; Bound-insn. Defined to be the same as an unsigned minimum, which is an
;; operation supported by gcc. Used in casesi, but used now and then in
;; normal code too.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment