Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-12 Thread Graeme Geldenhuys
On 11 March 2012 16:17, Florian Klaempfl wrote: Making the helpers inline functions is probably a good idea. True, that could be an intermediate step, until all the shr_xxx() calls [there aren't that many] are replaced with SarXXX() calls, and the shr_xx() can be deleted completely. --

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-11 Thread Florian Klaempfl
Am 09.03.2012 15:33, schrieb Graeme Geldenhuys: On 9 March 2012 16:12, Mattias Gaertner wrote: Should these changes be applied to the lazarus aggpas? Yes. Attached is the patch for this thread's mentioned problem - no x86_64 bit shifting implementation. Making the helpers inline

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Graeme Geldenhuys
On 9 March 2012 10:03, Florian Klaempfl wrote: FPC has also arithmetic right shifting intrinsics for a couple of versions: Sar* (*=ShortInt,SmallInt,Longint,Int64), use those. Awesome, now it works! Thanks Florian. -- Regards,   - Graeme - ___

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: For example, here is a one method that is often called, but because there is no 64-bit x86_64 implementation, the agg output is not correct (compared to the 32-bit version of my program). IMO the Delphi implementation is already broken, because it doesn't respect

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Graeme Geldenhuys
On 9 March 2012 12:51, Hans-Peter Diettrich wrote: IMO this should read SHR is broken for signed integers in *Delphi*, so we need a correct additional implementation... In my copy of AggPas, I completely removed that comment and replaced all three shr_xxx implementations with FPC's Sar*()

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Adrian Veith
I use this for cross plattform: function shr_int32(i ,shift : longint ) : longint; inline; begin Result:= i div (1 shl shift); end; Am 09.03.2012 08:46, schrieb Graeme Geldenhuys: Hi, Can anybody with Assembly knowledge help convert 3 methods in AggPas (lcl/components/aggpas/src) so that

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Mattias Gaertner
On Fri, 9 Mar 2012 14:17:47 +0200 Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 9 March 2012 12:51, Hans-Peter Diettrich wrote: IMO this should read SHR is broken for signed integers in *Delphi*, so we need a correct additional implementation... In my copy of AggPas, I

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Graeme Geldenhuys
On 9 March 2012 16:12, Mattias Gaertner wrote: Should these changes be applied to the lazarus aggpas? Yes. Attached is the patch for this thread's mentioned problem - no x86_64 bit shifting implementation. I'm working further on AggPas and fixed some other things too. I'll supply a few

Re: [Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-09 Thread Mattias Gaertner
On Fri, 9 Mar 2012 16:33:39 +0200 Graeme Geldenhuys graemeg.li...@gmail.com wrote: On 9 March 2012 16:12, Mattias Gaertner wrote: Should these changes be applied to the lazarus aggpas? Yes. Attached is the patch for this thread's mentioned problem - no x86_64 bit shifting

[Lazarus] AGG missing 3 asm conversions to work on 64-bit CPU's

2012-03-08 Thread Graeme Geldenhuys
Hi, Can anybody with Assembly knowledge help convert 3 methods in AggPas (lcl/components/aggpas/src) so that it could work under x86_64 systems? The three methods are shr_int6(), shr_int16() and shr_int32() defined inside the agg_basics.pas unit. For example, here is a one method that is often