[fpc-devel] State of SSE/AVX intrinsics
Sven Barth
pascaldragon at googlemail.com
Tue Apr 21 14:24:00 CEST 2020
denisgolovan via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Di.,
21. Apr. 2020, 13:32:
>
>
> > One thing to be slightly aware of with
> > dynamic pointers and alignment. For V: atray
> > of Integer etc, make sure you check the
> > alignment of V[0], not V. V points to an
> > internal structure that is largely opaque,
> > while V[0] points to the actual data, which I
> > imagine is what you want to pass into VMOVAPS
> > etc.
> >
> > Gareth aka. Kit
>
> I believe your are wrong here.
> For dynamic arrays, service data is located at negative offset and pointer
> itself _is_ zero element address.
>
> type
> TIntArray = array of Integer;
>
> var v:TIntArray;
> begin
> SetLength(v,100);
> Writeln(NativeInt(Pointer(v)) = NativeInt(Pointer(@v[0]))); // always
> gives true
> end.
>
I think Gareth meant the address of V instead (Pointer(@V)).
Regards,
Sven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200421/daa257ad/attachment.html>
More information about the fpc-devel
mailing list