Logo
Explore Help
Register Sign In
leandrof/linux
1
0
Fork 0
You've already forked linux
Code Issues Pull Requests Packages Projects Releases Wiki Activity
Files
22db095d57b51ff71aaa8ddba515180399f54334
linux/tools/testing/selftests/powerpc/copyloops/copy_tofrom_user_reference.S

25 lines
258 B
ArmAsm
Raw Normal View History

selftests/powerpc/64: Test exception cases in copy_tofrom_user This adds a set of test cases to test the behaviour of copy_tofrom_user when exceptions are encountered accessing the source or destination. Currently, copy_tofrom_user does not always copy as many bytes as possible when an exception occurs on a store to the destination, and that is reflected in failures in these tests. Based on a test program from Anton Blanchard. [paulus@ozlabs.org - test all three paths, wrote commit description, made EX_TABLE create an exception table.] Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-08-03 20:13:05 +10:00
#include <asm/ppc_asm.h>
_GLOBAL(copy_tofrom_user_reference)
cmpdi r5,0
beq 4f
mtctr r5
1: lbz r6,0(r4)
2: stb r6,0(r3)
addi r3,r3,1
addi r4,r4,1
bdnz 1b
3: mfctr r3
blr
4: mr r3,r5
blr
.section __ex_table,"a"
.llong 1b,3b
.llong 2b,3b
.text
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.1 Page: 989ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API