Re: [fpc-devel] Generics - a general question

2011-11-19 Thread AvP
First, thanks for the detailed answer! This information may be useful for others, so I put it into the wiki: http://wiki.freepascal.org/Generics#Technical_details. Maybe there is a better place for that... A.v.P. ___ fpc-devel maillist - fpc-devel@li

Re: [fpc-devel] Generics - a general question

2011-11-19 Thread Sven Barth
On 19.11.2011 09:33, AvP wrote: Simply replacing "object" by "class" is not sufficient, because classes need to be used differently than objects. Right, it actually needs a bit of modification in the destructor. ;-) I haven't yet tried to replicate your example with classes, so I can't say wh

Re: [fpc-devel] Alignment question

2011-11-19 Thread Jonas Maebe
On 19 Nov 2011, at 14:04, Sergei Gorelkin wrote: > Hm, that looks like two separate tasks: one is distinct vector type for ABIs, > another one is alignment of arbitrary types. The issue I've stumbled into is > the TContext record (CPU context), which contains only word and qword > members, but

Re: [fpc-devel] Alignment question

2011-11-19 Thread Sergei Gorelkin
19.11.2011 14:14, Jonas Maebe пишет: On 19 Nov 2011, at 11:31, Sergei Gorelkin wrote: Is it possible to declare a (SSE friendly) record or array type, so that local variables of this type get aligned to e.g. 16 bytes? I don't think so. For this, we'd probably need a separate vector type (po

Re: [fpc-devel] Alignment question

2011-11-19 Thread Jonas Maebe
On 19 Nov 2011, at 11:31, Sergei Gorelkin wrote: > Is it possible to declare a (SSE friendly) record or array type, so that > local variables of this type get aligned to e.g. 16 bytes? I don't think so. For this, we'd probably need a separate vector type (possibly using a modifier for array ty

[fpc-devel] Alignment question

2011-11-19 Thread Sergei Gorelkin
Hello, Is it possible to declare a (SSE friendly) record or array type, so that local variables of this type get aligned to e.g. 16 bytes? Target is x86_64 with aligned stack. The {$codealign localmin=16} directive seems to work, but it is an ugly solution because: - it must be effective at a

Re: [fpc-devel] Generics - a general question

2011-11-19 Thread AvP
First of all, thanks for your answer. I tried to make the example as simple as possible - and simply forgot to allocate the memory :$ > Simply replacing "object" by "class" is not sufficient, because classes > need to be used differently than objects. Right, it actually needs a bit of modificatio