Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-29 Thread Bo Berglund via fpc-pascal
On Wed, 29 Mar 2023 19:27:12 -0400, Dennis Lee Bieber via fpc-pascal wrote: > I'd expect trying to link a 32-bit object file into a 64-bit >application to result in all sorts of possible errors. That is not the case here, they have supplied two obj files, one is 32 and the other 64 bit. Th

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Ralf Quint via fpc-pascal
On 3/29/2023 2:38 PM, Ched via fpc-pascal wrote: Hello, Ok for the records for internal calculations. But sometimes, records are used for reading/writing structured files. Does "packed" in "packed array" and "packed record" always forbid the compiler to play with alignments ? If that recor

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Ched via fpc-pascal
Hello, Ok for the records for internal calculations. But sometimes, records are used for reading/writing structured files. Does "packed" in "packed array" and "packed record" always forbid the compiler to play with alignments ? Kindest regards, Ched' Le 29.03.23 à 21:07, Jonas Maebe via f

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Jonas Maebe via fpc-pascal
On 29/03/2023 16:00, Matias Ezequiel Vara Larsen via fpc-pascal wrote: So if I have a type like: test = record r: DWord; s: Word; end; Then, I define the variable `nada` as an array of `test` type: var nada: array[0..2] of test; Is the `@nada[1].r` element aligned to 4-bytes? Recor

Re: [fpc-pascal] Converting Delphi7 code to FreePascal with interfacing to protection key?

2023-03-29 Thread Bo Berglund via fpc-pascal
On Wed, 22 Mar 2023 14:17:23 +0100, Sven Barth via fpc-pascal wrote: >Then you should ask them for a suitable 64-bit object file (I assume that >they'll provide the one for C which they probably also did for you back >then and then you might need to adjust the import unit a bit to be usable >with

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Matias Ezequiel Vara Larsen via fpc-pascal
On Wed, Mar 29, 2023 at 08:11:40PM +0700, Hairy Pixels via fpc-pascal wrote: > > > > On Mar 29, 2023, at 1:33 PM, Sven Barth via fpc-pascal > > wrote: > > > > No, array types are defined as never having padding between the elements. > > You need to make sure that the element is appropriately

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Matias Ezequiel Vara Larsen via fpc-pascal
On Wed, Mar 29, 2023 at 08:33:58AM +0200, Sven Barth via fpc-pascal wrote: > Matias Ezequiel Vara Larsen via fpc-pascal > schrieb am Mi., 29. März 2023, 00:27: > > > Hello, > > > > On Mon, Mar 27, 2023 at 09:35:38PM +0200, Jonas Maebe via fpc-pascal wrote: > > > On 27/03/2023 21:25, denisgolovan

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Hairy Pixels via fpc-pascal
> On Mar 29, 2023, at 1:33 PM, Sven Barth via fpc-pascal > wrote: > > No, array types are defined as never having padding between the elements. You > need to make sure that the element is appropriately sized then. > Wouldn’t that be better for performance if each element was padded to alig

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Matias Ezequiel Vara Larsen via fpc-pascal
On Mon, Mar 27, 2023 at 08:52:40PM +0200, Jonas Maebe via fpc-pascal wrote: > On 27/03/2023 09:28, Matias Ezequiel Vara Larsen via fpc-pascal wrote: > > Apologies in the case this subject has been already discussed. I require > > that some global variables be cache-line aligned. This is a requireme

Re: [fpc-pascal] Cache-line alignment for records

2023-03-29 Thread Matias Ezequiel Vara Larsen via fpc-pascal
On Wed, Mar 29, 2023 at 08:33:58AM +0200, Sven Barth via fpc-pascal wrote: > Matias Ezequiel Vara Larsen via fpc-pascal > schrieb am Mi., 29. März 2023, 00:27: > > > Hello, > > > > On Mon, Mar 27, 2023 at 09:35:38PM +0200, Jonas Maebe via fpc-pascal wrote: > > > On 27/03/2023 21:25, denisgolovan