-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 12099 b: refs/heads/master c: a0c6fdb h: refs/heads/master i: 12097: 6216d56 12095: 4d32673 v: v3
- Loading branch information
Nicolas Pitre
authored and
Russell King
committed
Nov 1, 2005
1 parent
c0ec4a7
commit ed4a979
Showing
4 changed files
with
56 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 85eb226c446a017996859093cbfb5d3ae2c2117a | ||
refs/heads/master: a0c6fdb987860e6c7f9b8e57439ca2703f462578 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* linux/arch/arm/lib/clear_user.S | ||
* | ||
* Copyright (C) 1995, 1996,1997,1998 Russell King | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#include <linux/linkage.h> | ||
#include <asm/assembler.h> | ||
|
||
.text | ||
|
||
/* Prototype: int __arch_clear_user(void *addr, size_t sz) | ||
* Purpose : clear some user memory | ||
* Params : addr - user memory address to clear | ||
* : sz - number of bytes to clear | ||
* Returns : number of bytes NOT cleared | ||
*/ | ||
ENTRY(__arch_clear_user) | ||
stmfd sp!, {r1, lr} | ||
mov r2, #0 | ||
cmp r1, #4 | ||
blt 2f | ||
ands ip, r0, #3 | ||
beq 1f | ||
cmp ip, #2 | ||
USER( strbt r2, [r0], #1) | ||
USER( strlebt r2, [r0], #1) | ||
USER( strltbt r2, [r0], #1) | ||
rsb ip, ip, #4 | ||
sub r1, r1, ip @ 7 6 5 4 3 2 1 | ||
1: subs r1, r1, #8 @ -1 -2 -3 -4 -5 -6 -7 | ||
USER( strplt r2, [r0], #4) | ||
USER( strplt r2, [r0], #4) | ||
bpl 1b | ||
adds r1, r1, #4 @ 3 2 1 0 -1 -2 -3 | ||
USER( strplt r2, [r0], #4) | ||
2: tst r1, #2 @ 1x 1x 0x 0x 1x 1x 0x | ||
USER( strnebt r2, [r0], #1) | ||
USER( strnebt r2, [r0], #1) | ||
tst r1, #1 @ x1 x0 x1 x0 x1 x0 x1 | ||
USER( strnebt r2, [r0], #1) | ||
mov r0, #0 | ||
LOADREGS(fd,sp!, {r1, pc}) | ||
|
||
.section .fixup,"ax" | ||
.align 0 | ||
9001: LOADREGS(fd,sp!, {r0, pc}) | ||
.previous | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters