[llvm-dev] Aligning Long Long Vairables
Kumail Ahmed via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 14 12:05:39 PST 2016
Hi Tim,
Thanks for your quick reply.
My backend doesn't have a true i64 type. I combine two i32 registers to
create an extended register, that's supported by my architecture.
My datalayout is: ....i64:32:32....
--
Best Regards,
Kumail Ahmed
M.Sc. Student
TU Kaiserslautern
On 14 Jan 2016 8:58 p.m., "Tim Northover" <t.p.northover at gmail.com> wrote:
> On 14 January 2016 at 11:01, Kumail Ahmed via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > I'm trying to align long long variable on a 4 byte boundary. I tried
> > to change to clang frontend as follow:
> >
> > LongLongAlign = 32 ; LongLongWidth = 64;
>
> These mostly affect things like the preprocessor defines and
> (possibly) applications of _Alignof.
>
> > The asm output is still 8 bytes, when I declare a long long global array:
>
> What's your target's DataLayout? You should be able to see it at the
> top of any module you dump.
>
> This is what I'd expect to affect how the backend deals with alignment
> (including struct/array layout and variable definitions). There should
> be an "-i64:N-" bit for your 64-bit type, and it sounds you want that
> to read "-i64:32-". If there's no i64 entry, then the default is
> (oddly) 32, so this isn't the issue.
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160114/43820552/attachment.html>
More information about the llvm-dev
mailing list