Re: [Jack-Devel] JACK 1.9.10 to test (for 64/32 bits compatibility)

PrevNext  Index
DateMon, 07 Jan 2013 09:17:27 +0000
From John Emmas <[hidden] at tiscali dot co dot uk>
To[hidden] at lists dot jackaudio dot org
Follow-UpRobin Gareus Re: [Jack-Devel] JACK 1.9.10 to test (for 64/32 bits compatibility)
.On 7 Jan 2013, at 07:00, Stéphane Letz wrote:

> 
> Thanks for recalling this John. But the point is : how are we going to make jack2 work on ARM (where the PRE_PACKED_STRUCT and POST_PACKED_STRUCT based structs are not working because of alignment issues....) *and* continue to make it work on WIndows, possibly with different compilers?
> 
Hi Stephane.  Which compiler(s) are we talking about on ARM?  Currently, PRE_PACKED_STRUCTURE and POST_PACKED_STRUCTURE are only implemented if either __GNUC__ is defined or _MSC_VER.  However, they can be expanded to accommodate future requirements (other compilers).  So if the ARM compiler was gcc it should have worked.  Or if it wasn't gcc or MSVC it could have been added to the list.


> Have you had a look at the new approach (defining JACK_ALIGN macros then "aligned types" like typedef JACK_ALIGNED_TYPE(double)   jack_double;.....) ? What happens exactly when compiling with different compilers on WIndows. Can you possibly test?
> 
No, to be fair I haven't looked at the new approach but I'd be happy to consider it.  I just wanted to make the point that whatever you've done, for some structs the alignment HAS changed.  And if it needs to change, the most promising layout is 1-byte packing.  Whilst (in theory) compilers should be able to agree about any given packing arrangement, in practice, 1-byte packing is the only arrangement whose layout leaves no room for doubt.  Compilers are almost bound to agree about 1-byte packing.


> The problem here is to make jack2 evolved with new constraints *and* maintain the existing. We have to find a reasonable solution.
> 
Yes, I agree Stephane.  I just wanted to point out that this is the right time to be having this discussion and that whatever we agree upon, it needs to be supported by most compilers (which 1-byte packing is).  However, if you're confident that JACK_ALIGN is also supported by most compilers, I don't have a problem with it.  I just don't want us to find out the hard way that JACK_ALIGN is another arbitrary alignment scheme when a (theoretically good) scheme already exists...  :-)

John
PrevNext  Index

1357550256.27924_0.ltw:2,a <20BF47E2-D171-4A4D-B42A-0470C002FEDE at tiscali dot co dot uk>