616 2: movl (%esi),%edx 617 movl %edx,(%edi,%esi,1) 618 subl $4,%esi 619 subl $1,%ecx 620 jnz 2b 621 addl %esi,%edi 622 jmp 4f 623 3: rep; smovl 624 4: andl $1,%eax 625 je 6f 626 addl $2,%esi 627 addl $2,%edi 628 5: movw (%esi),%dx 629 movw %dx,(%edi) 630 6: cld 631 popl %edi 632 popl %esi 633 ret 634 635 636 # Support for int64_t Atomic::cmpxchg(int64_t exchange_value, 637 # volatile int64_t* dest, 638 # int64_t compare_value) 639 # 640 .p2align 4,,15 641 ELF_TYPE(_Atomic_cmpxchg_long,@function) 642 SYMBOL(_Atomic_cmpxchg_long): 643 # 8(%esp) : return PC 644 pushl %ebx # 4(%esp) : old %ebx 645 pushl %edi # 0(%esp) : old %edi 646 movl 12(%esp), %ebx # 12(%esp) : exchange_value (low) 647 movl 16(%esp), %ecx # 16(%esp) : exchange_value (high) 648 movl 24(%esp), %eax # 24(%esp) : compare_value (low) 649 movl 28(%esp), %edx # 28(%esp) : compare_value (high) 650 movl 20(%esp), %edi # 20(%esp) : dest 651 lock 652 cmpxchg8b (%edi) 653 popl %edi 654 popl %ebx 655 ret 656 657 658 # Support for int64_t Atomic::load and Atomic::store. 659 # void _Atomic_move_long(const volatile int64_t* src, volatile int64_t* dst) 660 .p2align 4,,15 661 ELF_TYPE(_Atomic_move_long,@function) 662 SYMBOL(_Atomic_move_long): 663 movl 4(%esp), %eax # src 664 fildll (%eax) 665 movl 8(%esp), %eax # dest 666 fistpll (%eax) 667 ret 668 | 616 2: movl (%esi),%edx 617 movl %edx,(%edi,%esi,1) 618 subl $4,%esi 619 subl $1,%ecx 620 jnz 2b 621 addl %esi,%edi 622 jmp 4f 623 3: rep; smovl 624 4: andl $1,%eax 625 je 6f 626 addl $2,%esi 627 addl $2,%edi 628 5: movw (%esi),%dx 629 movw %dx,(%edi) 630 6: cld 631 popl %edi 632 popl %esi 633 ret 634 635 636 # Support for int64_t Atomic::cmpxchg(int64_t compare_value, 637 # volatile int64_t* dest, 638 # int64_t exchange_value) 639 # 640 .p2align 4,,15 641 ELF_TYPE(_Atomic_cmpxchg_long,@function) 642 SYMBOL(_Atomic_cmpxchg_long): 643 # 8(%esp) : return PC 644 pushl %ebx # 4(%esp) : old %ebx 645 pushl %edi # 0(%esp) : old %edi 646 movl 12(%esp), %ebx # 12(%esp) : exchange_value (low) 647 movl 16(%esp), %ecx # 16(%esp) : exchange_value (high) 648 movl 24(%esp), %eax # 24(%esp) : compare_value (low) 649 movl 28(%esp), %edx # 28(%esp) : compare_value (high) 650 movl 20(%esp), %edi # 20(%esp) : dest 651 lock 652 cmpxchg8b (%edi) 653 popl %edi 654 popl %ebx 655 ret 656 657 658 # Support for int64_t Atomic::load and Atomic::store. 659 # void _Atomic_move_long(const volatile int64_t* src, volatile int64_t* dst) 660 .p2align 4,,15 661 ELF_TYPE(_Atomic_move_long,@function) 662 SYMBOL(_Atomic_move_long): 663 movl 4(%esp), %eax # src 664 fildll (%eax) 665 movl 8(%esp), %eax # dest 666 fistpll (%eax) 667 ret |