This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14255] i386 backend should be teached how to use divl
- From: "zack at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2004 17:10:58 -0000
- Subject: [Bug target/14255] i386 backend should be teached how to use divl
- References: <20040223080809.14255.bernie@develer.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From zack at codesourcery dot com 2004-02-23 17:10 -------
Subject: Re: New: i386 backend should be teached
how to use divl
"bernie at develer dot com" <gcc-bugzilla@gcc.gnu.org> writes:
> When dividing a 64bit integer by a 32bit integer,
> GCC promotes everything to 64bits and generates
> dumb code calling *both* __divdi3 and __moddi3.
This ought to be addressable with a pattern of the form
(parallel [
(set (reg:SI quo)
(truncate:SI (div:DI (reg:DI dividend)
(zero_extend:DI (reg:SI divisor)))))
(set (reg:SI rem)
(truncate:SI (mod:DI (reg:DI dividend)
(zero_extend:DI (reg:SI divisor)))))
])
but I am not sure where it goes in i386.md.
zw
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14255