~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to sysdeps/s390/s390-32/memset.S

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Set a block of memory to some byte value.  For IBM S390
2
 
   Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
 
2
   Copyright (C) 2012 Free Software Foundation, Inc.
3
3
   This file is part of the GNU C Library.
4
 
   Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
5
4
 
6
5
   The GNU C Library is free software; you can redistribute it and/or
7
6
   modify it under the terms of the GNU Lesser General Public
17
16
   License along with the GNU C Library; if not, see
18
17
   <http://www.gnu.org/licenses/>.  */
19
18
 
20
 
/*
21
 
 * R2 = address to memory area
22
 
 * R3 = byte to fill memory with
23
 
 * R4 = number of bytes to fill
24
 
 */
25
19
 
26
20
#include "sysdep.h"
27
21
#include "asm-syntax.h"
28
22
 
29
 
        .text
 
23
/* INPUT PARAMETERS
 
24
     %r2 = address to memory area
 
25
     %r3 = byte to fill memory with
 
26
     %r4 = number of bytes to fill.  */
 
27
 
 
28
       .text
 
29
 
 
30
#ifdef USE_MULTIARCH
 
31
ENTRY(memset_g5)
 
32
#else
30
33
ENTRY(memset)
31
 
        ltr     %r4,%r4
32
 
        jz      .L1
33
 
        lr      %r0,%r2             # save source address
34
 
        lr      %r1,%r3             # move pad byte to R1
35
 
        lr      %r3,%r4
36
 
        sr      %r4,%r4             # no source for MVCLE, only a pad byte
37
 
        sr      %r5,%r5
38
 
.L0:    mvcle   %r2,%r4,0(%r1)      # thats it, MVCLE is your friend
39
 
        jo      .L0
40
 
        lr      %r2,%r0             # return value is source address
41
 
.L1:
42
 
        br      %r14
 
34
#endif
 
35
        .machine "g5"
 
36
        basr    %r5,0
 
37
.L_G5_19:
 
38
        ltr     %r4,%r4
 
39
        je      .L_G5_4
 
40
        stc     %r3,0(%r2)
 
41
        chi     %r4,1
 
42
        lr      %r1,%r2
 
43
        je      .L_G5_4
 
44
        ahi     %r4,-2
 
45
        lr      %r3,%r4
 
46
        srl     %r3,8
 
47
        ltr     %r3,%r3
 
48
        jne     .L_G5_14
 
49
        ex      %r4,.L_G5_20-.L_G5_19(%r5)
 
50
.L_G5_4:
 
51
        br      %r14
 
52
.L_G5_14:
 
53
        mvc     1(256,%r1),0(%r1)
 
54
        la      %r1,256(%r1)
 
55
        brct    %r3,.L_G5_14
 
56
        ex      %r4,.L_G5_20-.L_G5_19(%r5)
 
57
        j       .L_G5_4
 
58
.L_G5_20:
 
59
        mvc     1(1,%r1),0(%r1)
 
60
#ifdef USE_MULTIARCH
 
61
END(memset_g5)
 
62
#else
43
63
END(memset)
44
64
libc_hidden_builtin_def (memset)
 
65
#endif