~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/runtime/memmove_nacl_amd64p32.s

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-11-18 15:12:26 UTC
  • mfrom: (14.2.12 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141118151226-zug7vn93mn3dtiz3
Tags: 2:1.3.2-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - Support co-installability with gccgo-go tool:
    - d/rules,golang-go.install: Rename bin/go -> bin/golang-go
    - d/golang-go.{postinst,prerm}: Install/remove /usr/bin/go using
      alternatives.
  - d/copyright: Amendments for full compiliance with copyright format.
  - d/control: Demote golang-go.tools to Suggests to support Ubuntu MIR.
  - dropped patches (now upstream):
    - d/p/issue27650045_40001_50001.diff
    - d/p/issue28050043_60001_70001.diff
    - d/p/issue54790044_100001_110001.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright 2013 The Go Authors.  All rights reserved.
 
2
// Use of this source code is governed by a BSD-style
 
3
// license that can be found in the LICENSE file.
 
4
 
 
5
#include "../../cmd/ld/textflag.h"
 
6
 
 
7
TEXT runtime·memmove(SB), NOSPLIT, $0-12
 
8
        MOVL    to+0(FP), DI
 
9
        MOVL    fr+4(FP), SI
 
10
        MOVL    n+8(FP), BX
 
11
 
 
12
        CMPL    SI, DI
 
13
        JLS back
 
14
 
 
15
forward:
 
16
        MOVL    BX, CX
 
17
        SHRL    $3, CX
 
18
        ANDL    $7, BX
 
19
        REP; MOVSQ
 
20
        MOVL    BX, CX
 
21
        REP; MOVSB
 
22
        RET
 
23
 
 
24
back:
 
25
        MOVL    SI, CX
 
26
        ADDL    BX, CX
 
27
        CMPL    CX, DI
 
28
        JLS forward
 
29
 
 
30
        ADDL    BX, DI
 
31
        ADDL    BX, SI
 
32
        STD
 
33
        
 
34
        MOVL    BX, CX
 
35
        SHRL    $3, CX
 
36
        ANDL    $7, BX
 
37
        SUBL    $8, DI
 
38
        SUBL    $8, SI
 
39
        REP; MOVSQ
 
40
        ADDL    $7, DI
 
41
        ADDL    $7, SI
 
42
        MOVL    BX, CX
 
43
        REP; MOVSB
 
44
        CLD
 
45
 
 
46
        RET