Changeset 8e3f47b3 in mainline for arch/ia32/src/asm.S


Ignore:
Timestamp:
2005-10-04T22:06:07Z (20 years ago)
Author:
Sergey Bondari <bondari@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1084a784
Parents:
ce031f0
Message:

ia-32 memcmp inline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/asm.S

    rce031f0 r8e3f47b3  
    4040.global memsetb
    4141.global memsetw
    42 .global memcmp
    43 
    4442
    4543## Turn paging on
     
    200198        pop %eax
    201199
    202         ret
    203 
    204 
    205 ## Compare memory regions for equality
    206 #
    207 # Compare a given number of bytes (3rd argument)
    208 # at memory locations defined by 1st and 2nd argument
    209 # for equality. If the bytes are equal, EAX contains 0.
    210 #
    211 SRC=12
    212 DST=16
    213 CNT=20
    214 memcmp:
    215         push %esi
    216         push %edi
    217 
    218         movl CNT(%esp),%ecx
    219         movl DST(%esp),%edi
    220         movl SRC(%esp),%esi
    221 
    222         repe cmpsb %es:(%edi),%ds:(%esi)
    223         movl %ecx,%eax          # %ecx contains the return value (zero on success)
    224 
    225         pop %edi
    226         pop %esi
    227        
    228200        ret
    229201
Note: See TracChangeset for help on using the changeset viewer.