Roger Sayle - Re: [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Roger Sayle
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Feb 2007 08:15:00 -0700 (MST)
- Subject: Re: [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32
On Fri, 9 Feb 2007, Roger Sayle wrote:
2007-02-09 Roger Sayle roger@eyesopen.com
* config/i386/i386.md (bswapdi2_rex): Renamed from bswapdi2. (bswapdi2): New define_expand to provide 32-bit implementation. * gcc.target/i386/builtin-bswap-3.c: New test case.
Grr. Operator error, sleep deprivation, new mail client... Here's the patch. Sorry for the inconvenience.
Index: config/i386/i386.md
*** config/i386/i386.md (revision 121726) --- config/i386/i386.md (working copy)
*** 14780,14786 **** [(set_attr "prefix_0f" "1") (set_attr "length" "2")])
! (define_insn "bswapdi2" [(set (match_operand:DI 0 "register_operand" "=r") (bswap:DI (match_operand:DI 1 "register_operand" "0"))) (clobber (reg:CC FLAGS_REG))] --- 14780,14786 ---- [(set_attr "prefix_0f" "1") (set_attr "length" "2")])
! (define_insn "bswapdi2_rex" [(set (match_operand:DI 0 "register_operand" "=r") (bswap:DI (match_operand:DI 1 "register_operand" "0"))) (clobber (reg:CC FLAGS_REG))]
*** 14789,14794 **** --- 14789,14813 ---- [(set_attr "prefix_0f" "1") (set_attr "length" "3")])
- (define_expand "bswapdi2"
- [(parallel [(set (match_operand:DI 0 "register_operand" "")
(bswap:DI (match_operand:DI 1 "register_operand" "0")))
(clobber (reg:CC FLAGS_REG))])]
- "TARGET_BSWAP"
- {
if (!TARGET_64BIT)
{
rtx tmp1, tmp2;
tmp1 = gen_reg_rtx (SImode);
tmp2 = gen_reg_rtx (SImode);
emit_insn (gen_bswapsi2 (tmp1, gen_lowpart (SImode, operands[1])));
emit_insn (gen_bswapsi2 (tmp2, gen_highpart (SImode, operands[1])));
emit_move_insn (gen_lowpart (SImode, operands[0]), tmp2);
emit_move_insn (gen_highpart (SImode, operands[0]), tmp1);
DONE;
}
- })
- (define_expand "clzdi2" [(parallel [(set (match_operand:DI 0 "register_operand" "")
Roger
- Follow-Ups:
- Re: [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32
* From: Jakub Jelinek
- Re: [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32
- References:
- [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32
* From: Roger Sayle
- [x86 PATCH] Provide bswapdi2 intrinisic on 32-bit IA-32
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |