This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Different multiply operator for pointers and integers
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Laura Tosoratto'" <Laura dot Tosoratto at roma1 dot infn dot it>,<gcc at gcc dot gnu dot org>
- Cc: "'Alessandro Lonardo'" <alessandro dot lonardo at roma1 dot infn dot it>
- Date: Thu, 16 Dec 2004 16:43:06 -0000
- Subject: RE: Different multiply operator for pointers and integers
> -----Original Message-----
> From: gcc-owner On Behalf Of Laura Tosoratto
> Sent: 16 December 2004 16:33
> Hi,
> we're porting GCC on a parallel architecture with a large
> register file
> and where pointers and integers have the same 64 bit format.
> However the machine manages pointers arithmetics and integers
> arithmetics through two different multiply instructions.
This is curious! When and why would you ever multiply two pointers?
> In the same time, it needs all addresses to be hold in a
> specific part
> of register file (we defined a reg_class to represent this
> set of regs) .
Yep, that's just the way to do it.
> We found two ways to implement these features:
> -defining Pmode as different from other integer modes ( PSImode or
> similar), and so providing different sets of insn patterns
> for pointers and integers
> or
> -introducing the address multiply operator at the tree level.
>
> Which choice do you think would be the most effective?
I think that this is a backend issue, so you should handle it in the .md file
rather than at the tree level. Given that you've got a 64-bit word size,
wouldn't PDImode be more suitable than PSImode?
cheers,
DaveK
--
Can't think of a witty .sigline today....