<!DOCTYPE html>
<html lang="vi" data-theme="auto">
<head>

<link rel="preconnect" href="https://www.googletagmanager.com">
<script >(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  })(window,document,'script','dataLayer','GTM-W8MVQXG');</script>
  
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#00add8">
<link rel="canonical" href="https://go.dev/src/runtime/memmove_amd64.s">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons">
<link rel="stylesheet" href="/css/styles.css">
<link rel="icon" href="/images/favicon-gopher.png" sizes="any">
<link rel="apple-touch-icon" href="/images/favicon-gopher-plain.png"/>
<link rel="icon" href="/images/favicon-gopher.svg" type="image/svg+xml">
<link rel="me" href="https://hachyderm.io/@golang">

  
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  })(window,document,'script','dataLayer','GTM-W8MVQXG');</script>
  
<script src="/js/site.js"></script>
<meta name="og:url" content="https://go.dev/src/runtime/memmove_amd64.s">
<meta name="og:title" content=" - The Go Programming Language">
<title> - The Go Programming Language</title>

<meta name="og:image" content="https://go.dev/doc/gopher/gopher5logo.jpg">
<meta name="twitter:image" content="https://go.dev/doc/gopher/gopherbelly300.jpg">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@golang">
</head>
<body class="Site">
  
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W8MVQXG"
  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  


<header class="Site-header js-siteHeader">
  <div class="Header Header--dark">
    <nav class="Header-nav">
      <a href="/">
        <img
          class="js-headerLogo Header-logo"
          src="/images/go-logo-white.svg"
          alt="Go">
      </a>
      <div class="skip-navigation-wrapper">
        <a class="skip-to-content-link" aria-label="Bỏ qua để đến nội dung chính" href="#main-content"> Bỏ qua đến nội dung chính </a>
      </div>
      <div class="Header-rightContent">
        <ul class="Header-menu">
          <li class="Header-menuItem ">
            <a href="#"  class="js-desktop-menu-hover" aria-label=Tại&#32;sao&#32;Go aria-describedby="dropdown-description">
              Tại sao Go <i class="material-icons" aria-hidden="true">arrow_drop_down</i>
            </a>
            <div class="screen-reader-only" id="dropdown-description" hidden>
              Nhấn Enter để bật/tắt menu thả xuống
            </div>
              <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu">
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/solutions/case-studies">
                          Case Studies
                          
                        </a>
                    </div>
                    <p>Các vấn đề phổ biến mà doanh nghiệp giải quyết bằng Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/solutions/use-cases">
                          Use Cases
                          
                        </a>
                    </div>
                    <p>Câu chuyện về cách thức và lý do các công ty sử dụng Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/security/">
                          Bảo mật
                          
                        </a>
                    </div>
                    <p>Go giúp bạn bảo mật theo mặc định như thế nào</p>
                  </li>
              </ul>
          </li>
          <li class="Header-menuItem ">
            <a href="/learn/"  aria-label=Học aria-describedby="dropdown-description">
              Học 
            </a>
            <div class="screen-reader-only" id="dropdown-description" hidden>
              Nhấn Enter để bật/tắt menu thả xuống
            </div>
          </li>
          <li class="Header-menuItem ">
            <a href="#"  class="js-desktop-menu-hover" aria-label=Tài&#32;liệu aria-describedby="dropdown-description">
              Tài liệu <i class="material-icons" aria-hidden="true">arrow_drop_down</i>
            </a>
            <div class="screen-reader-only" id="dropdown-description" hidden>
              Nhấn Enter để bật/tắt menu thả xuống
            </div>
              <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu">
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/ref/spec">
                          Go Spec
                          
                        </a>
                    </div>
                    <p>Đặc tả ngôn ngữ Go chính thức</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/doc">
                          Hướng dẫn sử dụng Go
                          
                        </a>
                    </div>
                    <p>Giới thiệu đầy đủ về cách xây dựng phần mềm với Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="https://pkg.go.dev/std">
                          Thư viện chuẩn
                          
                        </a>
                    </div>
                    <p>Tài liệu tham chiếu cho thư viện chuẩn của Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/doc/devel/release">
                          Ghi chú bản phát hành
                          
                        </a>
                    </div>
                    <p>Tìm hiểu những điểm mới trong từng bản phát hành Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/doc/effective_go">
                          Effective Go
                          
                        </a>
                    </div>
                    <p>Mẹo viết code Go rõ ràng, hiệu quả và đúng phong cách</p>
                  </li>
              </ul>
          </li>
          <li class="Header-menuItem ">
            <a href="https://pkg.go.dev"  aria-label=Packages aria-describedby="dropdown-description">
              Packages 
            </a>
            <div class="screen-reader-only" id="dropdown-description" hidden>
              Nhấn Enter để bật/tắt menu thả xuống
            </div>
          </li>
          <li class="Header-menuItem ">
            <a href="#"  class="js-desktop-menu-hover" aria-label=Cộng&#32;đồng aria-describedby="dropdown-description">
              Cộng đồng <i class="material-icons" aria-hidden="true">arrow_drop_down</i>
            </a>
            <div class="screen-reader-only" id="dropdown-description" hidden>
              Nhấn Enter để bật/tắt menu thả xuống
            </div>
              <ul class="Header-submenu js-desktop-submenu-hover" aria-label="submenu">
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/talks/">
                          Recorded Talks
                          
                        </a>
                    </div>
                    <p>Video từ các sự kiện trước đây</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="https://www.meetup.com/pro/go">
                          Meetups
                           <i class="material-icons">open_in_new</i>
                        </a>
                    </div>
                    <p>Gặp gỡ các lập trình viên Go địa phương khác</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/wiki/Conferences">
                          Hội nghị
                           <i class="material-icons">open_in_new</i>
                        </a>
                    </div>
                    <p>Học hỏi và kết nối với các lập trình viên Go trên toàn thế giới</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/blog">
                          Go blog
                          
                        </a>
                    </div>
                    <p>Blog chính thức của dự án Go.</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        <a href="/help">
                          Dự án Go
                          
                        </a>
                    </div>
                    <p>Nhận trợ giúp và cập nhật thông tin từ Go</p>
                  </li>
                  <li class="Header-submenuItem">
                    <div>
                        Kết nối
                    </div>
                    <p></p>
                      <div class="Header-socialIcons">
                        
                        <a class="Header-socialIcon" aria-label="Kết nối qua google-groups (Mở trong cửa sổ mới)" href="https://groups.google.com/g/golang-nuts"><img src="/images/logos/social/google-groups.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua github (Mở trong cửa sổ mới)" href="https://github.com/golang"><img src="/images/logos/social/github.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua bluesky (Mở trong cửa sổ mới)" href="https://bsky.app/profile/golang.org"><img src="/images/logos/social/bluesky.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua mastodon (Mở trong cửa sổ mới)" href="https://hachyderm.io/@golang"><img src="/images/logos/social/mastodon.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua twitter (Mở trong cửa sổ mới)" href="https://twitter.com/golang"><img src="/images/logos/social/twitter.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua reddit (Mở trong cửa sổ mới)" href="https://www.reddit.com/r/golang/"><img src="/images/logos/social/reddit.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua slack (Mở trong cửa sổ mới)" href="https://invite.slack.golangbridge.org/"><img src="/images/logos/social/slack.svg" /></a>
                        <a class="Header-socialIcon" aria-label="Kết nối qua stack-overflow (Mở trong cửa sổ mới)" href="https://stackoverflow.com/tags/go"><img src="/images/logos/social/stack-overflow.svg" /></a>
                      </div>
                  </li>
              </ul>
          </li>
        </ul>
        <button class="Header-navOpen js-headerMenuButton Header-navOpen--white" aria-label="Mở điều hướng.">
        </button>
      </div>
    </nav>
    
  </div>
