[ros-bugs] [Bug 1255] memchr crashes ReactOS and _CIfmod convention call inaccuracy with python 2.3.5

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Sun Aug 10 15:02:02 CEST 2008


http://www.reactos.org/bugzilla/show_bug.cgi?id=1255





--- Comment #25 from jeanmichel.123 <jeanmichel.123 at free.Fr>  2008-08-10 15:02:00 CET ---
(In reply to comment #24)
> You could provide a patch showcasing the suggested changes, that would probably
> speed up the process.

I consider comment #15 and comment #20 as such patches showcase.

Now, if for any reason, assembly code is really needed, there are two options:
* according to comment #16, «Putting something to clear ZF (e.g. "test
%esp,%esp") before it will fix that problem.»
* according to dietlibc:
http://www.google.com/codesearch?hl=fr&q=lang:assembly+memchr+show:A65zjVHYn3M:ZF0Jo5kW74A:w8ZqoW99mTA&sa=N&cd=10&ct=rc&cs_p=http://kernel.osuosl.org/pub/linux/libs/dietlibc/dietlibc-0.26.tar.gz&cs_f=dietlibc-0.26/i386/memchr.S

We should try to add those lines with +:

http://www.google.com/codesearch?hl=fr&q=memchr+lang:assembly+package:reactos+show:9_qoIDcIzlY:Ha1jdSCPX54:9_qoIDcIzlY&sa=N&cd=2&ct=rc&cs_p=svn://svn.reactos.ru/reactos/trunk&cs_f=reactos/lib/sdk/crt/mem/i386/memchr_asm.s

.globl  _memchr

_memchr:
        push    %ebp
        mov     %esp,%ebp
        push    %edi
        mov     0x8(%ebp),%edi
        mov     0xc(%ebp),%eax
        mov     0x10(%ebp),%ecx
        cld
+       jecxz .Lnotfound
        repne   scasb
        je      .L1
+.Lnotfound:
        mov     $1,%edi
.L1:
        mov     %edi,%eax
        dec     %eax
        pop     %edi
        leave
        ret        

Moreover L1 might be renamed LFound, just for the fun.

However I did not try it because I have no skill nor in coding style nor in
assembly. Moreover for the moment, I do not have any compiler.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Ros-bugs mailing list