[LLVMdev] Proposal: intp type

Kenneth Uildriks kennethuil at gmail.com
Wed Nov 11 12:52:40 PST 2009


On Wed, Nov 11, 2009 at 2:46 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> I'd be happy to permit arithmetic and bitwise operations on pointers. (I
> thought we already did. We don't.)

That would be very helpful too.

>
> You still can't create literal values with it (besides null) because you
> don't know whether your constant will fit. Or rather, what you get is
> exactly what the inttoptr instruction already gives you.

> Within a structure or array you mean? Or do you mean that some platforms
> pass pointers and integers differently as function arguments?
>
> Nick
>

I mean within a structure or array.  I don't know whether any
platforms would pass them any differently as function arguments, but I
do know that the "default" data layout (which I believe is the Sparc
data layout) aligns int32's on 32-bit boundaries and 32-bit pointers
on 64-bit boundaries.



More information about the llvm-dev mailing list