</header>
<aside class="NavigationDrawer js-header">
  <nav class="NavigationDrawer-nav">
    <div class="NavigationDrawer-header">
      <a href="/">
        <img class="NavigationDrawer-logo" src="/images/go-logo-blue.svg" alt="Go.">
      </a>
    </div>
    <ul class="NavigationDrawer-list">
        
          <li class="NavigationDrawer-listItem js-mobile-subnav-trigger  NavigationDrawer-hasSubnav">
            <a href="#"><span>Tại sao Go</span> <i class="material-icons">navigate_next</i></a>

            <div class="NavigationDrawer NavigationDrawer-submenuItem">
              <nav class="NavigationDrawer-nav">
                <div class="NavigationDrawer-header">
                  <a href="#"><i class="material-icons">navigate_before</i>Tại sao Go</a>
                </div>
                <ul class="NavigationDrawer-list">
                    <li class="NavigationDrawer-listItem">
                        <a href="/solutions/case-studies">
                          Case Studies
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/solutions/use-cases">
                          Use Cases
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/security/">
                          Bảo mật
                          
                        </a>
                      
                    </li>
                </ul>
              </div>
            </div>
          </li>

        
        
          <li class="NavigationDrawer-listItem ">
            <a href="/learn/">Học</a>
          </li>
        
        
          <li class="NavigationDrawer-listItem js-mobile-subnav-trigger  NavigationDrawer-hasSubnav">
            <a href="#"><span>Tài liệu</span> <i class="material-icons">navigate_next</i></a>

            <div class="NavigationDrawer NavigationDrawer-submenuItem">
              <nav class="NavigationDrawer-nav">
                <div class="NavigationDrawer-header">
                  <a href="#"><i class="material-icons">navigate_before</i>Tài liệu</a>
                </div>
                <ul class="NavigationDrawer-list">
                    <li class="NavigationDrawer-listItem">
                        <a href="/ref/spec">
                          Go Spec
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/doc">
                          Hướng dẫn sử dụng Go
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="https://pkg.go.dev/std">
                          Thư viện chuẩn
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/doc/devel/release">
                          Ghi chú bản phát hành
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/doc/effective_go">
                          Effective Go
                          
                        </a>
                      
                    </li>
                </ul>
              </div>
            </div>
          </li>

        
        
          <li class="NavigationDrawer-listItem ">
            <a href="https://pkg.go.dev">Packages</a>
          </li>
        
        
          <li class="NavigationDrawer-listItem js-mobile-subnav-trigger  NavigationDrawer-hasSubnav">
            <a href="#"><span>Cộng đồng</span> <i class="material-icons">navigate_next</i></a>

            <div class="NavigationDrawer NavigationDrawer-submenuItem">
              <nav class="NavigationDrawer-nav">
                <div class="NavigationDrawer-header">
                  <a href="#"><i class="material-icons">navigate_before</i>Cộng đồng</a>
                </div>
                <ul class="NavigationDrawer-list">
                    <li class="NavigationDrawer-listItem">
                        <a href="/talks/">
                          Recorded Talks
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="https://www.meetup.com/pro/go">
                          Meetups
                           <i class="material-icons">open_in_new</i>
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/wiki/Conferences">
                          Hội nghị
                           <i class="material-icons">open_in_new</i>
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/blog">
                          Go blog
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <a href="/help">
                          Dự án Go
                          
                        </a>
                      
                    </li>
                    <li class="NavigationDrawer-listItem">
                        <div>Kết nối</div>
                        <div class="Header-socialIcons">
                          
                            <a class="Header-socialIcon" href="https://groups.google.com/g/golang-nuts"><img src="/images/logos/social/google-groups.svg" /></a>
                            <a class="Header-socialIcon" href="https://github.com/golang"><img src="/images/logos/social/github.svg" /></a>
                            <a class="Header-socialIcon" href="https://bsky.app/profile/golang.org"><img src="/images/logos/social/bluesky.svg" /></a>
                            <a class="Header-socialIcon" href="https://hachyderm.io/@golang"><img src="/images/logos/social/mastodon.svg" /></a>
                            <a class="Header-socialIcon" href="https://twitter.com/golang"><img src="/images/logos/social/twitter.svg" /></a>
                            <a class="Header-socialIcon" href="https://www.reddit.com/r/golang/"><img src="/images/logos/social/reddit.svg" /></a>
                            <a class="Header-socialIcon" href="https://invite.slack.golangbridge.org/"><img src="/images/logos/social/slack.svg" /></a>
                            <a class="Header-socialIcon" href="https://stackoverflow.com/tags/go"><img src="/images/logos/social/stack-overflow.svg" /></a>
                        </div>
                    </li>
                </ul>
              </div>
            </div>
          </li>

        
    </ul>
  </nav>
</aside>
<div class="NavigationDrawer-scrim js-scrim" role="presentation"></div>
<main class="SiteContent SiteContent--default" id="main-content">
  

<article class="Texthtml Article">


<h1>Tệp văn bản 


<a href="/src/">src</a>/<a href="/src/runtime/">runtime</a>/<span class="text-muted">memmove_amd64.s</span>
</h1>


