From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Jun Koi <junkoi2004@gmail.com>
Subject: Re: [Qemu-devel] dummy field in CPUTLBEntry?
Date: Mon, 19 Apr 2010 23:43:26 +0100 [thread overview]
Message-ID: <201004192343.26621.paul@codesourcery.com> (raw)
In-Reply-To: <s2sfdaac4d51004160200ybd50cef7u949ab1625f889ac8@mail.gmail.com>
> I find the way we calculate the dummy field in CPUTLBEntry funny. What
> is the point of having:
>
> ((-sizeof(target_ulong) * 3) & (sizeof(unsigned long) -
> 1))
>
> in its size? Why shouldnt it be more simple, like below?
>
> uint8_t dummy[(1 << CPU_TLB_ENTRY_BITS) - (sizeof(target_ulong) *
> 3 + sizeof(unsigned long))];
>
No, because of alignment.
Consider the case of 32-bit target_ulong and 64-bit unsigned long).
Paul
prev parent reply other threads:[~2010-04-19 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 9:00 [Qemu-devel] dummy field in CPUTLBEntry? Jun Koi
2010-04-19 22:43 ` Paul Brook [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201004192343.26621.paul@codesourcery.com \
--to=paul@codesourcery.com \
--cc=junkoi2004@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).