[lazarus] lazarus vs. xml

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Dec 19 04:09:53 EST 2003


On Fri, 19 Dec 2003 07:41:40 +0100 (CET)  "Peter Vreman"
<peter at freepascal.org> wrote:

> > On Thu, 18 Dec 2003 23:48:29 +0100  LeVA <leva at az.isten.hu> wrote:
> >
> >> Mattias Gaertner írta:
> >> > On Thu, 18 Dec 2003 20:50:41 +0100  LeVA <leva at az.isten.hu> wrote:
> >> >
> >> >
> >> >>Hi!
> >> >>
> >> >>I figured out that my previous problem with opening the project
> >files,> >>is because of the new lazarus doesn't working with my xml
> >libraries.> >>Lazarus can not read it's config files, and the project
> >files, which> are
> >> >
> >> >>all in xml format. This is very serious because I can not do anything
> >> >>with lazarus. If I create a new project, and save it, I can not even
> >> >>reopen it. I get this error message in the console, when I run
> >> lazarus:
> >> >>
> >> >>[TEnvironmentOptions.Load]  error reading
> >> >>"/home/leva/.lazarus/environmentoptions.xml": In
> >> >>/home/leva/.lazarus/environmentoptions.xml (line 1 pos 1): Expected
> >> >>element
> >
> > Ok, I updated my fpc and voila, there it is. Someone changed StrLComp
> > and it
> > does not work any longer.
> >
> > I guess, you have to go back and use an older fpc. I know, that the fpc
> > two
> > days ago worked.
> >
> >
> > To the fpc team:
> > Can someone investigate the StrLComp function please?
> >
> 
> --- strings.old 2003-12-19 07:35:12.000000000 +0100
> +++ strings.inc 2003-12-19 07:37:56.000000000 +0100
> @@ -240,14 +240,18 @@
>          repne
>          scasb
>          not     %ecx
> +{$ifdef REGCALL}
>          cmpl    saveecx,%ecx
>          jl      .LSTRLCOMP1
>          movl    saveecx,%ecx
>  .LSTRLCOMP1:
> -{$ifdef REGCALL}
>          movl    saveedx,%edi
>          movl    saveeax,%esi
>  {$else}
> +        cmpl    l,%ecx
> +        jl      .LSTRLCOMP1
> +        movl    l,%ecx
> +.LSTRLCOMP1:
>          movl    str2,%edi
>          movl    str1,%esi
>  {$endif}
> @@ -333,14 +337,18 @@
>          repne
>          scasb
>          not     %ecx
> +{$ifdef REGCALL}
>          cmpl    saveecx,%ecx
>          jl      .LSTRLICOMP5
>          movl    saveecx,%ecx
>  .LSTRLICOMP5:
> -{$ifdef REGCALL}
>          movl    saveedx,%edi
>          movl    saveeax,%esi
>  {$else}
> +        cmpl    l,%ecx
> +        jl      .LSTRLICOMP5
> +        movl    l,%ecx
> +.LSTRLICOMP5:
>          movl    str2,%edi
>          movl    str1,%esi
>  {$endif}


I don't know, what this diff should tell me. My assembler knowledge is not
very good, so maybe I just can't see the smart tricks in the function. I
don't see, where the parameter l is used. It seems to me as if it first does
a strlen on str2, which can be quite expensive.
So, I replaced the function in the lazarus xml reader.


Mattias







More information about the Lazarus mailing list