<pre><span id="L1" class="ln">     1&nbsp;&nbsp;</span>// Derived from Inferno&#39;s libkern/memmove-386.s (adapted for amd64)
<span id="L2" class="ln">     2&nbsp;&nbsp;</span>// https://bitbucket.org/inferno-os/inferno-os/src/master/libkern/memmove-386.s
<span id="L3" class="ln">     3&nbsp;&nbsp;</span>//
<span id="L4" class="ln">     4&nbsp;&nbsp;</span>//         Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved.
<span id="L5" class="ln">     5&nbsp;&nbsp;</span>//         Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com).  All rights reserved.
<span id="L6" class="ln">     6&nbsp;&nbsp;</span>//         Portions Copyright 2009 The Go Authors. All rights reserved.
<span id="L7" class="ln">     7&nbsp;&nbsp;</span>//
<span id="L8" class="ln">     8&nbsp;&nbsp;</span>// Permission is hereby granted, free of charge, to any person obtaining a copy
<span id="L9" class="ln">     9&nbsp;&nbsp;</span>// of this software and associated documentation files (the &#34;Software&#34;), to deal
<span id="L10" class="ln">    10&nbsp;&nbsp;</span>// in the Software without restriction, including without limitation the rights
<span id="L11" class="ln">    11&nbsp;&nbsp;</span>// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<span id="L12" class="ln">    12&nbsp;&nbsp;</span>// copies of the Software, and to permit persons to whom the Software is
<span id="L13" class="ln">    13&nbsp;&nbsp;</span>// furnished to do so, subject to the following conditions:
<span id="L14" class="ln">    14&nbsp;&nbsp;</span>//
<span id="L15" class="ln">    15&nbsp;&nbsp;</span>// The above copyright notice and this permission notice shall be included in
<span id="L16" class="ln">    16&nbsp;&nbsp;</span>// all copies or substantial portions of the Software.
<span id="L17" class="ln">    17&nbsp;&nbsp;</span>//
<span id="L18" class="ln">    18&nbsp;&nbsp;</span>// THE SOFTWARE IS PROVIDED &#34;AS IS&#34;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<span id="L19" class="ln">    19&nbsp;&nbsp;</span>// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
<span id="L20" class="ln">    20&nbsp;&nbsp;</span>// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
<span id="L21" class="ln">    21&nbsp;&nbsp;</span>// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
<span id="L22" class="ln">    22&nbsp;&nbsp;</span>// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
<span id="L23" class="ln">    23&nbsp;&nbsp;</span>// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
<span id="L24" class="ln">    24&nbsp;&nbsp;</span>// THE SOFTWARE.
<span id="L25" class="ln">    25&nbsp;&nbsp;</span>
<span id="L26" class="ln">    26&nbsp;&nbsp;</span>//go:build !plan9
<span id="L27" class="ln">    27&nbsp;&nbsp;</span>
<span id="L28" class="ln">    28&nbsp;&nbsp;</span>#include &#34;go_asm.h&#34;
<span id="L29" class="ln">    29&nbsp;&nbsp;</span>#include &#34;textflag.h&#34;
<span id="L30" class="ln">    30&nbsp;&nbsp;</span>
<span id="L31" class="ln">    31&nbsp;&nbsp;</span>// See memmove Go doc for important implementation constraints.
<span id="L32" class="ln">    32&nbsp;&nbsp;</span>
<span id="L33" class="ln">    33&nbsp;&nbsp;</span>// func memmove(to, from unsafe.Pointer, n uintptr)
<span id="L34" class="ln">    34&nbsp;&nbsp;</span>// ABIInternal for performance.
<span id="L35" class="ln">    35&nbsp;&nbsp;</span>TEXT runtime·memmove&lt;ABIInternal&gt;(SB), NOSPLIT, $0-24
<span id="L36" class="ln">    36&nbsp;&nbsp;</span>	// AX = to
<span id="L37" class="ln">    37&nbsp;&nbsp;</span>	// BX = from
<span id="L38" class="ln">    38&nbsp;&nbsp;</span>	// CX = n
<span id="L39" class="ln">    39&nbsp;&nbsp;</span>	MOVQ	AX, DI
<span id="L40" class="ln">    40&nbsp;&nbsp;</span>	MOVQ	BX, SI
<span id="L41" class="ln">    41&nbsp;&nbsp;</span>	MOVQ	CX, BX
<span id="L42" class="ln">    42&nbsp;&nbsp;</span>
<span id="L43" class="ln">    43&nbsp;&nbsp;</span>	// REP instructions have a high startup cost, so we handle small sizes
<span id="L44" class="ln">    44&nbsp;&nbsp;</span>	// with some straightline code. The REP MOVSQ instruction is really fast
<span id="L45" class="ln">    45&nbsp;&nbsp;</span>	// for large sizes. The cutover is approximately 2K.
<span id="L46" class="ln">    46&nbsp;&nbsp;</span>tail:
<span id="L47" class="ln">    47&nbsp;&nbsp;</span>	// move_129through256 or smaller work whether or not the source and the
<span id="L48" class="ln">    48&nbsp;&nbsp;</span>	// destination memory regions overlap because they load all data into
<span id="L49" class="ln">    49&nbsp;&nbsp;</span>	// registers before writing it back.  move_256through2048 on the other
<span id="L50" class="ln">    50&nbsp;&nbsp;</span>	// hand can be used only when the memory regions don&#39;t overlap or the copy
<span id="L51" class="ln">    51&nbsp;&nbsp;</span>	// direction is forward.
<span id="L52" class="ln">    52&nbsp;&nbsp;</span>	//
<span id="L53" class="ln">    53&nbsp;&nbsp;</span>	// BSR+branch table make almost all memmove/memclr benchmarks worse. Not worth doing.
<span id="L54" class="ln">    54&nbsp;&nbsp;</span>	TESTQ	BX, BX
<span id="L55" class="ln">    55&nbsp;&nbsp;</span>	JEQ	move_0
<span id="L56" class="ln">    56&nbsp;&nbsp;</span>	CMPQ	BX, $2
<span id="L57" class="ln">    57&nbsp;&nbsp;</span>	JBE	move_1or2
<span id="L58" class="ln">    58&nbsp;&nbsp;</span>	CMPQ	BX, $4
<span id="L59" class="ln">    59&nbsp;&nbsp;</span>	JB	move_3
<span id="L60" class="ln">    60&nbsp;&nbsp;</span>	JBE	move_4
<span id="L61" class="ln">    61&nbsp;&nbsp;</span>	CMPQ	BX, $8
<span id="L62" class="ln">    62&nbsp;&nbsp;</span>	JB	move_5through7
<span id="L63" class="ln">    63&nbsp;&nbsp;</span>	JE	move_8
<span id="L64" class="ln">    64&nbsp;&nbsp;</span>	CMPQ	BX, $16
<span id="L65" class="ln">    65&nbsp;&nbsp;</span>	JBE	move_9through16
<span id="L66" class="ln">    66&nbsp;&nbsp;</span>	CMPQ	BX, $32
<span id="L67" class="ln">    67&nbsp;&nbsp;</span>	JBE	move_17through32
<span id="L68" class="ln">    68&nbsp;&nbsp;</span>	CMPQ	BX, $64
<span id="L69" class="ln">    69&nbsp;&nbsp;</span>	JBE	move_33through64
<span id="L70" class="ln">    70&nbsp;&nbsp;</span>	CMPQ	BX, $128
<span id="L71" class="ln">    71&nbsp;&nbsp;</span>	JBE	move_65through128
<span id="L72" class="ln">    72&nbsp;&nbsp;</span>	CMPQ	BX, $256
<span id="L73" class="ln">    73&nbsp;&nbsp;</span>	JBE	move_129through256
<span id="L74" class="ln">    74&nbsp;&nbsp;</span>
<span id="L75" class="ln">    75&nbsp;&nbsp;</span>	MOVB	runtime·memmoveBits(SB), AX
<span id="L76" class="ln">    76&nbsp;&nbsp;</span>	// We have AVX but we don&#39;t want to use REP MOVSx.
<span id="L77" class="ln">    77&nbsp;&nbsp;</span>	CMPB	AX, $const_avxSupported
<span id="L78" class="ln">    78&nbsp;&nbsp;</span>	JEQ	avxUnaligned
<span id="L79" class="ln">    79&nbsp;&nbsp;</span>/*
<span id="L80" class="ln">    80&nbsp;&nbsp;</span> * check and set for backwards
<span id="L81" class="ln">    81&nbsp;&nbsp;</span> */
<span id="L82" class="ln">    82&nbsp;&nbsp;</span>	CMPQ	SI, DI
<span id="L83" class="ln">    83&nbsp;&nbsp;</span>	JLS	back
<span id="L84" class="ln">    84&nbsp;&nbsp;</span>
<span id="L85" class="ln">    85&nbsp;&nbsp;</span>/*
<span id="L86" class="ln">    86&nbsp;&nbsp;</span>* forward copy loop
<span id="L87" class="ln">    87&nbsp;&nbsp;</span>*/
<span id="L88" class="ln">    88&nbsp;&nbsp;</span>forward:
<span id="L89" class="ln">    89&nbsp;&nbsp;</span>	CMPQ	BX, $2048
<span id="L90" class="ln">    90&nbsp;&nbsp;</span>	JL	check_avx
<span id="L91" class="ln">    91&nbsp;&nbsp;</span>	// REP MOVSx is slow if destination address is unaligned.
<span id="L92" class="ln">    92&nbsp;&nbsp;</span>	TESTQ	$15,DI
<span id="L93" class="ln">    93&nbsp;&nbsp;</span>	JNZ	check_avx
<span id="L94" class="ln">    94&nbsp;&nbsp;</span>	TESTB	$const_repmovsPreferred, AX
<span id="L95" class="ln">    95&nbsp;&nbsp;</span>	JNZ	fwdBy8
<span id="L96" class="ln">    96&nbsp;&nbsp;</span>	// For backward copy, REP MOVSx performs worse than avx.
<span id="L97" class="ln">    97&nbsp;&nbsp;</span>check_avx:
<span id="L98" class="ln">    98&nbsp;&nbsp;</span>	TESTB	$const_avxSupported, AX
<span id="L99" class="ln">    99&nbsp;&nbsp;</span>	JNZ	avxUnaligned
<span id="L100" class="ln">   100&nbsp;&nbsp;</span>
<span id="L101" class="ln">   101&nbsp;&nbsp;</span>	CMPQ	BX, $2048
<span id="L102" class="ln">   102&nbsp;&nbsp;</span>	JLS	move_256through2048
<span id="L103" class="ln">   103&nbsp;&nbsp;</span>	// Check alignment
<span id="L104" class="ln">   104&nbsp;&nbsp;</span>	MOVL	SI, AX
<span id="L105" class="ln">   105&nbsp;&nbsp;</span>	ORL	DI, AX
<span id="L106" class="ln">   106&nbsp;&nbsp;</span>	TESTL	$7, AX
<span id="L107" class="ln">   107&nbsp;&nbsp;</span>	JEQ	fwdBy8
<span id="L108" class="ln">   108&nbsp;&nbsp;</span>
<span id="L109" class="ln">   109&nbsp;&nbsp;</span>	// Do 1 byte at a time
<span id="L110" class="ln">   110&nbsp;&nbsp;</span>	MOVQ	BX, CX
<span id="L111" class="ln">   111&nbsp;&nbsp;</span>	REP;	MOVSB
<span id="L112" class="ln">   112&nbsp;&nbsp;</span>	RET
<span id="L113" class="ln">   113&nbsp;&nbsp;</span>
<span id="L114" class="ln">   114&nbsp;&nbsp;</span>fwdBy8:
<span id="L115" class="ln">   115&nbsp;&nbsp;</span>	// Loading the last (possibly partially overlapping) word and writing
<span id="L116" class="ln">   116&nbsp;&nbsp;</span>	// it at the end.
<span id="L117" class="ln">   117&nbsp;&nbsp;</span>	MOVQ	-8(SI)(BX*1), AX
<span id="L118" class="ln">   118&nbsp;&nbsp;</span>	LEAQ	-8(DI)(BX*1), DX
<span id="L119" class="ln">   119&nbsp;&nbsp;</span>	// Do 8 bytes at a time
<span id="L120" class="ln">   120&nbsp;&nbsp;</span>	LEAQ 	-1(BX),CX
<span id="L121" class="ln">   121&nbsp;&nbsp;</span>	SHRQ	$3, CX
<span id="L122" class="ln">   122&nbsp;&nbsp;</span>	REP;	MOVSQ
<span id="L123" class="ln">   123&nbsp;&nbsp;</span>	MOVQ	AX, (DX)
<span id="L124" class="ln">   124&nbsp;&nbsp;</span>	RET
<span id="L125" class="ln">   125&nbsp;&nbsp;</span>
<span id="L126" class="ln">   126&nbsp;&nbsp;</span>back:
<span id="L127" class="ln">   127&nbsp;&nbsp;</span>/*
<span id="L128" class="ln">   128&nbsp;&nbsp;</span> * check overlap
<span id="L129" class="ln">   129&nbsp;&nbsp;</span> */
<span id="L130" class="ln">   130&nbsp;&nbsp;</span>	MOVQ	SI, CX
<span id="L131" class="ln">   131&nbsp;&nbsp;</span>	ADDQ	BX, CX
<span id="L132" class="ln">   132&nbsp;&nbsp;</span>	CMPQ	CX, DI
<span id="L133" class="ln">   133&nbsp;&nbsp;</span>	JLS	forward
<span id="L134" class="ln">   134&nbsp;&nbsp;</span>
<span id="L135" class="ln">   135&nbsp;&nbsp;</span>	TESTB	$const_avxSupported, AX
<span id="L136" class="ln">   136&nbsp;&nbsp;</span>	JNZ	avxUnaligned
<span id="L137" class="ln">   137&nbsp;&nbsp;</span>/*
<span id="L138" class="ln">   138&nbsp;&nbsp;</span> * whole thing backwards has
<span id="L139" class="ln">   139&nbsp;&nbsp;</span> * adjusted addresses
<span id="L140" class="ln">   140&nbsp;&nbsp;</span> */
<span id="L141" class="ln">   141&nbsp;&nbsp;</span>	ADDQ	BX, DI
<span id="L142" class="ln">   142&nbsp;&nbsp;</span>	ADDQ	BX, SI
<span id="L143" class="ln">   143&nbsp;&nbsp;</span>	STD
<span id="L144" class="ln">   144&nbsp;&nbsp;</span>
<span id="L145" class="ln">   145&nbsp;&nbsp;</span>/*
<span id="L146" class="ln">   146&nbsp;&nbsp;</span> * copy
<span id="L147" class="ln">   147&nbsp;&nbsp;</span> */
<span id="L148" class="ln">   148&nbsp;&nbsp;</span>	MOVQ	BX, CX
<span id="L149" class="ln">   149&nbsp;&nbsp;</span>	SHRQ	$3, CX
<span id="L150" class="ln">   150&nbsp;&nbsp;</span>	ANDQ	$7, BX
<span id="L151" class="ln">   151&nbsp;&nbsp;</span>
<span id="L152" class="ln">   152&nbsp;&nbsp;</span>	SUBQ	$8, DI
<span id="L153" class="ln">   153&nbsp;&nbsp;</span>	SUBQ	$8, SI
<span id="L154" class="ln">   154&nbsp;&nbsp;</span>	REP;	MOVSQ
<span id="L155" class="ln">   155&nbsp;&nbsp;</span>
<span id="L156" class="ln">   156&nbsp;&nbsp;</span>	CLD
<span id="L157" class="ln">   157&nbsp;&nbsp;</span>	ADDQ	$8, DI
<span id="L158" class="ln">   158&nbsp;&nbsp;</span>	ADDQ	$8, SI
<span id="L159" class="ln">   159&nbsp;&nbsp;</span>	SUBQ	BX, DI
<span id="L160" class="ln">   160&nbsp;&nbsp;</span>	SUBQ	BX, SI
<span id="L161" class="ln">   161&nbsp;&nbsp;</span>	JMP	tail
<span id="L162" class="ln">   162&nbsp;&nbsp;</span>
<span id="L163" class="ln">   163&nbsp;&nbsp;</span>move_1or2:
<span id="L164" class="ln">   164&nbsp;&nbsp;</span>	MOVB	(SI), AX
<span id="L165" class="ln">   165&nbsp;&nbsp;</span>	MOVB	-1(SI)(BX*1), CX
<span id="L166" class="ln">   166&nbsp;&nbsp;</span>	MOVB	AX, (DI)
<span id="L167" class="ln">   167&nbsp;&nbsp;</span>	MOVB	CX, -1(DI)(BX*1)
<span id="L168" class="ln">   168&nbsp;&nbsp;</span>	RET
<span id="L169" class="ln">   169&nbsp;&nbsp;</span>move_0:
<span id="L170" class="ln">   170&nbsp;&nbsp;</span>	RET
<span id="L171" class="ln">   171&nbsp;&nbsp;</span>move_4:
<span id="L172" class="ln">   172&nbsp;&nbsp;</span>	MOVL	(SI), AX
<span id="L173" class="ln">   173&nbsp;&nbsp;</span>	MOVL	AX, (DI)
<span id="L174" class="ln">   174&nbsp;&nbsp;</span>	RET
<span id="L175" class="ln">   175&nbsp;&nbsp;</span>move_3:
<span id="L176" class="ln">   176&nbsp;&nbsp;</span>	MOVW	(SI), AX
<span id="L177" class="ln">   177&nbsp;&nbsp;</span>	MOVB	2(SI), CX
<span id="L178" class="ln">   178&nbsp;&nbsp;</span>	MOVW	AX, (DI)
<span id="L179" class="ln">   179&nbsp;&nbsp;</span>	MOVB	CX, 2(DI)
<span id="L180" class="ln">   180&nbsp;&nbsp;</span>	RET
<span id="L181" class="ln">   181&nbsp;&nbsp;</span>move_5through7:
<span id="L182" class="ln">   182&nbsp;&nbsp;</span>	MOVL	(SI), AX
<span id="L183" class="ln">   183&nbsp;&nbsp;</span>	MOVL	-4(SI)(BX*1), CX
<span id="L184" class="ln">   184&nbsp;&nbsp;</span>	MOVL	AX, (DI)
<span id="L185" class="ln">   185&nbsp;&nbsp;</span>	MOVL	CX, -4(DI)(BX*1)
<span id="L186" class="ln">   186&nbsp;&nbsp;</span>	RET
<span id="L187" class="ln">   187&nbsp;&nbsp;</span>move_8:
<span id="L188" class="ln">   188&nbsp;&nbsp;</span>	// We need a separate case for 8 to make sure we write pointers atomically.
<span id="L189" class="ln">   189&nbsp;&nbsp;</span>	MOVQ	(SI), AX
<span id="L190" class="ln">   190&nbsp;&nbsp;</span>	MOVQ	AX, (DI)
<span id="L191" class="ln">   191&nbsp;&nbsp;</span>	RET
<span id="L192" class="ln">   192&nbsp;&nbsp;</span>move_9through16:
<span id="L193" class="ln">   193&nbsp;&nbsp;</span>	MOVQ	(SI), AX
<span id="L194" class="ln">   194&nbsp;&nbsp;</span>	MOVQ	-8(SI)(BX*1), CX
<span id="L195" class="ln">   195&nbsp;&nbsp;</span>	MOVQ	AX, (DI)
<span id="L196" class="ln">   196&nbsp;&nbsp;</span>	MOVQ	CX, -8(DI)(BX*1)
<span id="L197" class="ln">   197&nbsp;&nbsp;</span>	RET
<span id="L198" class="ln">   198&nbsp;&nbsp;</span>move_17through32:
<span id="L199" class="ln">   199&nbsp;&nbsp;</span>	MOVOU	(SI), X0
<span id="L200" class="ln">   200&nbsp;&nbsp;</span>	MOVOU	-16(SI)(BX*1), X1
<span id="L201" class="ln">   201&nbsp;&nbsp;</span>	MOVOU	X0, (DI)
<span id="L202" class="ln">   202&nbsp;&nbsp;</span>	MOVOU	X1, -16(DI)(BX*1)
<span id="L203" class="ln">   203&nbsp;&nbsp;</span>	RET
<span id="L204" class="ln">   204&nbsp;&nbsp;</span>move_33through64:
<span id="L205" class="ln">   205&nbsp;&nbsp;</span>	MOVOU	(SI), X0
<span id="L206" class="ln">   206&nbsp;&nbsp;</span>	MOVOU	16(SI), X1
<span id="L207" class="ln">   207&nbsp;&nbsp;</span>	MOVOU	-32(SI)(BX*1), X2
<span id="L208" class="ln">   208&nbsp;&nbsp;</span>	MOVOU	-16(SI)(BX*1), X3
<span id="L209" class="ln">   209&nbsp;&nbsp;</span>	MOVOU	X0, (DI)
<span id="L210" class="ln">   210&nbsp;&nbsp;</span>	MOVOU	X1, 16(DI)
<span id="L211" class="ln">   211&nbsp;&nbsp;</span>	MOVOU	X2, -32(DI)(BX*1)
<span id="L212" class="ln">   212&nbsp;&nbsp;</span>	MOVOU	X3, -16(DI)(BX*1)
<span id="L213" class="ln">   213&nbsp;&nbsp;</span>	RET
<span id="L214" class="ln">   214&nbsp;&nbsp;</span>move_65through128:
<span id="L215" class="ln">   215&nbsp;&nbsp;</span>	MOVOU	(SI), X0
<span id="L216" class="ln">   216&nbsp;&nbsp;</span>	MOVOU	16(SI), X1
<span id="L217" class="ln">   217&nbsp;&nbsp;</span>	MOVOU	32(SI), X2
<span id="L218" class="ln">   218&nbsp;&nbsp;</span>	MOVOU	48(SI), X3
<span id="L219" class="ln">   219&nbsp;&nbsp;</span>	MOVOU	-64(SI)(BX*1), X4
<span id="L220" class="ln">   220&nbsp;&nbsp;</span>	MOVOU	-48(SI)(BX*1), X5
<span id="L221" class="ln">   221&nbsp;&nbsp;</span>	MOVOU	-32(SI)(BX*1), X6
<span id="L222" class="ln">   222&nbsp;&nbsp;</span>	MOVOU	-16(SI)(BX*1), X7
<span id="L223" class="ln">   223&nbsp;&nbsp;</span>	MOVOU	X0, (DI)
<span id="L224" class="ln">   224&nbsp;&nbsp;</span>	MOVOU	X1, 16(DI)
<span id="L225" class="ln">   225&nbsp;&nbsp;</span>	MOVOU	X2, 32(DI)
<span id="L226" class="ln">   226&nbsp;&nbsp;</span>	MOVOU	X3, 48(DI)
<span id="L227" class="ln">   227&nbsp;&nbsp;</span>	MOVOU	X4, -64(DI)(BX*1)
<span id="L228" class="ln">   228&nbsp;&nbsp;</span>	MOVOU	X5, -48(DI)(BX*1)
<span id="L229" class="ln">   229&nbsp;&nbsp;</span>	MOVOU	X6, -32(DI)(BX*1)
<span id="L230" class="ln">   230&nbsp;&nbsp;</span>	MOVOU	X7, -16(DI)(BX*1)
<span id="L231" class="ln">   231&nbsp;&nbsp;</span>	RET
<span id="L232" class="ln">   232&nbsp;&nbsp;</span>move_129through256:
<span id="L233" class="ln">   233&nbsp;&nbsp;</span>	MOVOU	(SI), X0
<span id="L234" class="ln">   234&nbsp;&nbsp;</span>	MOVOU	16(SI), X1
<span id="L235" class="ln">   235&nbsp;&nbsp;</span>	MOVOU	32(SI), X2
<span id="L236" class="ln">   236&nbsp;&nbsp;</span>	MOVOU	48(SI), X3
<span id="L237" class="ln">   237&nbsp;&nbsp;</span>	MOVOU	64(SI), X4
<span id="L238" class="ln">   238&nbsp;&nbsp;</span>	MOVOU	80(SI), X5
<span id="L239" class="ln">   239&nbsp;&nbsp;</span>	MOVOU	96(SI), X6
<span id="L240" class="ln">   240&nbsp;&nbsp;</span>	MOVOU	112(SI), X7
<span id="L241" class="ln">   241&nbsp;&nbsp;</span>	MOVOU	-128(SI)(BX*1), X8
<span id="L242" class="ln">   242&nbsp;&nbsp;</span>	MOVOU	-112(SI)(BX*1), X9
<span id="L243" class="ln">   243&nbsp;&nbsp;</span>	MOVOU	-96(SI)(BX*1), X10
<span id="L244" class="ln">   244&nbsp;&nbsp;</span>	MOVOU	-80(SI)(BX*1), X11
<span id="L245" class="ln">   245&nbsp;&nbsp;</span>	MOVOU	-64(SI)(BX*1), X12
<span id="L246" class="ln">   246&nbsp;&nbsp;</span>	MOVOU	-48(SI)(BX*1), X13
<span id="L247" class="ln">   247&nbsp;&nbsp;</span>	MOVOU	-32(SI)(BX*1), X14
<span id="L248" class="ln">   248&nbsp;&nbsp;</span>	MOVOU	-16(SI)(BX*1), X15
<span id="L249" class="ln">   249&nbsp;&nbsp;</span>	MOVOU	X0, (DI)
<span id="L250" class="ln">   250&nbsp;&nbsp;</span>	MOVOU	X1, 16(DI)
<span id="L251" class="ln">   251&nbsp;&nbsp;</span>	MOVOU	X2, 32(DI)
<span id="L252" class="ln">   252&nbsp;&nbsp;</span>	MOVOU	X3, 48(DI)
<span id="L253" class="ln">   253&nbsp;&nbsp;</span>	MOVOU	X4, 64(DI)
<span id="L254" class="ln">   254&nbsp;&nbsp;</span>	MOVOU	X5, 80(DI)
<span id="L255" class="ln">   255&nbsp;&nbsp;</span>	MOVOU	X6, 96(DI)
<span id="L256" class="ln">   256&nbsp;&nbsp;</span>	MOVOU	X7, 112(DI)
<span id="L257" class="ln">   257&nbsp;&nbsp;</span>	MOVOU	X8, -128(DI)(BX*1)
<span id="L258" class="ln">   258&nbsp;&nbsp;</span>	MOVOU	X9, -112(DI)(BX*1)
<span id="L259" class="ln">   259&nbsp;&nbsp;</span>	MOVOU	X10, -96(DI)(BX*1)
<span id="L260" class="ln">   260&nbsp;&nbsp;</span>	MOVOU	X11, -80(DI)(BX*1)
<span id="L261" class="ln">   261&nbsp;&nbsp;</span>	MOVOU	X12, -64(DI)(BX*1)
<span id="L262" class="ln">   262&nbsp;&nbsp;</span>	MOVOU	X13, -48(DI)(BX*1)
<span id="L263" class="ln">   263&nbsp;&nbsp;</span>	MOVOU	X14, -32(DI)(BX*1)
<span id="L264" class="ln">   264&nbsp;&nbsp;</span>	MOVOU	X15, -16(DI)(BX*1)
<span id="L265" class="ln">   265&nbsp;&nbsp;</span>	// X15 must be zero on return
<span id="L266" class="ln">   266&nbsp;&nbsp;</span>	PXOR	X15, X15
<span id="L267" class="ln">   267&nbsp;&nbsp;</span>	RET
<span id="L268" class="ln">   268&nbsp;&nbsp;</span>move_256through2048:
<span id="L269" class="ln">   269&nbsp;&nbsp;</span>	SUBQ	$256, BX
<span id="L270" class="ln">   270&nbsp;&nbsp;</span>	MOVOU	(SI), X0
<span id="L271" class="ln">   271&nbsp;&nbsp;</span>	MOVOU	16(SI), X1
<span id="L272" class="ln">   272&nbsp;&nbsp;</span>	MOVOU	32(SI), X2
<span id="L273" class="ln">   273&nbsp;&nbsp;</span>	MOVOU	48(SI), X3
<span id="L274" class="ln">   274&nbsp;&nbsp;</span>	MOVOU	64(SI), X4
<span id="L275" class="ln">   275&nbsp;&nbsp;</span>	MOVOU	80(SI), X5
<span id="L276" class="ln">   276&nbsp;&nbsp;</span>	MOVOU	96(SI), X6
<span id="L277" class="ln">   277&nbsp;&nbsp;</span>	MOVOU	112(SI), X7
<span id="L278" class="ln">   278&nbsp;&nbsp;</span>	MOVOU	128(SI), X8
<span id="L279" class="ln">   279&nbsp;&nbsp;</span>	MOVOU	144(SI), X9
<span id="L280" class="ln">   280&nbsp;&nbsp;</span>	MOVOU	160(SI), X10
<span id="L281" class="ln">   281&nbsp;&nbsp;</span>	MOVOU	176(SI), X11
<span id="L282" class="ln">   282&nbsp;&nbsp;</span>	MOVOU	192(SI), X12
<span id="L283" class="ln">   283&nbsp;&nbsp;</span>	MOVOU	208(SI), X13
<span id="L284" class="ln">   284&nbsp;&nbsp;</span>	MOVOU	224(SI), X14
<span id="L285" class="ln">   285&nbsp;&nbsp;</span>	MOVOU	240(SI), X15
<span id="L286" class="ln">   286&nbsp;&nbsp;</span>	MOVOU	X0, (DI)
<span id="L287" class="ln">   287&nbsp;&nbsp;</span>	MOVOU	X1, 16(DI)
<span id="L288" class="ln">   288&nbsp;&nbsp;</span>	MOVOU	X2, 32(DI)
<span id="L289" class="ln">   289&nbsp;&nbsp;</span>	MOVOU	X3, 48(DI)
<span id="L290" class="ln">   290&nbsp;&nbsp;</span>	MOVOU	X4, 64(DI)
<span id="L291" class="ln">   291&nbsp;&nbsp;</span>	MOVOU	X5, 80(DI)
<span id="L292" class="ln">   292&nbsp;&nbsp;</span>	MOVOU	X6, 96(DI)
<span id="L293" class="ln">   293&nbsp;&nbsp;</span>	MOVOU	X7, 112(DI)
<span id="L294" class="ln">   294&nbsp;&nbsp;</span>	MOVOU	X8, 128(DI)
<span id="L295" class="ln">   295&nbsp;&nbsp;</span>	MOVOU	X9, 144(DI)
<span id="L296" class="ln">   296&nbsp;&nbsp;</span>	MOVOU	X10, 160(DI)
<span id="L297" class="ln">   297&nbsp;&nbsp;</span>	MOVOU	X11, 176(DI)
<span id="L298" class="ln">   298&nbsp;&nbsp;</span>	MOVOU	X12, 192(DI)
<span id="L299" class="ln">   299&nbsp;&nbsp;</span>	MOVOU	X13, 208(DI)
<span id="L300" class="ln">   300&nbsp;&nbsp;</span>	MOVOU	X14, 224(DI)
<span id="L301" class="ln">   301&nbsp;&nbsp;</span>	MOVOU	X15, 240(DI)
<span id="L302" class="ln">   302&nbsp;&nbsp;</span>	CMPQ	BX, $256
<span id="L303" class="ln">   303&nbsp;&nbsp;</span>	LEAQ	256(SI), SI
<span id="L304" class="ln">   304&nbsp;&nbsp;</span>	LEAQ	256(DI), DI
<span id="L305" class="ln">   305&nbsp;&nbsp;</span>	JGE	move_256through2048
<span id="L306" class="ln">   306&nbsp;&nbsp;</span>	// X15 must be zero on return
<span id="L307" class="ln">   307&nbsp;&nbsp;</span>	PXOR	X15, X15
<span id="L308" class="ln">   308&nbsp;&nbsp;</span>	JMP	tail
<span id="L309" class="ln">   309&nbsp;&nbsp;</span>
<span id="L310" class="ln">   310&nbsp;&nbsp;</span>avxUnaligned:
<span id="L311" class="ln">   311&nbsp;&nbsp;</span>	// There are two implementations of move algorithm.
<span id="L312" class="ln">   312&nbsp;&nbsp;</span>	// The first one for non-overlapped memory regions. It uses forward copying.
<span id="L313" class="ln">   313&nbsp;&nbsp;</span>	// The second one for overlapped regions. It uses backward copying
<span id="L314" class="ln">   314&nbsp;&nbsp;</span>	MOVQ	DI, CX
<span id="L315" class="ln">   315&nbsp;&nbsp;</span>	SUBQ	SI, CX
<span id="L316" class="ln">   316&nbsp;&nbsp;</span>	// Now CX contains distance between SRC and DEST
<span id="L317" class="ln">   317&nbsp;&nbsp;</span>	CMPQ	CX, BX
<span id="L318" class="ln">   318&nbsp;&nbsp;</span>	// If the distance lesser than region length it means that regions are overlapped
<span id="L319" class="ln">   319&nbsp;&nbsp;</span>	JC	copy_backward
<span id="L320" class="ln">   320&nbsp;&nbsp;</span>
<span id="L321" class="ln">   321&nbsp;&nbsp;</span>	// Non-temporal copy would be better for big sizes.
<span id="L322" class="ln">   322&nbsp;&nbsp;</span>	CMPQ	BX, $0x100000
<span id="L323" class="ln">   323&nbsp;&nbsp;</span>	JAE	gobble_big_data_fwd
<span id="L324" class="ln">   324&nbsp;&nbsp;</span>
<span id="L325" class="ln">   325&nbsp;&nbsp;</span>	// Memory layout on the source side
<span id="L326" class="ln">   326&nbsp;&nbsp;</span>	// SI                                       CX
<span id="L327" class="ln">   327&nbsp;&nbsp;</span>	// |&lt;---------BX before correction---------&gt;|
<span id="L328" class="ln">   328&nbsp;&nbsp;</span>	// |       |&lt;--BX corrected--&gt;|             |
<span id="L329" class="ln">   329&nbsp;&nbsp;</span>	// |       |                  |&lt;--- AX  ---&gt;|
<span id="L330" class="ln">   330&nbsp;&nbsp;</span>	// |&lt;-R11-&gt;|                  |&lt;-128 bytes-&gt;|
<span id="L331" class="ln">   331&nbsp;&nbsp;</span>	// +----------------------------------------+
<span id="L332" class="ln">   332&nbsp;&nbsp;</span>	// | Head  | Body             | Tail        |
<span id="L333" class="ln">   333&nbsp;&nbsp;</span>	// +-------+------------------+-------------+
<span id="L334" class="ln">   334&nbsp;&nbsp;</span>	// ^       ^                  ^
<span id="L335" class="ln">   335&nbsp;&nbsp;</span>	// |       |                  |
<span id="L336" class="ln">   336&nbsp;&nbsp;</span>	// Save head into Y4          Save tail into X5..X12
<span id="L337" class="ln">   337&nbsp;&nbsp;</span>	//         |
<span id="L338" class="ln">   338&nbsp;&nbsp;</span>	//         SI+R11, where R11 = ((DI &amp; -32) + 32) - DI
<span id="L339" class="ln">   339&nbsp;&nbsp;</span>	// Algorithm:
<span id="L340" class="ln">   340&nbsp;&nbsp;</span>	// 1. Unaligned save of the tail&#39;s 128 bytes
<span id="L341" class="ln">   341&nbsp;&nbsp;</span>	// 2. Unaligned save of the head&#39;s 32  bytes
<span id="L342" class="ln">   342&nbsp;&nbsp;</span>	// 3. Destination-aligned copying of body (128 bytes per iteration)
<span id="L343" class="ln">   343&nbsp;&nbsp;</span>	// 4. Put head on the new place
<span id="L344" class="ln">   344&nbsp;&nbsp;</span>	// 5. Put the tail on the new place
<span id="L345" class="ln">   345&nbsp;&nbsp;</span>	// It can be important to satisfy processor&#39;s pipeline requirements for
<span id="L346" class="ln">   346&nbsp;&nbsp;</span>	// small sizes as the cost of unaligned memory region copying is
<span id="L347" class="ln">   347&nbsp;&nbsp;</span>	// comparable with the cost of main loop. So code is slightly messed there.
<span id="L348" class="ln">   348&nbsp;&nbsp;</span>	// There is more clean implementation of that algorithm for bigger sizes
<span id="L349" class="ln">   349&nbsp;&nbsp;</span>	// where the cost of unaligned part copying is negligible.
<span id="L350" class="ln">   350&nbsp;&nbsp;</span>	// You can see it after gobble_big_data_fwd label.
<span id="L351" class="ln">   351&nbsp;&nbsp;</span>	LEAQ	(SI)(BX*1), CX
<span id="L352" class="ln">   352&nbsp;&nbsp;</span>	MOVQ	DI, R10
<span id="L353" class="ln">   353&nbsp;&nbsp;</span>	// CX points to the end of buffer so we need go back slightly. We will use negative offsets there.
<span id="L354" class="ln">   354&nbsp;&nbsp;</span>	MOVOU	-0x80(CX), X5
<span id="L355" class="ln">   355&nbsp;&nbsp;</span>	MOVOU	-0x70(CX), X6
<span id="L356" class="ln">   356&nbsp;&nbsp;</span>	MOVQ	$0x80, AX
<span id="L357" class="ln">   357&nbsp;&nbsp;</span>	// Align destination address
<span id="L358" class="ln">   358&nbsp;&nbsp;</span>	ANDQ	$-32, DI
<span id="L359" class="ln">   359&nbsp;&nbsp;</span>	ADDQ	$32, DI
<span id="L360" class="ln">   360&nbsp;&nbsp;</span>	// Continue tail saving.
<span id="L361" class="ln">   361&nbsp;&nbsp;</span>	MOVOU	-0x60(CX), X7
<span id="L362" class="ln">   362&nbsp;&nbsp;</span>	MOVOU	-0x50(CX), X8
<span id="L363" class="ln">   363&nbsp;&nbsp;</span>	// Make R11 delta between aligned and unaligned destination addresses.
<span id="L364" class="ln">   364&nbsp;&nbsp;</span>	MOVQ	DI, R11
<span id="L365" class="ln">   365&nbsp;&nbsp;</span>	SUBQ	R10, R11
<span id="L366" class="ln">   366&nbsp;&nbsp;</span>	// Continue tail saving.
<span id="L367" class="ln">   367&nbsp;&nbsp;</span>	MOVOU	-0x40(CX), X9
<span id="L368" class="ln">   368&nbsp;&nbsp;</span>	MOVOU	-0x30(CX), X10
<span id="L369" class="ln">   369&nbsp;&nbsp;</span>	// Let&#39;s make bytes-to-copy value adjusted as we&#39;ve prepared unaligned part for copying.
<span id="L370" class="ln">   370&nbsp;&nbsp;</span>	SUBQ	R11, BX
<span id="L371" class="ln">   371&nbsp;&nbsp;</span>	// Continue tail saving.
<span id="L372" class="ln">   372&nbsp;&nbsp;</span>	MOVOU	-0x20(CX), X11
<span id="L373" class="ln">   373&nbsp;&nbsp;</span>	MOVOU	-0x10(CX), X12
<span id="L374" class="ln">   374&nbsp;&nbsp;</span>	// The tail will be put on its place after main body copying.
<span id="L375" class="ln">   375&nbsp;&nbsp;</span>	// It&#39;s time for the unaligned heading part.
<span id="L376" class="ln">   376&nbsp;&nbsp;</span>	VMOVDQU	(SI), Y4
<span id="L377" class="ln">   377&nbsp;&nbsp;</span>	// Adjust source address to point past head.
<span id="L378" class="ln">   378&nbsp;&nbsp;</span>	ADDQ	R11, SI
<span id="L379" class="ln">   379&nbsp;&nbsp;</span>	SUBQ	AX, BX
<span id="L380" class="ln">   380&nbsp;&nbsp;</span>	// Aligned memory copying there
<span id="L381" class="ln">   381&nbsp;&nbsp;</span>gobble_128_loop:
<span id="L382" class="ln">   382&nbsp;&nbsp;</span>	VMOVDQU	(SI), Y0
<span id="L383" class="ln">   383&nbsp;&nbsp;</span>	VMOVDQU	0x20(SI), Y1
<span id="L384" class="ln">   384&nbsp;&nbsp;</span>	VMOVDQU	0x40(SI), Y2
<span id="L385" class="ln">   385&nbsp;&nbsp;</span>	VMOVDQU	0x60(SI), Y3
<span id="L386" class="ln">   386&nbsp;&nbsp;</span>	ADDQ	AX, SI
<span id="L387" class="ln">   387&nbsp;&nbsp;</span>	VMOVDQA	Y0, (DI)
<span id="L388" class="ln">   388&nbsp;&nbsp;</span>	VMOVDQA	Y1, 0x20(DI)
<span id="L389" class="ln">   389&nbsp;&nbsp;</span>	VMOVDQA	Y2, 0x40(DI)
<span id="L390" class="ln">   390&nbsp;&nbsp;</span>	VMOVDQA	Y3, 0x60(DI)
<span id="L391" class="ln">   391&nbsp;&nbsp;</span>	ADDQ	AX, DI
<span id="L392" class="ln">   392&nbsp;&nbsp;</span>	SUBQ	AX, BX
<span id="L393" class="ln">   393&nbsp;&nbsp;</span>	JA	gobble_128_loop
<span id="L394" class="ln">   394&nbsp;&nbsp;</span>	// Now we can store unaligned parts.
<span id="L395" class="ln">   395&nbsp;&nbsp;</span>	ADDQ	AX, BX
<span id="L396" class="ln">   396&nbsp;&nbsp;</span>	ADDQ	DI, BX
<span id="L397" class="ln">   397&nbsp;&nbsp;</span>	VMOVDQU	Y4, (R10)
<span id="L398" class="ln">   398&nbsp;&nbsp;</span>	VZEROUPPER
<span id="L399" class="ln">   399&nbsp;&nbsp;</span>	MOVOU	X5, -0x80(BX)
<span id="L400" class="ln">   400&nbsp;&nbsp;</span>	MOVOU	X6, -0x70(BX)
<span id="L401" class="ln">   401&nbsp;&nbsp;</span>	MOVOU	X7, -0x60(BX)
<span id="L402" class="ln">   402&nbsp;&nbsp;</span>	MOVOU	X8, -0x50(BX)
<span id="L403" class="ln">   403&nbsp;&nbsp;</span>	MOVOU	X9, -0x40(BX)
<span id="L404" class="ln">   404&nbsp;&nbsp;</span>	MOVOU	X10, -0x30(BX)
<span id="L405" class="ln">   405&nbsp;&nbsp;</span>	MOVOU	X11, -0x20(BX)
<span id="L406" class="ln">   406&nbsp;&nbsp;</span>	MOVOU	X12, -0x10(BX)
<span id="L407" class="ln">   407&nbsp;&nbsp;</span>	RET
<span id="L408" class="ln">   408&nbsp;&nbsp;</span>
<span id="L409" class="ln">   409&nbsp;&nbsp;</span>gobble_big_data_fwd:
<span id="L410" class="ln">   410&nbsp;&nbsp;</span>	// There is forward copying for big regions.
<span id="L411" class="ln">   411&nbsp;&nbsp;</span>	// It uses non-temporal mov instructions.
<span id="L412" class="ln">   412&nbsp;&nbsp;</span>	// Details of this algorithm are commented previously for small sizes.
<span id="L413" class="ln">   413&nbsp;&nbsp;</span>	LEAQ	(SI)(BX*1), CX
<span id="L414" class="ln">   414&nbsp;&nbsp;</span>	MOVOU	-0x80(SI)(BX*1), X5
<span id="L415" class="ln">   415&nbsp;&nbsp;</span>	MOVOU	-0x70(CX), X6
<span id="L416" class="ln">   416&nbsp;&nbsp;</span>	MOVOU	-0x60(CX), X7
<span id="L417" class="ln">   417&nbsp;&nbsp;</span>	MOVOU	-0x50(CX), X8
<span id="L418" class="ln">   418&nbsp;&nbsp;</span>	MOVOU	-0x40(CX), X9
<span id="L419" class="ln">   419&nbsp;&nbsp;</span>	MOVOU	-0x30(CX), X10
<span id="L420" class="ln">   420&nbsp;&nbsp;</span>	MOVOU	-0x20(CX), X11
<span id="L421" class="ln">   421&nbsp;&nbsp;</span>	MOVOU	-0x10(CX), X12
<span id="L422" class="ln">   422&nbsp;&nbsp;</span>	VMOVDQU	(SI), Y4
<span id="L423" class="ln">   423&nbsp;&nbsp;</span>	MOVQ	DI, R8
<span id="L424" class="ln">   424&nbsp;&nbsp;</span>	ANDQ	$-32, DI
<span id="L425" class="ln">   425&nbsp;&nbsp;</span>	ADDQ	$32, DI
<span id="L426" class="ln">   426&nbsp;&nbsp;</span>	MOVQ	DI, R10
<span id="L427" class="ln">   427&nbsp;&nbsp;</span>	SUBQ	R8, R10
<span id="L428" class="ln">   428&nbsp;&nbsp;</span>	SUBQ	R10, BX
<span id="L429" class="ln">   429&nbsp;&nbsp;</span>	ADDQ	R10, SI
<span id="L430" class="ln">   430&nbsp;&nbsp;</span>	LEAQ	(DI)(BX*1), CX
<span id="L431" class="ln">   431&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L432" class="ln">   432&nbsp;&nbsp;</span>gobble_mem_fwd_loop:
<span id="L433" class="ln">   433&nbsp;&nbsp;</span>	PREFETCHNTA 0x1C0(SI)
<span id="L434" class="ln">   434&nbsp;&nbsp;</span>	PREFETCHNTA 0x280(SI)
<span id="L435" class="ln">   435&nbsp;&nbsp;</span>	// Prefetch values were chosen empirically.
<span id="L436" class="ln">   436&nbsp;&nbsp;</span>	// Approach for prefetch usage as in 9.5.6 of [1]
<span id="L437" class="ln">   437&nbsp;&nbsp;</span>	// [1] 64-ia-32-architectures-optimization-manual.pdf
<span id="L438" class="ln">   438&nbsp;&nbsp;</span>	// https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
<span id="L439" class="ln">   439&nbsp;&nbsp;</span>	VMOVDQU	(SI), Y0
<span id="L440" class="ln">   440&nbsp;&nbsp;</span>	VMOVDQU	0x20(SI), Y1
<span id="L441" class="ln">   441&nbsp;&nbsp;</span>	VMOVDQU	0x40(SI), Y2
<span id="L442" class="ln">   442&nbsp;&nbsp;</span>	VMOVDQU	0x60(SI), Y3
<span id="L443" class="ln">   443&nbsp;&nbsp;</span>	ADDQ	$0x80, SI
<span id="L444" class="ln">   444&nbsp;&nbsp;</span>	VMOVNTDQ Y0, (DI)
<span id="L445" class="ln">   445&nbsp;&nbsp;</span>	VMOVNTDQ Y1, 0x20(DI)
<span id="L446" class="ln">   446&nbsp;&nbsp;</span>	VMOVNTDQ Y2, 0x40(DI)
<span id="L447" class="ln">   447&nbsp;&nbsp;</span>	VMOVNTDQ Y3, 0x60(DI)
<span id="L448" class="ln">   448&nbsp;&nbsp;</span>	ADDQ	$0x80, DI
<span id="L449" class="ln">   449&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L450" class="ln">   450&nbsp;&nbsp;</span>	JA		gobble_mem_fwd_loop
<span id="L451" class="ln">   451&nbsp;&nbsp;</span>	// NT instructions don&#39;t follow the normal cache-coherency rules.
<span id="L452" class="ln">   452&nbsp;&nbsp;</span>	// We need SFENCE there to make copied data available timely.
<span id="L453" class="ln">   453&nbsp;&nbsp;</span>	SFENCE
<span id="L454" class="ln">   454&nbsp;&nbsp;</span>	VMOVDQU	Y4, (R8)
<span id="L455" class="ln">   455&nbsp;&nbsp;</span>	VZEROUPPER
<span id="L456" class="ln">   456&nbsp;&nbsp;</span>	MOVOU	X5, -0x80(CX)
<span id="L457" class="ln">   457&nbsp;&nbsp;</span>	MOVOU	X6, -0x70(CX)
<span id="L458" class="ln">   458&nbsp;&nbsp;</span>	MOVOU	X7, -0x60(CX)
<span id="L459" class="ln">   459&nbsp;&nbsp;</span>	MOVOU	X8, -0x50(CX)
<span id="L460" class="ln">   460&nbsp;&nbsp;</span>	MOVOU	X9, -0x40(CX)
<span id="L461" class="ln">   461&nbsp;&nbsp;</span>	MOVOU	X10, -0x30(CX)
<span id="L462" class="ln">   462&nbsp;&nbsp;</span>	MOVOU	X11, -0x20(CX)
<span id="L463" class="ln">   463&nbsp;&nbsp;</span>	MOVOU	X12, -0x10(CX)
<span id="L464" class="ln">   464&nbsp;&nbsp;</span>	RET
<span id="L465" class="ln">   465&nbsp;&nbsp;</span>
<span id="L466" class="ln">   466&nbsp;&nbsp;</span>copy_backward:
<span id="L467" class="ln">   467&nbsp;&nbsp;</span>	MOVQ	DI, AX
<span id="L468" class="ln">   468&nbsp;&nbsp;</span>	// Backward copying is about the same as the forward one.
<span id="L469" class="ln">   469&nbsp;&nbsp;</span>	// Firstly we load unaligned tail in the beginning of region.
<span id="L470" class="ln">   470&nbsp;&nbsp;</span>	MOVOU	(SI), X5
<span id="L471" class="ln">   471&nbsp;&nbsp;</span>	MOVOU	0x10(SI), X6
<span id="L472" class="ln">   472&nbsp;&nbsp;</span>	ADDQ	BX, DI
<span id="L473" class="ln">   473&nbsp;&nbsp;</span>	MOVOU	0x20(SI), X7
<span id="L474" class="ln">   474&nbsp;&nbsp;</span>	MOVOU	0x30(SI), X8
<span id="L475" class="ln">   475&nbsp;&nbsp;</span>	LEAQ	-0x20(DI), R10
<span id="L476" class="ln">   476&nbsp;&nbsp;</span>	MOVQ	DI, R11
<span id="L477" class="ln">   477&nbsp;&nbsp;</span>	MOVOU	0x40(SI), X9
<span id="L478" class="ln">   478&nbsp;&nbsp;</span>	MOVOU	0x50(SI), X10
<span id="L479" class="ln">   479&nbsp;&nbsp;</span>	ANDQ	$0x1F, R11
<span id="L480" class="ln">   480&nbsp;&nbsp;</span>	MOVOU	0x60(SI), X11
<span id="L481" class="ln">   481&nbsp;&nbsp;</span>	MOVOU	0x70(SI), X12
<span id="L482" class="ln">   482&nbsp;&nbsp;</span>	XORQ	R11, DI
<span id="L483" class="ln">   483&nbsp;&nbsp;</span>	// Let&#39;s point SI to the end of region
<span id="L484" class="ln">   484&nbsp;&nbsp;</span>	ADDQ	BX, SI
<span id="L485" class="ln">   485&nbsp;&nbsp;</span>	// and load unaligned head into X4.
<span id="L486" class="ln">   486&nbsp;&nbsp;</span>	VMOVDQU	-0x20(SI), Y4
<span id="L487" class="ln">   487&nbsp;&nbsp;</span>	SUBQ	R11, SI
<span id="L488" class="ln">   488&nbsp;&nbsp;</span>	SUBQ	R11, BX
<span id="L489" class="ln">   489&nbsp;&nbsp;</span>	// If there is enough data for non-temporal moves go to special loop
<span id="L490" class="ln">   490&nbsp;&nbsp;</span>	CMPQ	BX, $0x100000
<span id="L491" class="ln">   491&nbsp;&nbsp;</span>	JA		gobble_big_data_bwd
<span id="L492" class="ln">   492&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L493" class="ln">   493&nbsp;&nbsp;</span>gobble_mem_bwd_loop:
<span id="L494" class="ln">   494&nbsp;&nbsp;</span>	VMOVDQU	-0x20(SI), Y0
<span id="L495" class="ln">   495&nbsp;&nbsp;</span>	VMOVDQU	-0x40(SI), Y1
<span id="L496" class="ln">   496&nbsp;&nbsp;</span>	VMOVDQU	-0x60(SI), Y2
<span id="L497" class="ln">   497&nbsp;&nbsp;</span>	VMOVDQU	-0x80(SI), Y3
<span id="L498" class="ln">   498&nbsp;&nbsp;</span>	SUBQ	$0x80, SI
<span id="L499" class="ln">   499&nbsp;&nbsp;</span>	VMOVDQA	Y0, -0x20(DI)
<span id="L500" class="ln">   500&nbsp;&nbsp;</span>	VMOVDQA	Y1, -0x40(DI)
<span id="L501" class="ln">   501&nbsp;&nbsp;</span>	VMOVDQA	Y2, -0x60(DI)
<span id="L502" class="ln">   502&nbsp;&nbsp;</span>	VMOVDQA	Y3, -0x80(DI)
<span id="L503" class="ln">   503&nbsp;&nbsp;</span>	SUBQ	$0x80, DI
<span id="L504" class="ln">   504&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L505" class="ln">   505&nbsp;&nbsp;</span>	JA		gobble_mem_bwd_loop
<span id="L506" class="ln">   506&nbsp;&nbsp;</span>	// Let&#39;s store unaligned data
<span id="L507" class="ln">   507&nbsp;&nbsp;</span>	VMOVDQU	Y4, (R10)
<span id="L508" class="ln">   508&nbsp;&nbsp;</span>	VZEROUPPER
<span id="L509" class="ln">   509&nbsp;&nbsp;</span>	MOVOU	X5, (AX)
<span id="L510" class="ln">   510&nbsp;&nbsp;</span>	MOVOU	X6, 0x10(AX)
<span id="L511" class="ln">   511&nbsp;&nbsp;</span>	MOVOU	X7, 0x20(AX)
<span id="L512" class="ln">   512&nbsp;&nbsp;</span>	MOVOU	X8, 0x30(AX)
<span id="L513" class="ln">   513&nbsp;&nbsp;</span>	MOVOU	X9, 0x40(AX)
<span id="L514" class="ln">   514&nbsp;&nbsp;</span>	MOVOU	X10, 0x50(AX)
<span id="L515" class="ln">   515&nbsp;&nbsp;</span>	MOVOU	X11, 0x60(AX)
<span id="L516" class="ln">   516&nbsp;&nbsp;</span>	MOVOU	X12, 0x70(AX)
<span id="L517" class="ln">   517&nbsp;&nbsp;</span>	RET
<span id="L518" class="ln">   518&nbsp;&nbsp;</span>
<span id="L519" class="ln">   519&nbsp;&nbsp;</span>gobble_big_data_bwd:
<span id="L520" class="ln">   520&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L521" class="ln">   521&nbsp;&nbsp;</span>gobble_big_mem_bwd_loop:
<span id="L522" class="ln">   522&nbsp;&nbsp;</span>	PREFETCHNTA -0x1C0(SI)
<span id="L523" class="ln">   523&nbsp;&nbsp;</span>	PREFETCHNTA -0x280(SI)
<span id="L524" class="ln">   524&nbsp;&nbsp;</span>	VMOVDQU	-0x20(SI), Y0
<span id="L525" class="ln">   525&nbsp;&nbsp;</span>	VMOVDQU	-0x40(SI), Y1
<span id="L526" class="ln">   526&nbsp;&nbsp;</span>	VMOVDQU	-0x60(SI), Y2
<span id="L527" class="ln">   527&nbsp;&nbsp;</span>	VMOVDQU	-0x80(SI), Y3
<span id="L528" class="ln">   528&nbsp;&nbsp;</span>	SUBQ	$0x80, SI
<span id="L529" class="ln">   529&nbsp;&nbsp;</span>	VMOVNTDQ	Y0, -0x20(DI)
<span id="L530" class="ln">   530&nbsp;&nbsp;</span>	VMOVNTDQ	Y1, -0x40(DI)
<span id="L531" class="ln">   531&nbsp;&nbsp;</span>	VMOVNTDQ	Y2, -0x60(DI)
<span id="L532" class="ln">   532&nbsp;&nbsp;</span>	VMOVNTDQ	Y3, -0x80(DI)
<span id="L533" class="ln">   533&nbsp;&nbsp;</span>	SUBQ	$0x80, DI
<span id="L534" class="ln">   534&nbsp;&nbsp;</span>	SUBQ	$0x80, BX
<span id="L535" class="ln">   535&nbsp;&nbsp;</span>	JA	gobble_big_mem_bwd_loop
<span id="L536" class="ln">   536&nbsp;&nbsp;</span>	SFENCE
<span id="L537" class="ln">   537&nbsp;&nbsp;</span>	VMOVDQU	Y4, (R10)
<span id="L538" class="ln">   538&nbsp;&nbsp;</span>	VZEROUPPER
<span id="L539" class="ln">   539&nbsp;&nbsp;</span>	MOVOU	X5, (AX)
<span id="L540" class="ln">   540&nbsp;&nbsp;</span>	MOVOU	X6, 0x10(AX)
<span id="L541" class="ln">   541&nbsp;&nbsp;</span>	MOVOU	X7, 0x20(AX)
<span id="L542" class="ln">   542&nbsp;&nbsp;</span>	MOVOU	X8, 0x30(AX)
<span id="L543" class="ln">   543&nbsp;&nbsp;</span>	MOVOU	X9, 0x40(AX)
<span id="L544" class="ln">   544&nbsp;&nbsp;</span>	MOVOU	X10, 0x50(AX)
<span id="L545" class="ln">   545&nbsp;&nbsp;</span>	MOVOU	X11, 0x60(AX)
<span id="L546" class="ln">   546&nbsp;&nbsp;</span>	MOVOU	X12, 0x70(AX)
<span id="L547" class="ln">   547&nbsp;&nbsp;</span>	RET
<span id="L548" class="ln">   548&nbsp;&nbsp;</span>
</pre><p><a href="/src/runtime/memmove_amd64.s?m=text">View as plain text</a></p>

