Re: [fpc-devel] Current work

2024-08-23 Thread denisgolovan via fpc-devel
Nice work, Gareth. Vectorization is definitely a nice improvement for the compiler. -- Regards, Denis Golovan ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Additional generic type constraints

2023-02-22 Thread denisgolovan via fpc-devel
> It does seem incomplete that you can’t make a generic constrained for string > types for example. Why don’t more languages have that? It seems like an > obvious feature which should be supported. Rust & Haskell do that. But that's another story :) -- Regards, Denis Golovan

Re: [fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-08 Thread denisgolovan via fpc-devel
> On 9/8/2021 2:25 PM, denisgolovan via > fpc-devel wrote: > >>>> Compiler builds release > binaries fine. > > What do you mean - it should work on > "trunk"? No. I mean it should work when -g and stuff like that is _omitted_. Thus compiler does

Re: [fpc-devel] Undefined symbol during linking - any suggestions?

2021-09-08 Thread denisgolovan via fpc-devel
I believe it's the same issue I have in https://gitlab.com/freepascal.org/fpc/source/-/issues/39140 Compiler builds release binaries fine. -- Regards, Denis Golovan ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/

Re: [fpc-devel] TDef flags

2021-07-04 Thread denisgolovan via fpc-devel
Well. Maybe it's not that complex after all? I mean, Linux target (not cross-compiling) builds fine. It's Linux->Win64 build fails with those errors. That regards https://bugs.freepascal.org/view.php?id=39140 , of course. -- Regards, Denis Golovan ___

Re: [fpc-devel] TDef flags

2021-07-04 Thread denisgolovan via fpc-devel
https://bugs.freepascal.org/view.php?id=39140Sorry, I forgot to send my bug13:33, 4 июля 2021 г., "denisgolovan via fpc-devel" :Sure. See attachment the bug I've created12:55, 4 июля 2021 г., "J. Gareth Moreton" <gar...@moreton-family.com>:I just double-checked

Re: [fpc-devel] TDef flags

2021-07-04 Thread denisgolovan via fpc-devel
st?Gareth aka. KitOn 04/07/2021 10:19, denisgolovan wrote: I've posted a patch in the previous bug report, but I'll be the first to admit that it's a little hacky. Given the linker errors in #39140 are similar to those in #38827, does it fix those too? Nope, unfortunately it does no

Re: [fpc-devel] TDef flags

2021-07-04 Thread denisgolovan via fpc-devel
> I've posted a patch in the previous bug report, but I'll be the first to > admit that it's a little hacky. Given the linker errors in #39140 are > similar to those in #38827, does it fix those too? Nope, unfortunately it does not. -- Regards, Denis Golovan __

Re: [fpc-devel] TDef flags

2021-07-04 Thread denisgolovan via fpc-devel
Thanks, Gareth. I've created another issue, possibly related - https://bugs.freepascal.org/view.php?id=39140 Sven, could you take a look? -- Regards, Denis Golovan ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread denisgolovan via fpc-devel
> Am 27.09.20 um 21:50 schrieb Florian Klämpfl via fpc-devel: >> Not for 80 bit extended, but it would be the clean solution with >> float128 support being optional in some architectures (RiscV, Sparc64, >> PPC64). So if we change it, we should do it right as 80 Bit has the same >> problem: missing

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread denisgolovan via fpc-devel
> See above. It perfectly shows why it is frightening (not the basic > stuff, but the transcendent functions): > - there are little libraries being really IEEE compliant for float128 > - if they are IEEE compliant, their license does not allow to use the > code in the FPC rtl. Ok, the license is t

Re: [fpc-devel] Another thread about the fact that official FPC releases are *unnecessarily* non-representative of the platforms it actually runs on

2020-09-27 Thread denisgolovan via fpc-devel
> Am 27.09.20 um 18:21 schrieb Florian Klämpfl via fpc-devel: > So we would need softfloat extended support. This is doable with one > major obstacle: the "irrational" functions like ld, sin etc.: they need > precise enough implementations for 80 bit (actually, just adding and > using in the compil

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-21 Thread denisgolovan via fpc-devel
> I think Gareth meant the address of V instead (Pointer(@V)). > > Regards, > Sven Hm. I have no idea why anyone would take pointer to pointer :) BTW, Sven, what's your opinion on dynamic arrays alignment problem? I don't have any viable solution besides maintaining my own compiler fork so far

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-21 Thread denisgolovan via fpc-devel
> 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 p

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-21 Thread denisgolovan via fpc-devel
> In that instance, I think it's because TIntArray is not a record type > (it's essentially a smart pointer) and so RECORDMIN doesn't apply to > it. I do agree though that having an 'align' attribute of some kind > will make life a lot easier since you don't have to play around with > multiple pr

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-21 Thread denisgolovan via fpc-devel
> From tests/test/cg/tvectorcall1.pp > > {$PUSH} > {$CODEALIGN RECORDMIN=16} > {$PACKRECORDS C} > type > TM128 = record > case Byte of > 0: (M128_F32: array[0..3] of Single); > 1: (M128_F64: array[0..1] of Double); > end; > {$POP} > > (This declaration mimics how __m128 is defined in Microsoft Vi

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-21 Thread denisgolovan via fpc-devel
> I did suggest it once - https://bugs.freepascal.org/view.php?id=32780 - > it would make things useful and allow for cleaner typecasting with the > internal __m128 type etc. It was assigned, but appears to have stalled. Yeap. That's right it's a long awaited feature. > There might be some portab

Re: [fpc-devel] State of SSE/AVX intrinsics

2020-04-20 Thread denisgolovan via fpc-devel
Hi I think another related idea is adding some "attribute" to dynamic arrays types to force them to be aligned to 32/64 bytes. Precisely for this purpose, I am forced to maintain my own FPC fork. -- Regards, Denis Golovan ___ fpc-devel maillist - fpc

Re: [fpc-devel] Partial compile issues

2020-03-31 Thread denisgolovan via fpc-devel
> Simply clearing all the compiled files results in correct > compilation. Any thoughts on how to proceed with this? Am I the only one > to see this? > > Colin It happens sometimes. Although it happens much less frequent in current trunk. Please report in bugtracker if you have reproducible case.

Re: [fpc-devel] Internal error 200510032 on SynEdit package

2019-07-23 Thread denisgolovan
> Anybody knows whats going on and why it stopped working? (I am on > Windows and use the 32bit compiler. Today's FPC trunk, today's Lazarus > trunk.) Same story. See https://bugs.freepascal.org/view.php?id=35877 -- Regards, Denis Golovan ___ fpc-devel

Re: [fpc-devel] Submitting patches using git

2019-07-20 Thread denisgolovan
> Here’s the results of "git log —graph” on the feature branch. Does that first > part look right? I feel like I messed up something from the very start but > I’m not sure what. > > Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ git log --graph > * commit c5a6c2c0822d6c869a788a98a144e739a97d517a (HE

Re: [fpc-devel] Submitting patches using git

2019-07-20 Thread denisgolovan
> I tried doing "git rebase origin/master” on the feature branch BEFORE I > merged the master but it says "Current branch gen-const-new is up to date.”. > What is rebase doing that it thinks the feature branch is up to date? Generally it means all your feature branch commits are on top of origin

Re: [fpc-devel] XML node dump feature

2019-06-25 Thread denisgolovan
> Complex types are built from primitive types. And if FPC can verify the > "pure" attribute is valid, then LLVM can probably also come up with it. > In fact, if FPC can verify it is valid, it can also come up with it > itself and add it as an annotation in the LLVM bitcode. AFAIU, "pure" attribut

Re: [fpc-devel] XML node dump feature

2019-06-25 Thread denisgolovan
> You don't need any kind of new source code constructs for optimizing > that. The LLVM backend can already do that; in the worst case, only when > LTO is enabled (in case the function is declared in another unit) > > Jonas I am pretty sure LLVM is advanced enough to make that analysis itself for

Re: [fpc-devel] XML node dump feature

2019-06-25 Thread denisgolovan
> Long story short, it took me a brief moment to see how the optimisation > would work until I thought about it a bit more, but if PureFunc is > indeed pure, then that could certainly be a development goal. Yes, you've got the idea. The complete system has a lot of issues and edge cases. However

Re: [fpc-devel] XML node dump feature

2019-06-25 Thread denisgolovan
> Can I have an example of "hoisting pure functions out of loops" that you > speak of? Sure. I mean something like following (completely artificial example): function PureFunc1: ... function F(arg: Integer): Integer; var s:Integer; begin s:=0; for i:=0 to 100 do s:=s+PureFunc(arg); Res

Re: [fpc-devel] XML node dump feature

2019-06-25 Thread denisgolovan
Hi Gareth I'd like to know if the scope of your interest in "pure" is just initialization of constants or you plan to implement some optimizations as well? I mean something like hoisting pure functions out loops. -- Regards, Denis Golovan ___ fpc-deve

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread denisgolovan
> You can do it like this (yes, works in mode Delphi as well): > > === code begin === > > {$mode objfpc} > {$modeswitch advancedrecords} > > type > generic TPointerType = record > public type > PT = ^T; > end; > > generic procedure MemCopy(Dest, Src: specialize > TPointerType.PT; Len: PtrUInt)

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread denisgolovan
Hi Sven Just my 50 cents. Just stumbled upon the same problem today. I mean typed pointer in generic function. But "specialize TPointerType.PT" is just too much noise. Personally, I consider this issue really annoying as for generics. -- Regards, Denis Golovan _

Re: [fpc-devel] When will the next version of FPC be released?

2019-06-01 Thread denisgolovan
> Really ? > I wonder what kind of code you write to make this 'super buggy' statement. > > I myself write lots of code, and never encountered an issue. > But then, I normally don't use dubious constructs to begin with. > > In general of course I agree 100% with your statement that we need a cl

Re: [fpc-devel] Aligned dynamic arrays

2019-03-30 Thread denisgolovan
> 1) In you example you are writing this with normal arrays: > > A[0].X := 0; > > And in my implementation it's exactly the same. Regarding writing the entire > type directly > > A[0]^ := V; > > If using the caret symbol ^ or an Item property is a deal breaker, then this > can be simplified

Re: [fpc-devel] Aligned dynamic arrays

2019-03-30 Thread denisgolovan
Exactly, alignment might be well attached to array or array element type. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Aligned dynamic arrays

2019-03-30 Thread denisgolovan
Hi Jonas Vector type in FPC is too good to be true. I didn't dare to dream about it so far :) BR, Denis ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Aligned dynamic arrays

2019-03-30 Thread denisgolovan
Hi Anthony > The more that I think about it, the more I am believe that using my approach > is probably the best solution. Hear me out please. > > First, it would be fairly easy to implement copy on write logic with a custom > record class. > > Second, because it's Pascal code, it's entirely

[fpc-devel] Aligned dynamic arrays

2019-03-30 Thread denisgolovan
Hi all Sorry for possible starting a new thread as I've just managed to subscribe to the list. Could we discuss more options here? Maybe separate aligned array is a better alternative? I mean a new type fully backward compatible with dynamic arrays, but with additional requirements (more spe