|
From: Florian K. <fl...@ei...> - 2014-02-10 15:28:07
|
Hi. What is the requirement for the size of the guest state? libvex.h:523 says it ought to be 8-byte aligned libvex.h:548 says if ought to be a multiple of 16 svn log -r2333 says: r2333 | sewardj | 2012-05-21 17:45:34 +0200 (Mon, 21 May 2012) | 5 lines Ensure s390x guest state size is 32-byte aligned, as per increase in alignment requirements resulting from r12569/r2330. grep '% 16' priv/*.c provides more evidence for a multiple of 16... priv/main_main.c: vassert(0 == sizeof(VexGuestX86State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestAMD64State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestPPC32State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestPPC64State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestS390XState) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestARMState) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestARM64State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestMIPS32State) % 16); priv/main_main.c: vassert(0 == sizeof(VexGuestMIPS64State) % 16); Was the increase to multiple-of-32 reverted at some point ? Florian |
|
From: Julian S. <js...@ac...> - 2014-02-11 13:33:19
|
> Was the increase to multiple-of-32 reverted at some point ? I think so, yes. It was at 16 for a long time. Then it got increased to 32 when I was first adding AVX (256-bit-vector) support. But part way through that process I realised it wasn't feasible to generate 256-bit loads/stores to access the guest state, so the 32-byte alignment requirement was backed off to 16. You should also look at do_pre_run_checks(), which checks the alignment all over again each time we go to run JITted code :-/ J |
|
From: Florian K. <fl...@ei...> - 2014-02-11 22:14:14
Attachments:
alignment-patch
|
On 02/11/2014 02:16 PM, Julian Seward wrote:
>
>> Was the increase to multiple-of-32 reverted at some point ?
>
> I think so, yes. It was at 16 for a long time. Then it got increased
> to 32 when I was first adding AVX (256-bit-vector) support. But part way
> through that process I realised it wasn't feasible to generate 256-bit
> loads/stores to access the guest state, so the 32-byte alignment requirement
> was backed off to 16.
Attached is a patch that reverts the alignment changes from VEX r2330
and fixes some conflicting comments that were referring to an incorrect
alignment requirement.
I'll wait a while before I check it in to allow folks to test it on MIPS
/ ARM to which I do not have access.
Florian
|
|
From: Petar J. <mip...@gm...> - 2014-02-13 17:54:03
|
On Tue, Feb 11, 2014 at 11:01 PM, Florian Krohm <fl...@ei...>wrote: > On 02/11/2014 02:16 PM, Julian Seward wrote: > > > >> Was the increase to multiple-of-32 reverted at some point ? > > > > I think so, yes. It was at 16 for a long time. Then it got increased > > to 32 when I was first adding AVX (256-bit-vector) support. But part way > > through that process I realised it wasn't feasible to generate 256-bit > > loads/stores to access the guest state, so the 32-byte alignment > requirement > > was backed off to 16. > > Attached is a patch that reverts the alignment changes from VEX r2330 > and fixes some conflicting comments that were referring to an incorrect > alignment requirement. > I'll wait a while before I check it in to allow folks to test it on MIPS > / ARM to which I do not have access. Thanks for the heads up. I ran make check with and without the patch on one MIPS64 board, no regressions. Regards, Petar |
|
From: Florian K. <fl...@ei...> - 2014-02-14 08:57:21
|
>> Attached is a patch that reverts the alignment changes from VEX r2330 >> and fixes some conflicting comments that were referring to an incorrect >> alignment requirement. >> I'll wait a while before I check it in to allow folks to test it on MIPS >> / ARM to which I do not have access. > > > Thanks for the heads up. > I ran make check with and without the patch on one MIPS64 board, no > regressions. Thanks for testing. I've checked this in as VEX r2818. Florian |