</article>

</main>
<footer class="Site-footer">
  <div class="Footer">
    <div class="Container">
      <div class="Footer-links">
          <div class="Footer-linkColumn">
            <a href="/solutions/" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
              Tại sao Go
            </a>
              <a href="/solutions/use-cases" class="Footer-link" aria-describedby="footer-description">
                Use Cases
              </a>
              <a href="/solutions/case-studies" class="Footer-link" aria-describedby="footer-description">
                Case Studies
              </a>
          </div>
          <div class="Footer-linkColumn">
            <a href="/learn/" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
              Bắt đầu
            </a>
              <a href="/play" class="Footer-link" aria-describedby="footer-description">
                Playground
              </a>
              <a href="/tour/" class="Footer-link" aria-describedby="footer-description">
                Tour
              </a>
              <a href="https://stackoverflow.com/questions/tagged/go?tab=Newest" class="Footer-link" aria-describedby="footer-description">
                Stack Overflow
              </a>
              <a href="/help/" class="Footer-link" aria-describedby="footer-description">
                Trợ giúp
              </a>
          </div>
          <div class="Footer-linkColumn">
            <a href="https://pkg.go.dev" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
              Packages
            </a>
              <a href="/pkg/" class="Footer-link" aria-describedby="footer-description">
                Thư viện chuẩn
              </a>
              <a href="https://pkg.go.dev/about" class="Footer-link" aria-describedby="footer-description">
                Giới thiệu về Go Packages
              </a>
          </div>
          <div class="Footer-linkColumn">
            <a href="/project" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
              Giới thiệu
            </a>
              <a href="/dl/" class="Footer-link" aria-describedby="footer-description">
                Tải xuống
              </a>
              <a href="/blog/" class="Footer-link" aria-describedby="footer-description">
                Blog
              </a>
              <a href="https://github.com/golang/go/issues" class="Footer-link" aria-describedby="footer-description">
                Issue Tracker
              </a>
              <a href="/doc/devel/release" class="Footer-link" aria-describedby="footer-description">
                Ghi chú bản phát hành
              </a>
              <a href="/brand" class="Footer-link" aria-describedby="footer-description">
                Hướng dẫn thương hiệu
              </a>
              <a href="/conduct" class="Footer-link" aria-describedby="footer-description">
                Quy tắc ứng xử
              </a>
          </div>
          <div class="Footer-linkColumn">
            <a href="/wiki/#the-go-community" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
              Kết nối
            </a>
              <a href="https://bsky.app/profile/golang.org" class="Footer-link" aria-describedby="footer-description">
                Bluesky
              </a>
              <a href="https://hachyderm.io/@golang" class="Footer-link" aria-describedby="footer-description">
                Mastodon
              </a>
              <a href="https://www.twitter.com/golang" class="Footer-link" aria-describedby="footer-description">
                Twitter
              </a>
              <a href="https://github.com/golang" class="Footer-link" aria-describedby="footer-description">
                GitHub
              </a>
              <a href="https://invite.slack.golangbridge.org/" class="Footer-link" aria-describedby="footer-description">
                Slack
              </a>
              <a href="https://reddit.com/r/golang" class="Footer-link" aria-describedby="footer-description">
                r/golang
              </a>
              <a href="https://www.meetup.com/pro/go" class="Footer-link" aria-describedby="footer-description">
                Meetup
              </a>
              <a href="https://golangweekly.com/" class="Footer-link" aria-describedby="footer-description">
                Golang Weekly
              </a>
          </div>
      </div>
    </div>
  </div>
  <div class="screen-reader-only" id="footer-description" hidden>
          Mở trong cửa sổ mới.
  </div>
  <div class="Footer">
    <div class="Container Container--fullBleed">
      <div class="Footer-bottom">
        <img class="Footer-gopher" src="/images/gophers/pilot-bust.svg" alt="Go Gopher">
        <ul class="Footer-listRow">
          <li class="Footer-listItem">
            <a href="/copyright" aria-describedby="footer-description">Bản quyền</a>
          </li>
          <li class="Footer-listItem">
            <a href="/tos" aria-describedby="footer-description">Điều khoản dịch vụ</a>
          </li>
          <li class="Footer-listItem">
            <a href="http://www.google.com/intl/en/policies/privacy/" aria-describedby="footer-description"
              target="_blank"
              rel="noopener">
              Chính sách quyền riêng tư
            </a>
            </li>
          <li class="Footer-listItem">
            <a
              href="/s/website-issue" aria-describedby="footer-description"
              target="_blank"
              rel="noopener"
              >
              Báo cáo sự cố
            </a>
          </li>
          <li class="Footer-listItem go-Footer-listItem">
            <button class="go-Button go-Button--text go-Footer-toggleTheme js-toggleTheme" aria-label="Chuyển đổi giao diện">
              <img
                data-value="auto"
                class="go-Icon go-Icon--inverted"
                height="24"
                width="24"
                src="/images/icons/brightness_6_gm_grey_24dp.svg"
                alt="Giao diện hệ thống">
              <img
                data-value="dark"
                class="go-Icon go-Icon--inverted"
                height="24"
                width="24"
                src="/images/icons/brightness_2_gm_grey_24dp.svg"
                alt="Giao diện tối">
              <img
                data-value="light"
                class="go-Icon go-Icon--inverted"
                height="24"
                width="24"
                src="/images/icons/light_mode_gm_grey_24dp.svg"
                alt="Giao diện sáng">
            </button>
          </li>
        </ul>
        <a class="Footer-googleLogo" target="_blank" href="https://google.com" rel="noopener">
          <img class="Footer-googleLogoImg" src="/images/google-white.png" alt="Logo Google">
        </a>
      </div>
    </div>
  </div>
  <script src="/js/jquery.js"></script>
  <script src="/js/carousels.js"></script>
  <script src="/js/searchBox.js"></script>
  <script src="/js/misc.js"></script>
  <script src="/js/hats.js"></script>
  <script src="/js/playground.js"></script>
  <script src="/js/godocs.js"></script>
  <script async src="/js/copypaste.js"></script>
</footer>
<section class="Cookie-notice js-cookieNotice">
  <div>go.dev sử dụng cookie của Google để cung cấp và nâng cao chất lượng dịch vụ cũng như
  phân tích lưu lượng truy cập. <a target=_blank href="https://policies.google.com/technologies/cookies">Tìm hiểu thêm.</a></div>
  <div><button class="go-Button">Đồng ý</button></div>
</section>
</body>
</html>


















