hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s
author shade
Thu, 04 Feb 2016 21:44:23 +0300
changeset 35708 290a3952e434
parent 22234 da823d78ad65
permissions -rw-r--r--
8149044: jdk/internal/misc/JavaLangAccess/FormatUnsigned.java fails all platforms Summary: Remove the obsolete FormatUnsigned test. Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     1
# 
22234
da823d78ad65 8029233: Update copyright year to match last edit in jdk8 hotspot repository for 2013
mikael
parents: 18740
diff changeset
     2
# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
10565
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     4
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     7
# published by the Free Software Foundation.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     8
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    13
# accompanied this code).
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    14
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    18
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    21
# questions.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    22
#
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    23
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    24
#ifdef __APPLE__
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    25
# Darwin uses _ prefixed global symbols
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    26
#define SYMBOL(s) _ ## s
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    27
#define ELF_TYPE(name, description)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    28
#else
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    29
#define SYMBOL(s) s
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    30
#define ELF_TYPE(name, description) .type name,description
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    31
#endif
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    32
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    33
        # NOTE WELL!  The _Copy functions are called directly
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    34
	# from server-compiler-generated code via CallLeafNoFP,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    35
	# which means that they *must* either not use floating
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    36
	# point or use it in the same manner as does the server
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    37
	# compiler.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    38
	
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    39
        .globl SYMBOL(_Copy_arrayof_conjoint_bytes)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    40
	.globl SYMBOL(_Copy_arrayof_conjoint_jshorts)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    41
        .globl SYMBOL(_Copy_conjoint_jshorts_atomic)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    42
        .globl SYMBOL(_Copy_arrayof_conjoint_jints)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    43
        .globl SYMBOL(_Copy_conjoint_jints_atomic)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    44
        .globl SYMBOL(_Copy_arrayof_conjoint_jlongs)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    45
        .globl SYMBOL(_Copy_conjoint_jlongs_atomic)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    46
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    47
	.text
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    48
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    49
        .globl SYMBOL(SpinPause)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    50
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    51
        ELF_TYPE(SpinPause,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    52
SYMBOL(SpinPause):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    53
        rep
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    54
        nop
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    55
        movq   $1, %rax
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    56
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    57
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    58
        # Support for void Copy::arrayof_conjoint_bytes(void* from,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    59
        #                                               void* to,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    60
        #                                               size_t count)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    61
        # rdi - from
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    62
        # rsi - to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    63
        # rdx - count, treated as ssize_t
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    64
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    65
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    66
	ELF_TYPE(_Copy_arrayof_conjoint_bytes,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    67
SYMBOL(_Copy_arrayof_conjoint_bytes):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    68
        movq     %rdx,%r8             # byte count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    69
        shrq     $3,%rdx              # qword count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    70
        cmpq     %rdi,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    71
        leaq     -1(%rdi,%r8,1),%rax  # from + bcount*1 - 1
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    72
        jbe      acb_CopyRight
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    73
        cmpq     %rax,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    74
        jbe      acb_CopyLeft 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    75
acb_CopyRight:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    76
        leaq     -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    77
        leaq     -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    78
        negq     %rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    79
        jmp      7f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    80
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    81
1:      movq     8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    82
        movq     %rsi,8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    83
        addq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    84
        jnz      1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    85
2:      testq    $4,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    86
        jz       3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    87
        movl     8(%rax),%esi         # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    88
        movl     %esi,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    89
        addq     $4,%rax
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    90
        addq     $4,%rcx              # original %rsi is trashed, so we
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    91
                                      #  can't use it as a base register
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    92
3:      testq    $2,%r8               # check for trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    93
        jz       4f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    94
        movw     8(%rax),%si          # copy trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    95
        movw     %si,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    96
        addq     $2,%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    97
4:      testq    $1,%r8               # check for trailing byte
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    98
        jz       5f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
    99
        movb     -1(%rdi,%r8,1),%al   # copy trailing byte
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   100
        movb     %al,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   101
5:      ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   102
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   103
6:      movq     -24(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   104
        movq     %rsi,-24(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   105
        movq     -16(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   106
        movq     %rsi,-16(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   107
        movq     -8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   108
        movq     %rsi,-8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   109
        movq     (%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   110
        movq     %rsi,(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   111
7:      addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   112
        jle      6b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   113
        subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   114
        jl       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   115
        jmp      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   116
acb_CopyLeft:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   117
        testq    $1,%r8               # check for trailing byte
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   118
        jz       1f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   119
        movb     -1(%rdi,%r8,1),%cl   # copy trailing byte
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   120
        movb     %cl,-1(%rsi,%r8,1)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   121
        subq     $1,%r8               # adjust for possible trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   122
1:      testq    $2,%r8               # check for trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   123
        jz       2f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   124
        movw     -2(%rdi,%r8,1),%cx   # copy trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   125
        movw     %cx,-2(%rsi,%r8,1)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   126
2:      testq    $4,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   127
        jz       5f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   128
        movl     (%rdi,%rdx,8),%ecx   # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   129
        movl     %ecx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   130
        jmp      5f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   131
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   132
3:      movq     -8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   133
        movq     %rcx,-8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   134
        subq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   135
        jnz      3b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   136
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   137
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   138
4:      movq     24(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   139
        movq     %rcx,24(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   140
        movq     16(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   141
        movq     %rcx,16(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   142
        movq     8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   143
        movq     %rcx,8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   144
        movq     (%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   145
        movq     %rcx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   146
5:      subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   147
        jge      4b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   148
        addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   149
        jg       3b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   150
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   151
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   152
        # Support for void Copy::arrayof_conjoint_jshorts(void* from,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   153
        #                                                 void* to,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   154
        #                                                 size_t count)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   155
        # Equivalent to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   156
        #   conjoint_jshorts_atomic
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   157
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   158
        # If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   159
        # let the hardware handle it.  The tow or four words within dwords
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   160
        # or qwords that span cache line boundaries will still be loaded
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   161
        # and stored atomically.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   162
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   163
        # rdi - from
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   164
        # rsi - to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   165
        # rdx - count, treated as ssize_t
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   166
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   167
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   168
	ELF_TYPE(_Copy_arrayof_conjoint_jshorts,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   169
	ELF_TYPE(_Copy_conjoint_jshorts_atomic,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   170
SYMBOL(_Copy_arrayof_conjoint_jshorts):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   171
SYMBOL(_Copy_conjoint_jshorts_atomic):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   172
        movq     %rdx,%r8             # word count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   173
        shrq     $2,%rdx              # qword count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   174
        cmpq     %rdi,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   175
        leaq     -2(%rdi,%r8,2),%rax  # from + wcount*2 - 2
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   176
        jbe      acs_CopyRight
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   177
        cmpq     %rax,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   178
        jbe      acs_CopyLeft 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   179
acs_CopyRight:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   180
        leaq     -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   181
        leaq     -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   182
        negq     %rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   183
        jmp      6f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   184
1:      movq     8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   185
        movq     %rsi,8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   186
        addq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   187
        jnz      1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   188
2:      testq    $2,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   189
        jz       3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   190
        movl     8(%rax),%esi         # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   191
        movl     %esi,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   192
        addq     $4,%rcx              # original %rsi is trashed, so we
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   193
                                      #  can't use it as a base register
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   194
3:      testq    $1,%r8               # check for trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   195
        jz       4f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   196
        movw     -2(%rdi,%r8,2),%si   # copy trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   197
        movw     %si,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   198
4:      ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   199
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   200
5:      movq     -24(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   201
        movq     %rsi,-24(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   202
        movq     -16(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   203
        movq     %rsi,-16(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   204
        movq     -8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   205
        movq     %rsi,-8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   206
        movq     (%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   207
        movq     %rsi,(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   208
6:      addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   209
        jle      5b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   210
        subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   211
        jl       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   212
        jmp      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   213
acs_CopyLeft:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   214
        testq    $1,%r8               # check for trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   215
        jz       1f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   216
        movw     -2(%rdi,%r8,2),%cx   # copy trailing word
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   217
        movw     %cx,-2(%rsi,%r8,2)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   218
1:      testq    $2,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   219
        jz       4f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   220
        movl     (%rdi,%rdx,8),%ecx   # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   221
        movl     %ecx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   222
        jmp      4f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   223
2:      movq     -8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   224
        movq     %rcx,-8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   225
        subq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   226
        jnz      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   227
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   228
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   229
3:      movq     24(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   230
        movq     %rcx,24(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   231
        movq     16(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   232
        movq     %rcx,16(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   233
        movq     8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   234
        movq     %rcx,8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   235
        movq     (%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   236
        movq     %rcx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   237
4:      subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   238
        jge      3b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   239
        addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   240
        jg       2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   241
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   242
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   243
        # Support for void Copy::arrayof_conjoint_jints(jint* from,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   244
        #                                               jint* to,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   245
        #                                               size_t count)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   246
        # Equivalent to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   247
        #   conjoint_jints_atomic
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   248
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   249
        # If 'from' and/or 'to' are aligned on 4-byte boundaries, we let
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   250
        # the hardware handle it.  The two dwords within qwords that span
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   251
        # cache line boundaries will still be loaded and stored atomically.
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   252
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   253
        # rdi - from
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   254
        # rsi - to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   255
        # rdx - count, treated as ssize_t
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   256
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   257
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   258
	ELF_TYPE(_Copy_arrayof_conjoint_jints,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   259
	ELF_TYPE(_Copy_conjoint_jints_atomic,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   260
SYMBOL(_Copy_arrayof_conjoint_jints):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   261
SYMBOL(_Copy_conjoint_jints_atomic):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   262
        movq     %rdx,%r8             # dword count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   263
        shrq     %rdx                 # qword count
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   264
        cmpq     %rdi,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   265
        leaq     -4(%rdi,%r8,4),%rax  # from + dcount*4 - 4
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   266
        jbe      aci_CopyRight
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   267
        cmpq     %rax,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   268
        jbe      aci_CopyLeft 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   269
aci_CopyRight:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   270
        leaq     -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   271
        leaq     -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   272
        negq     %rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   273
        jmp      5f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   274
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   275
1:      movq     8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   276
        movq     %rsi,8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   277
        addq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   278
        jnz       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   279
2:      testq    $1,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   280
        jz       3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   281
        movl     8(%rax),%esi         # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   282
        movl     %esi,8(%rcx)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   283
3:      ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   284
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   285
4:      movq     -24(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   286
        movq     %rsi,-24(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   287
        movq     -16(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   288
        movq     %rsi,-16(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   289
        movq     -8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   290
        movq     %rsi,-8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   291
        movq     (%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   292
        movq     %rsi,(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   293
5:      addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   294
        jle      4b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   295
        subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   296
        jl       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   297
        jmp      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   298
aci_CopyLeft:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   299
        testq    $1,%r8               # check for trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   300
        jz       3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   301
        movl     -4(%rdi,%r8,4),%ecx  # copy trailing dword
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   302
        movl     %ecx,-4(%rsi,%r8,4)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   303
        jmp      3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   304
1:      movq     -8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   305
        movq     %rcx,-8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   306
        subq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   307
        jnz      1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   308
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   309
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   310
2:      movq     24(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   311
        movq     %rcx,24(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   312
        movq     16(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   313
        movq     %rcx,16(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   314
        movq     8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   315
        movq     %rcx,8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   316
        movq     (%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   317
        movq     %rcx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   318
3:      subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   319
        jge      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   320
        addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   321
        jg       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   322
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   323
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   324
        # Support for void Copy::arrayof_conjoint_jlongs(jlong* from,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   325
        #                                                jlong* to,
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   326
        #                                                size_t count)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   327
        # Equivalent to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   328
        #   conjoint_jlongs_atomic
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   329
        #   arrayof_conjoint_oops
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   330
        #   conjoint_oops_atomic
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   331
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   332
        # rdi - from
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   333
        # rsi - to
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   334
        # rdx - count, treated as ssize_t
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   335
        #
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   336
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   337
	ELF_TYPE(_Copy_arrayof_conjoint_jlongs,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   338
	ELF_TYPE(_Copy_conjoint_jlongs_atomic,@function)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   339
SYMBOL(_Copy_arrayof_conjoint_jlongs):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   340
SYMBOL(_Copy_conjoint_jlongs_atomic):
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   341
        cmpq     %rdi,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   342
        leaq     -8(%rdi,%rdx,8),%rax # from + count*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   343
        jbe      acl_CopyRight
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   344
        cmpq     %rax,%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   345
        jbe      acl_CopyLeft 
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   346
acl_CopyRight:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   347
        leaq     -8(%rsi,%rdx,8),%rcx # to + count*8 - 8
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   348
        negq     %rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   349
        jmp      3f
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   350
1:      movq     8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   351
        movq     %rsi,8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   352
        addq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   353
        jnz      1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   354
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   355
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   356
2:      movq     -24(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   357
        movq     %rsi,-24(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   358
        movq     -16(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   359
        movq     %rsi,-16(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   360
        movq     -8(%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   361
        movq     %rsi,-8(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   362
        movq     (%rax,%rdx,8),%rsi
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   363
        movq     %rsi,(%rcx,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   364
3:      addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   365
        jle      2b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   366
        subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   367
        jl       1b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   368
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   369
4:      movq     -8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   370
        movq     %rcx,-8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   371
        subq     $1,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   372
        jnz      4b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   373
        ret
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   374
        .p2align 4,,15
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   375
5:      movq     24(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   376
        movq     %rcx,24(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   377
        movq     16(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   378
        movq     %rcx,16(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   379
        movq     8(%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   380
        movq     %rcx,8(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   381
        movq     (%rdi,%rdx,8),%rcx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   382
        movq     %rcx,(%rsi,%rdx,8)
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   383
acl_CopyLeft:
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   384
        subq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   385
        jge      5b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   386
        addq     $4,%rdx
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   387
        jg       4b
dc90c239f4ec 7089790: integrate bsd-port changes
never
parents:
diff changeset
   388
        ret