Re: [fpc-devel] Smart-linking on linux/x86-64

2022-07-06 Thread Sergei Gorelkin via fpc-devel
05/07/2022 09:39, Sven Barth via fpc-devel wrote: Joost van der Sluis via fpc-devel > schrieb am Di., 5. Juli 2022, 00:17: But my real issue is this: on Windows, using the internal linker, this procedure is also omitted *with* Dwarf debug-data. As

Re: [fpc-devel] Exceptions on wiki

2018-08-02 Thread Sergei Gorelkin via fpc-devel
02.08.2018 20:13, J. Gareth Moreton wrote: The information in the Wiki about how exception frames are set up is pretty nice. I didn't know that 'raise' creates an exception frame for the procedure it appears in, but explains why it's often shipped off to another local procedure. Very useful

Re: [fpc-devel] *** GMX Spamverdacht *** Re: Broken frac function in FPC3.1.1 / Windows x86_64

2018-04-27 Thread Sergei Gorelkin via fpc-devel
27.04.2018 17:14, Sven Barth via fpc-devel wrote: Thorsten Engler > schrieb am Fr., 27. Apr. 2018, 16:09: Highest integer that fits in a Int64: 9223372036854775808 1e20: 1 __ __

Re: [fpc-devel] Regarding issue/patch 0032637

2017-11-29 Thread Sergei Gorelkin via fpc-devel
29.11.2017 15:12, J. Gareth Moreton wrote: Thanks Christo. Apologies for 4 messages coming in at once. I think there were a few technical glitches with the mailing list. Either way, I have submitted an updated patch to the bug report in question that corrects the stack unwinding for

Re: [fpc-devel] FillWord, FillDWord and FillQWord are very poorly optimised on Win64 (not sure about x86-64 on Linux)

2017-11-01 Thread Sergei Gorelkin via fpc-devel
01.11.2017 10:46, Sven Barth via fpc-devel wrote: Am 01.11.2017 05:58 schrieb "J. Gareth Moreton" >: Would it be worth opening up a bug report for this, with the attached assembler routines as suggestions? I haven't

Re: [fpc-devel] Is there a way to make Register Allocation inside of Interrupt Service Routines more efficient when using inline-assembler?

2016-08-21 Thread Sergei Gorelkin
21.08.2016 14:32, Michael Ring пишет: Was getting high hopes for a moment... @Sergej: I just started wondering on usage of fp registers, when I call a routine that uses floating point I see that the fp registers are not marked as reserved by the compiler, what do you think? The procedure

Re: [fpc-devel] Is there a way to make Register Allocation inside of Interrupt Service Routines more efficient when using inline-assembler?

2016-08-21 Thread Sergei Gorelkin
21.08.2016 13:25, Karoly Balogh (Charlie/SGR) пишет: Well, one possible optimization would be to only save all volatiles if the interrupt routine actually calls another function. Otherwise only save the ones used by the current proc. This would allow some very small and very fast interrupt

Re: [fpc-devel] Is there a way to make Register Allocation inside of Interrupt Service Routines more efficient when using inline-assembler?

2016-08-21 Thread Sergei Gorelkin
21.08.2016 12:06, Karoly Balogh (Charlie/SGR) пишет: Hi, On Sun, 21 Aug 2016, Michael Ring wrote: So unless there is a way to find out which registers get used by a procedure the only thing I can do to make interrupt routines as lean as possible is to not use procedures in them if possible.

Re: [fpc-devel] patch for rtl/linux/aarch64/cprt0.as

2015-10-05 Thread Sergei Gorelkin
06.10.2015 1:08, Edmund Grimley Evans пишет: Clearly I don't really know what I'm doing with these start-up files... but I found I needed this patch to build the Debian package on arm64, so it's probably something for the AArch64 fixes branch. I tried running the test suite with and without

Re: [fpc-devel] Linux assembler start-up: rtl/linux/*/*.as

2015-05-28 Thread Sergei Gorelkin
28.05.2015 10:49, Marco van de Voort пишет: In our previous episode, Edmund Grimley Evans said: - How to do the equivalent of C longjmp in Pascal, used in x86_64/gprt0.as, for example? There are fpc_longjmp and fpc_setjmp symbols but they are related to exception handling. In an

Re: [fpc-devel] about commit r29324

2014-12-28 Thread Sergei Gorelkin
28.12.2014 17:36, Michael Van Canneyt пишет: On Sun, 28 Dec 2014, Mattias Gaertner wrote: Hi, forwarded from Zeljko: It's about fpc issue http://bugs.freepascal.org/view.php?id=26370 It seems that TVariantArrayIterator.AtEnd loops for all Dims for no reason, so have impact on

Re: [fpc-devel] CMem allocator memory alignment experiment

2014-11-19 Thread Sergei Gorelkin
19.11.2014 15:16, Marco van de Voort пишет: In our previous episode, Mark Morgan Lloyd said: introduces a very significant performance overhead; Linux also does this. On some but by no means all platforms. I'm specifically trying to highlight the fact that on SPARC, Solaris can fix

Re: [fpc-devel] RTL: high CPU load in heap manager

2014-11-11 Thread Sergei Gorelkin
11.11.2014 12:35, Jonas Maebe пишет: On 11/11/14 10:28, Adriaan van Os wrote: Jonas Maebe wrote: On 10/11/14 18:47, Karoly Balogh (Charlie/SGR) wrote: It's remove_freed_fixed_chunks(). Can someone explain to me under what condition this code is triggered very often and/or could take long to

Re: [fpc-devel] Masm

2014-11-07 Thread Sergei Gorelkin
07.11.2014 17:01, Pierre Free Pascal пишет: The is no COFF magic. the first 2 bytes indicate normally a MACHINE type. The files I produced start etiher by: 0x8664 indicating a x86 coff header or 0x014c indicating a i386 coff header. Nevertheless, 0x is also listed as

Re: [fpc-devel] Registers allocation technique

2014-10-01 Thread Sergei Gorelkin
30.09.2014 23:34, Sven Barth пишет: On 30.09.2014 18:37, Lag Programming wrote: 1) Unless a function calls another function, the function result register will always be in rax. Calling for inlined functions doesn't change this behaviour as it's not a real function call. RAX will only then be

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do not have a floating point unit and the processor creates an illegal instruction (or something similar) exception. I solved this for me by

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 13:19, Sven Barth пишет: Am 09.09.2014 08:53 schrieb Sergei Gorelkin sergei_gorel...@mail.ru mailto:sergei_gorel...@mail.ru: 09.09.2014 9:53, Sven Barth пишет: On 08.09.2014 22:54, Michael Ring wrote: This smells like a problem I had on pic32. In my case the pic32 chips do

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-09 Thread Sergei Gorelkin
09.09.2014 14:33, Michael Ring пишет: Sergei, I have reworked the patch based on your comment: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revisionrevision=28634 Do you think this is solved better now? No, my point was that routines SysInitFPU and SysResetFPU from inc/generic.inc must

Re: [fpc-devel] Which platforms have internal linkers

2014-09-07 Thread Sergei Gorelkin
07.09.2014 20:22, Marco van de Voort пишет: In our previous episode, Sven Barth said: others? (Related: how can one find out/is there a list somewhere?) (Helps me update my ego-boosting fpcup cross compiler conversion table :) ) Linux has an internal linker, but it's AFAIK not yet the default

Re: [fpc-devel] MIPS big-endian program starts but does nothing

2014-09-06 Thread Sergei Gorelkin
06.09.2014 14:53, Reinier Olislagers пишет: On 06/09/2014 12:20, Mark Morgan Lloyd wrote: I think the previous discussion wound down with the consensus that the distro had custom libraries, possibly derived from ulibc, and that the compiler etc. would have to be specially built for those. I was

Re: [fpc-devel] fpc libraries do not work in freeBSD...

2014-08-05 Thread Sergei Gorelkin
05.08.2014 22:02, Sven Barth пишет: Am 05.08.2014 15:35 schrieb Marco van de Voort mar...@stack.nl mailto:mar...@stack.nl: But the FPC version has these symbols in the main program, maybe you must make sure that those (operatingsystem*) systems are available from the mainprogram too and

Re: [fpc-devel] errorr.msg wrong comment about the encoding (attn: Sergei)

2014-05-27 Thread Sergei Gorelkin
27.05.2014 22:07, Dmitry Boyarintsev пишет: Hello, The message file contains the comment (introduced in r13815) # Russian (utf-8) Language File for Free Pascal The file is in fact CP 866. This (non) issue is small enough to skip the bug tracker. I'm not sure that it's worth changing, the

Re: [fpc-devel] errorr.msg wrong comment about the encoding (attn: Sergei)

2014-05-27 Thread Sergei Gorelkin
27.05.2014 22:28, Dmitry Boyarintsev пишет: I thought it would be good for consistency with other translation files: errorpl.msg / errorpli.msg errorhe.msg / errorheu.msg ...and sanity. Could transcoder update the comment as well? Stock one (the iconv program) does not change contents of the

Re: [fpc-devel] Need heap manager -gv explanation

2014-04-29 Thread Sergei Gorelkin
28.04.2014 23:14, Petr Kristan пишет: On Mon, Apr 28, 2014 at 06:12:18PM +0200, Tomas Hajny wrote: On Mon, April 28, 2014 17:56, Mattias Gaertner wrote: On Mon, 28 Apr 2014 17:20:17 +0200 Petr Kristan petr.kris...@epos.cz wrote: Hi I have some application with huge usage ReAllocMem and I

Re: [fpc-devel] Need heap manager -gv explanation

2014-04-29 Thread Sergei Gorelkin
29.04.2014 13:00, Jonas Maebe пишет: On 29/04/14 08:45, Sergei Gorelkin wrote: -gv switch in command line disables the optimized i386 Move procedure (and that's basically the only thing it does), so it indeed should cause slowdown. Comments say that valgrind (some pretty old version

Re: [fpc-devel] Need heap manager -gv explanation [tests]

2014-04-29 Thread Sergei Gorelkin
On 29.04.2014 14:37, Tomas Hajny wrote: I don't know the reason of your difference, but no time necessary at all (0 ms) for the valgrind variant looks very suspicious to me. But compiling by kylix compiler, i get the same results as by fpc with -gv option in linux. This is the reason why I

Re: [fpc-devel] Need an elegant way to preset a specific memory area in elf files

2014-04-23 Thread Sergei Gorelkin
23.04.2014 12:34, Michael Ring пишет: Thanks, but does not solve the problem, it's not about reading the data, it's about defining the data so that it is included in the elf file in the correct section so that the microcontroller is programmed with the values when the elf file is uploaded to

Re: [fpc-devel] -dTEST_WIN32_SEH

2014-04-13 Thread Sergei Gorelkin
13.04.2014 18:20, Martin Frb пишет: Just been looking at this, and trying to thing of how to catch in the debugger. From a very brief look at the sources (please correct me, if I got it wrong, or missed anything) An error handler is installed to the OS, the handler is function

Re: [fpc-devel] -dTEST_WIN32_SEH

2014-04-13 Thread Sergei Gorelkin
13.04.2014 19:06, Martin Frb пишет: On 13/04/2014 16:02, Martin Frb wrote: Sorry. But the below on hold. I just found the log at the issue. And it seems fpc_raise was called. My fault OK, I excuse it by being Sunday afternoon. reread. Definitely not called. Since the new exception

Re: [fpc-devel] Changed Math functions in FPC development trunk 2.7

2014-04-10 Thread Sergei Gorelkin
10.04.2014 20:24, Jonas Maebe пишет: On 09/04/14 14:10, i...@wolfgang-ehrhardt.de wrote: A year ago there was a post from Jonas Maebe on this list (http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg28483.html) asking about the possibility to reuse parts of AMath/DAMath in FPC.

Re: [fpc-devel] Fwd: overload question (variant vs enum subrange)

2014-03-31 Thread Sergei Gorelkin
31.03.2014 17:32, Martin Frb пишет: Just asking this again, as I did not get any answer yet? Is that the indented behaviour, and if so what is the reasoning for it? This behavior is hardly intended. To get clues about what's going on, you can compile the compiler with OPT=-dEXTDEBUG, then

Re: [fpc-devel] Fwd: overload question (variant vs enum subrange)

2014-03-31 Thread Sergei Gorelkin
31.03.2014 23:46, Martin Frb пишет: On 31/03/2014 20:29, Sergei Gorelkin wrote: 31.03.2014 17:32, Martin Frb пишет: Just asking this again, as I did not get any answer yet? Is that the indented behaviour, and if so what is the reasoning for it? This behavior is hardly intended. To get

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 1:32, Daniel Gaspary пишет: I have uploaded a patch[1] to remove the TSaxInputSource, it is redundant with TXmlInputSource from XmlReader unit. I believe the TSAXXMLReader.Parse method have almost the same functionality of xmltextreader.TXMLTextReader. I would like to know if and

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 18:10, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 11:04 AM, Daniel Gaspary dgasp...@gmail.com wrote: On other topic, a new StaX[1] class, using TXMLTextReader, I mean, *classes*. Creating the writer part too. Why would you want to use S[t]AX approach in the first place? The

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 18:58, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 11:42 AM, Sergei Gorelkin sergei_gorel...@mail.ru wrote: Why would you want to use S[t]AX approach in the first place? No special reason at the moment. I didn't examine TXmlTextReader so much yet. The interface of .net-based

Re: [fpc-devel] XML / SAX - Removing redundancies

2014-03-12 Thread Sergei Gorelkin
12.03.2014 21:46, Daniel Gaspary пишет: On Wed, Mar 12, 2014 at 2:36 PM, Michael Van Canneyt mich...@freepascal.org wrote: What can be achieved at the most seems to be the parsing of the expression and the resulting parse tree. Is exactly what I'm trying to say(my lack of English grammar

Re: [fpc-devel] Heaptrace + cwstring cause SIGSEGV at the end

2014-03-10 Thread Sergei Gorelkin
10.03.2014 19:40, Jonas Maebe пишет: On 10 Mar 2014, at 16:13, Petr Kristan wrote: If memoryleak occurs and program ends, then i get SIGSEGV in cwstring.pp:481 (iconv call) because cwstring unit is finalized before heaptrc. If you use -gh, then heaptrc will be the first unit of the uses

Re: [fpc-devel] extend unreachable code warning for more cases?

2014-02-26 Thread Sergei Gorelkin
26.02.2014 12:09, Sven Barth пишет: Hello together! In context of Apple's recent security bug where a goto fail; at the wrong place disabled certificate checking or something along that lines I've thought whether it would 1) be worthwhile to extend FPC with the capability to detect such cases

Re: [fpc-devel] extend unreachable code warning for more cases?

2014-02-26 Thread Sergei Gorelkin
26.02.2014 13:28, Sven Barth пишет: Am 26.02.2014 09:41, schrieb Sergei Gorelkin: 26.02.2014 12:09, Sven Barth пишет: Hello together! In context of Apple's recent security bug where a goto fail; at the wrong place disabled certificate checking or something along that lines I've thought

Re: [fpc-devel] 2.6.2 messes up stackframe pointer /// Fwd: Re: [Lazarusdev] crash in View Forms Dialog - codetools

2014-02-05 Thread Sergei Gorelkin
06.02.2014 4:32, Martin Frb пишет: Only tested with 2.6.2 yet. Will see yf/when I get to test with trunk. Also not reproduced on simple code yet, only in the IDE (on 2 different pieces of code, both involving for ...in) Maybe it is already known? Looks very much like

Re: [fpc-devel] Optimizations

2014-01-23 Thread Sergei Gorelkin
24.01.2014 3:04, Martin Frb пишет: On 23/01/2014 22:26, August Oktobar wrote: Hello, I have seen your mails about peephole optimization, so I wonder if you could look at this reports http://bugs.freepascal.org/view.php?id=23595 or perhaps optimize slow array access using operator [] (it is

Re: [fpc-devel] Inc() and Dec() on properties

2013-12-20 Thread Sergei Gorelkin
On 21.12.2013 02:11, Mark Morgan Lloyd wrote: Sven Barth wrote: On 20.12.2013 22:02, Mark Morgan Lloyd wrote: A question if I may, leading on from http://bugs.freepascal.org/view.php?id=25440 - inc(x)/dec(x) with range checking enabled are optimized with taking address of x. Is that why

Re: [fpc-devel] Problem with bitpacked records and STM32F107 Controller

2013-12-11 Thread Sergei Gorelkin
11.12.2013 12:28, Sven Barth пишет: Am 11.12.2013 08:43, schrieb Michael Ring: The strb command seems to be the problem, documentation from STM states: Each I/O port bit is freely programmable, however the I/O port registers have to be accessed as 32-bit words (half-word or byte accesses are

Re: [fpc-devel] bug or feature?

2013-11-24 Thread Sergei Gorelkin
25.11.2013 3:31, Paul Ishenin пишет: 22.11.2013 23:09, Sergei Gorelkin пишет: Hello together, The following compiles and executes correctly in objfpc mode (and rejected by Delphi and by FPC in mode Delphi). Is implicit taking address of array there by design? Yes, it is a FPC feature which

[fpc-devel] bug or feature?

2013-11-22 Thread Sergei Gorelkin
Hello together, The following compiles and executes correctly in objfpc mode (and rejected by Delphi and by FPC in mode Delphi). Is implicit taking address of array there by design? type PReal = ^Real; const xa: array[0..3] of Real = (1.0,2.0,3.0,4.0); procedure test(x: PReal); begin

Re: [fpc-devel] Performance of string handling in trunk

2013-06-21 Thread Sergei Gorelkin
On 21.06.2013 17:11, luiz americo pereira camara wrote: 2013/6/21 Michael Schnell mschn...@lumino.de: On 06/20/2013 05:31 PM, luiz americo pereira camara wrote: Maybe in that example there's going an (unneeded) conversion? If you use the same string type all over the place it would be a

Re: [fpc-devel] Performance of string handling in trunk

2013-06-20 Thread Sergei Gorelkin
20.06.2013 16:15, luiz americo pereira camara пишет: I looked at http://forum.lazarus.freepascal.org/index.php/topic,21223.0.html There's a significant performance drop in fpc trunk The difference of generated code is a call to fpc_ansistr_assign and a different implementation of

Re: [fpc-devel] Performance of string handling in trunk

2013-06-20 Thread Sergei Gorelkin
20.06.2013 19:31, luiz americo pereira camara пишет: Maybe in that example there's going an (unneeded) conversion? This is possible. One needs to profile the example to tell for sure. Regards, Sergei ___ fpc-devel maillist -

Re: [fpc-devel] how to produce object codes that do not reference symbolic registers

2013-06-18 Thread Sergei Gorelkin
17.06.2013 19:20, Dennis пишет: I am trying to create a cross compiler from x86 Debian-Linus - mips-eb (endian big) Linux (OpenWrt). The target platform is a netgear 3700 router. I downloaded the toolchain for openwrt mips-eb and try to make the cross compiler. when I run make all

Re: [fpc-devel] Some Opcodes missing in internal assembler for mips32r2

2013-06-17 Thread Sergei Gorelkin
16.06.2013 22:17, Michael Ring пишет: I have now browsed through the current mips documentation and have created a file that includes all opcodes, the version they are first in (starting with mips32) and a small comment what the mnemonic does. This file is attached to this mail. The problem

Re: [fpc-devel] How can I distribute code in two different memory areas? (.section)

2013-06-17 Thread Sergei Gorelkin
16.06.2013 23:39, Michael Ring пишет: I had some time this weekend (while beeing grilled by the sun on my balcony) to work on another thing that did not work correct and that I did not understand (Now I do, I least I hope ;-) As said before in this thread, I wanted to distribute Code in two

Re: [fpc-devel] Some Opcodes missing in internal assembler for mips32r2

2013-06-03 Thread Sergei Gorelkin
29.05.2013 21:44, Michael Ring пишет: This is looking good now on first view, all statements seem to pass through now. The only thing not working is the register error in mfc0 (and friends) command. Now I will wade through some more code to find out why my nice param -CpMIPS32R2 is ignored by

Re: [fpc-devel] Some Opcodes missing in internal assembler for mips32r2

2013-05-29 Thread Sergei Gorelkin
29.05.2013 2:08, Sergei Gorelkin пишет: 29.05.2013 1:26, Michael Ring пишет: I did the changes, parts of the opcodes now work fine, I think I have found the problem with the li + and + mfc0 op-codes, if last parameter is 0 then the asm statement is generated wrong: This works

Re: [fpc-devel] Status of SEH in FPC

2013-03-02 Thread Sergei Gorelkin
03.03.2013 2:53, Flávio Etrusco пишет: Hello, what's the current state of the SEH in FPC trunk? IIRC - and according to wikipedia ;-) - SEH, at least for Windows, was in the 2.7 roadmap, but I can't find any related brach, or commit, or post. Also AFAIU would have some gains in both executable

Re: [fpc-devel] Image size is too big for target even if external debug file is used

2013-02-05 Thread Sergei Gorelkin
05.02.2013 19:32, Sven Barth пишет: Hello together! I have a arm-wince project (using LCL) where I have a stacktrace and I'd like to resolve the symbol information. As I'm not cross debugging I'm using an offline (post mortem) process for which I compile my application with debug information,

Re: [fpc-devel] Forwarded message about FPC status

2012-12-17 Thread Sergei Gorelkin
17.12.2012 13:55, Sven Barth пишет: smart linking MSEide on 64 bit Linux is not possible with 2GB ram, Linking is a problem of ld, not of Free Pascal. ld was not designed for the workload we put on it (especially regarding smart linking). You could try however if the new internal ELF linker

Re: [fpc-devel] mips-linux and mipsel-linux snapshots available

2012-12-16 Thread Sergei Gorelkin
30.11.2012 1:46, Mark Morgan Lloyd wrote: Running the program using the modified GDB, I get the same as before: 0 1markMLl@pye-dev-07d:~$ which gdb /usr/local/bin/gdb 0 1markMLl@pye-dev-07d:~$ gdb /usr/local/bin/ppcmips GNU gdb (GDB) 7.0.1-debian .. (gdb) set arg -h (gdb) run Starting program:

Re: [fpc-devel] Revisiting MacOS for PPC (and possibly 68K)

2012-12-10 Thread Sergei Gorelkin
11.12.2012 1:27, Sven Barth пишет: It's putting a significant number of AT_NONE entries into the table, and the first one it tries to take out (which obviously isn't the first entry in the list) causes the internal error. When being put in, this entry had a call stack like #0

Re: [fpc-devel] Interface usage causes FPC to crash

2012-11-30 Thread Sergei Gorelkin
30.11.2012 17:20, David Ballesteros пишет: Hi, Im interested on known the answers to Graeme questions. Delegation to interface-type properties is fully supported. Delegation to class-type properties is supported, but it requires the delegate class to implement the interface (this

Re: [fpc-devel] fp IDE and gdbint on Debian Wheezy/testing

2012-11-06 Thread Sergei Gorelkin
On 05.11.2012 18:00, Jonas Maebe wrote: On 05 Nov 2012, at 14:40, Vincent Snijders wrote: I found out the cause of *my* problem. The ld provided by Ubuntu (version 2.22) was in /usr/bin. There was also an older version 2.21 in /usr/local/bin which was actually chosen. Fixing that solved my

Re: [fpc-devel] XML Components

2012-11-02 Thread Sergei Gorelkin
02.11.2012 17:08, Michael Van Canneyt пишет: On Fri, 2 Nov 2012, Andrew Brunner wrote: I think it would be a good solution and even prove faster in controlled environments. Plus all data is stored as widestrings in the DOM. The first question I have is if there was such an option would

Re: [fpc-devel] XML Components

2012-11-02 Thread Sergei Gorelkin
02.11.2012 17:44, Mattias Gaertner пишет: Sergei Gorelkin sergei_gorel...@mail.ru hat am 2. November 2012 um 14:32 geschrieben: In this case, the issue is not encoding, but literal ESC (#27) code used in data. XML specification does not allow codepoints below 32, except TAB,CR and LF

Re: [fpc-devel] XML Components

2012-11-02 Thread Sergei Gorelkin
02.11.2012 21:06, Jeppe Græsdal Johansen пишет: Den 02-11-2012 18:04, Michael Van Canneyt skrev: On Fri, 2 Nov 2012, Jeppe Græsdal Johansen wrote: and LF, to appear in data, both in literal and escaped forms. In other words, XML is wrong technology to work with binary data, unless it is

Re: [fpc-devel] XML Components

2012-11-02 Thread Sergei Gorelkin
02.11.2012 19:57, Andrew Brunner пишет: So where in the specs does it say that parsers must reject certain byte sequences between cdata tags excepting XML tags. If this is supported by specs it would help shape a viable solution. This is not supported. Encoding processing, line-feed

Re: [fpc-devel] XML Components

2012-11-02 Thread Sergei Gorelkin
02.11.2012 21:22, Jeppe Græsdal Johansen пишет: Den 02-11-2012 18:19, Sergei Gorelkin skrev: 02.11.2012 21:06, Jeppe Græsdal Johansen пишет: Den 02-11-2012 18:04, Michael Van Canneyt skrev: On Fri, 2 Nov 2012, Jeppe Græsdal Johansen wrote: and LF, to appear in data, both in literal

Re: [fpc-devel] URIParser is not up to spec

2012-09-19 Thread Sergei Gorelkin
19.09.2012 11:45, Graeme Geldenhuys пишет: Hi, I have to deal with complex URL's in a new part in my project, and thought I would take advantage of the already existing URIParser unit in FPC. At closer inspection I noticed that the URIParser is not up to RFC-3986 specs. Even some of the

Re: [fpc-devel] push [rdx]

2012-08-29 Thread Sergei Gorelkin
30.08.2012 2:50, Martin пишет: Does anyone know if that is valid intel style assembler? push [rdx] When an instruction has no register operands, it needs operand size to be explicitly specified: push qword ptr [rdx] FPC complains (on intel /win 64 bit). It's from PascalScript code.

Re: [fpc-devel] FPC -Rintel and -alr options

2012-08-20 Thread Sergei Gorelkin
21.08.2012 5:38, ABorka пишет: Is there a way to see the generated .s assembly files as Intel syntax instead of the ATT one? The -Rintel flag does not seem to work, or I am doing something wrong. Tried command line and fpc.cfg both, on win32 and win64, latest SVN . -R switch controls parsing

[fpc-devel] About tests/tbf/tb0002.pp

2012-07-16 Thread Sergei Gorelkin
Hello, tests/tbf/tb0002.pp is intended to fail, but currently it fails because the VMT symbol (VMT_$P$PROGRAM_$$_TA) is unresolved while linking. Shouldn't compiler detect usage of typeof() on an object type without VMT and report error at compile stage instead? Sergei

Re: [fpc-devel] Cross compiling x86 on amd64, linking to crtbegin.o etc.

2012-07-16 Thread Sergei Gorelkin
17.07.2012 2:51, Jonas Maebe пишет: On 17 Jul 2012, at 00:36, Konstantin wrote: The bad thing is that these paths are determined by the FPC function librarysearchpath.FindFile and as this function does not honor the target architecture. It always returns /usr/lib/. as the default

Re: [fpc-devel] Windows 64bit SEH exception handling

2012-06-19 Thread Sergei Gorelkin
19.06.2012 23:43, tomek пишет: Hello, with reference to http://bugs.freepascal.org/view.php?id=12742 about random crash with Windows OpenDialog Box only on Win7 64bit. Today I compile trunk-fpc with TEST_WIN64_SEH support and it seems that this bug is resolved with SEH. I checked a few times

Re: [fpc-devel] question about parameter loading code

2012-06-10 Thread Sergei Gorelkin
10.06.2012 20:26, Florian Klämpfl пишет: Am 10.06.2012 08:15, schrieb Fuxin Zhang: Dear sirs, When trying to generate code debuggable by GDB, I meet a problem: * it seems mips C code will expect a frame pointer = sp after stack adjustment * but in cpupara.pas, when we create para info, we

Re: [fpc-devel] WinCE support degraded?

2012-05-25 Thread Sergei Gorelkin
25.05.2012 15:53, Thaddy пишет: AFAIK! and tested today, and only for kolce and fpc 2.5.1 wince works. Anything newer doesn't. (No wince above 6.5) I have no clue if it is the compiler or the libraries yet. It is RTL, cpstrnew code imports GetConsoleCP and GetConsoleOutputCP functions which

[fpc-devel] Build failure on win64

2012-05-17 Thread Sergei Gorelkin
Hello, I've just encountered 'make clean all OPT=-dTEST_WIN64_SEH' in trunk failure: make ./msg2inc.exe make[5]: Entering directory `C:/trunk/compiler' C:/trunk/compiler/ppc3.exe -Ur -Xs -O2 -n -Fux86_64 -Fusystems -FuC:/trunk/rtl/units/x86_64-win64 -Fix86_64 -FE. -FUx86_64/units/x86_64-win64

Re: [fpc-devel] Build failure on win64

2012-05-17 Thread Sergei Gorelkin
17.05.2012 15:44, Jonas Maebe пишет: On 17 May 2012, at 13:39, Sergei Gorelkin wrote: I've just encountered 'make clean all OPT=-dTEST_WIN64_SEH' in trunk failure: make ./msg2inc.exe make[5]: Entering directory `C:/trunk/compiler' C:/trunk/compiler/ppc3.exe -Ur -Xs -O2 -n -Fux86_64

Re: [fpc-devel] Testing Intel/AMD AVX-Implemenation

2012-05-04 Thread Sergei Gorelkin
04.05.2012 10:39, Sven Barth пишет: Am 03.05.2012 22:34, schrieb Torsten: While we follow only a few formatting rules in the compiler, I think this is very hard to read. - What does rax86.IntToStr? i need this for create warnings (check memory reference size) and i don't like include a rtl

Re: [fpc-devel] Interface: Method resolution clauses

2012-04-30 Thread Sergei Gorelkin
30.04.2012 19:06, Marcos Douglas пишет: Hi, Can I, using FPC trunk, do this sintaxe? type TMemoryManager = class(TInterfacedObject, IMalloc, IErrorInfo) function IMalloc.Alloc = Allocate; procedure IMalloc.Free = Deallocate; ... end; I'm using 2.6.1 and do not works. To

Re: [fpc-devel] Re: Whole Program Optimization with FPC 2.6.0?

2012-04-08 Thread Sergei Gorelkin
08.04.2012 11:33, Martin Schreiber пишет: Am 07.04.2012 18:09, schrieb Martin Schreiber: Am 07.04.2012 11:31, schrieb Martin Schreiber: Hi, A minimal MSEgui program compiled with FPC 2.6.0 is 711KB on i386-win32 and 796KB on i386-linux. BTW, the same MSEgui minimal program compiled with

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sergei Gorelkin
29.02.2012 17:05, Sven Barth пишет: It's not a bug in Delphi if they write it in the documentation. Whether we should copy this behavior is the question (maybe only in Delphi mode). It cannot be fixed for Delphi mode only because a single copy of RTL is used for all compiler modes. The

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sergei Gorelkin
29.02.2012 18:21, LacaK пишет: It cannot be fixed for Delphi mode only because a single copy of RTL is used for all compiler modes. The current situation where out of range 'length' parameter is adjusted but 'index' out of range raises exception is simply self-inconsistent. It is also

Re: [fpc-devel] TBytes

2012-02-28 Thread Sergei Gorelkin
28.02.2012 16:31, Marco van de Voort пишет: In our previous episode, Sven Barth said: handling completely again which seems to be possible according a thread with Allen Bauer in Embarcadero forum. And please implement it before AnsiStrings can't be used for the purpose anymore. If you care

Re: [fpc-devel] Faster InitObject

2012-02-23 Thread Sergei Gorelkin
23.02.2012 13:16, Sven Barth пишет: In August 2010 Florian already said that maybe FillChar should be optimized: http://lists.freepascal.org/lists/fpc-devel/2010-July/021146.html (at the bottom) In early 2011 I wrote an assembler implementation of FillChar for x86_64 (cannot be used for

Re: [fpc-devel] copy for PChar

2012-02-19 Thread Sergei Gorelkin
19.02.2012 18:38, Mattias Gaertner пишет: Hi, When I use copy on a PChar (e.g. copy(p,1,1)), it is very slow, because the compiler converts the PChar to a string. Not sure why it is allowed in the first place. If out of Delphi compatibility, maybe we should leave it enabled for {$mode delphi}

Re: [fpc-devel] copy for PChar

2012-02-19 Thread Sergei Gorelkin
19.02.2012 20:34, Mattias Gaertner пишет: Is there already a function function Copy(StartPos: PChar; Count: PtrUInt; StopAt0: boolean = true): string; I don't know about an already existing such function (well, actually SetString used to work that way in the past, but no longer), but here's

Re: [fpc-devel] Changing Windows API A routines in SysUtils to W in Windows NT

2012-02-06 Thread Sergei Gorelkin
06.02.2012 20:39, Felipe Monteiro de Carvalho пишет: Hello, SysUtils for Windows utilizes only A Windows APIs, while it could use W APIs in Windows NT. The attached patch starts correcting improving the situation. Advantages of the patch: * Allows for unicode file names in

Re: [fpc-devel] Changing Windows API A routines in SysUtils to W in Windows NT

2012-02-06 Thread Sergei Gorelkin
06.02.2012 23:45, Marco van de Voort пишет: In our previous episode, Felipe Monteiro de Carvalho said: 1 makes it impossible to support Unicode and support Windows 9x at the same time, but I doubt that Free Pascal wants to drop Windows 9x support (even if it is obsolete). Afaik we already

Re: [fpc-devel] x86ins.dat

2012-01-07 Thread Sergei Gorelkin
07.01.2012 16:53, tgrundke пишет: Hi, i am working on the AVX-support for the fp-compiler. Some AVX-assembler instructions have 4 operant e.g. VBLENDVPD xmm1, xmm2, xmm3/m128, xmm4 INTEL Def. 3.1.1.2 Opcode Column in the Instruction Summary Table (Instructions with VEX prefix) /is4: An

Re: [fpc-devel] Manual reload of a DLL snapshot (with relocations) causes multiple AV

2012-01-06 Thread Sergei Gorelkin
06.01.2012 18:07, Gennadiy Poryev пишет: = Preamble = First, I'd like to know why calling of DLL entry point anew does not re-initialize _all_ RTL internals regardless of what was remembered prior to taking the snapshot. Is it just assuming good behavior of system loader that carefully

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Sergei Gorelkin
05.01.2012 15:45, Marco van de Voort пишет: In our previous episode, Sven Barth said: Object instead Class? They are basically similar to records with methods (which we now have as well...) if you use them directly (this means: not as pointer types): they are located on the stack and nested

Re: [fpc-devel] Pointer cache for fast class/pointer access.

2012-01-05 Thread Sergei Gorelkin
05.01.2012 16:12, Marco van de Voort пишет: In our previous episode, Sergei Gorelkin said: This is no longer correct, stack based objects are initialized and finalized if necessary. There was indeed an issue with inheritance (if both ancestor and descendant contain managed members

Re: [fpc-devel] Misterious error

2012-01-04 Thread Sergei Gorelkin
04.01.2012 15:58, José Mejuto пишет: Hello FPC, Tuesday, January 3, 2012, 10:01:54 PM, you wrote: Do you know which kind of code I must look for to isolate the problem ? SG I'd suggest looking at the constructors containing an 'exit' statement, SG but I'm not entirely sure. SG Does

Re: [fpc-devel] Misterious error

2012-01-03 Thread Sergei Gorelkin
03.01.2012 23:54, José Mejuto пишет: Hello FPC, Monday, January 2, 2012, 9:27:50 PM, you wrote: The solution to optimize the unnecessary finally blocks without breaking exit behavior is still to be found. SG More sophisticated patch applied in r19955. If you can test SG your project with

Re: [fpc-devel] Misterious error

2012-01-02 Thread Sergei Gorelkin
31.12.2011 23:17, José Mejuto пишет: SG Plain removal of this if..else breaks a couple of tests in SG the testsuite. But the information you SG provided gives some pointers to look at. At least, adding a SG check that constructor without SG pi_needs_implicit_finally flag doesn't have any

Re: [fpc-devel] Misterious error

2012-01-02 Thread Sergei Gorelkin
02.01.2012 14:16, Sergei Gorelkin пишет: 31.12.2011 23:17, José Mejuto пишет: I'll be very happy in test any change you may want to try before commit to SVN. This kind of problems seems to be very difficult to catch, so I'll try to not change my codebase while you investigate in order

Re: [fpc-devel] Misterious error

2011-12-31 Thread Sergei Gorelkin
31.12.2011 16:58, José Mejuto пишет: Hello Jonas, Wednesday, December 28, 2011, 2:43:16 PM, you wrote: JM The most likely problem is memory corruption by your program. [...] JM give more accurate diagnostics). A bit more information: Environment is win32. The line that raises the

Re: [fpc-devel] -Oodfa

2011-12-30 Thread Sergei Gorelkin
30.12.2011 14:42, Jonas Maebe пишет: On 30 Dec 2011, at 10:26, Florian Klämpfl wrote: Beta. I'am not aware of any missing stuff, but it's mainly untested. I tried to activate by default it during the development of the JVM port (since the JVM will abort if it detects an uninitialized

Re: [fpc-devel] -Oodfa

2011-12-30 Thread Sergei Gorelkin
30.12.2011 15:18, Florian Klämpfl пишет: I played with this yesterday and what about extended Initialize to support unmanaged types? In case of an unmanaged type it just calls fillchar. I was rather thinking about 'varout' (or so) parameter type, which was suggested already several times in

Re: [fpc-devel] Paramstr trailing spaces, bug or not?

2011-12-23 Thread Sergei Gorelkin
23.12.2011 16:18, Marco van de Voort пишет: - syswin.inc code looks like any number of delimiters between parameters are skipped. .. unless quoted. - this extra whitespace is added by the makefile, suggesting some buggy/incorrect processing in make.exe or makefile itself. It could be

Re: [fpc-devel] Paramstr trailing spaces, bug or not?

2011-12-22 Thread Sergei Gorelkin
23.12.2011 1:26, Joost van der Sluis пишет: What I did was this: 'make install PREFIX=c:\lazarus\fpc\2.7.1\' the trailing backslash is important... Then make runs (among others) the following command: .\fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i386 -o -Ur -o

Re: [fpc-devel] Re: out vs. var

2011-11-28 Thread Sergei Gorelkin
28.11.2011 14:26, Sven Barth пишет: Am 28.11.2011 12:02, schrieb Michael Müller: Additionally, if you use the -gt command line option then the compiler will overwrite the contents of (non-reference-counted) out-parameters in the function entry code. This switch will do nothing for open array

  1   2   3   >