uaccess.S
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  arch/s390/lib/uaccess.S
  3.  *    fixup routines for copy_{from|to}_user functions.
  4.  *
  5.  *  s390
  6.  *    Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
  7.  *    Authors(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
  8.  *
  9.  *  These functions have standard call interface
  10.  */
  11. #include <asm/lowcore.h>
  12.         .text
  13.         .align 4
  14.         .globl __copy_from_user_asm
  15. __copy_from_user_asm:
  16. lr %r5,%r3
  17. sacf 512
  18. 0: mvcle %r2,%r4,0
  19. jo 0b
  20. sacf 0
  21. lr %r2,%r5
  22. br %r14
  23. 1: l %r1,__LC_PGM_OLD_PSW+4
  24.         sll %r4,1
  25.         srl %r4,1
  26. 2:      lhi %r3,-4096
  27.         sll %r3,1
  28.         srl %r3,1
  29.         n %r3,__LC_TRANS_EXC_ADDR
  30.         sr %r3,%r4
  31.         bm 4(%r1)
  32. 3:      mvcle %r2,%r4,0
  33.         b 4(%r1)
  34.         .section __ex_table,"a"
  35. .long 0b,1b
  36. .long 3b,2b
  37.         .previous
  38.         .align 4
  39.         .text
  40.         .globl __copy_to_user_asm
  41. __copy_to_user_asm:
  42. lr %r5,%r3
  43. sacf 512
  44. 0: mvcle %r4,%r2,0
  45. jo 0b
  46. sacf 0
  47. lr %r2,%r3
  48. br %r14
  49. 1: l %r1,__LC_PGM_OLD_PSW+4
  50.         sll %r4,1
  51.         srl %r4,1
  52. 2:      lhi %r5,-4096
  53.         sll %r5,1
  54.         srl %r5,1
  55.         n %r5,__LC_TRANS_EXC_ADDR
  56.         sr %r5,%r4
  57.         bm 4(%r1)
  58. 3:      mvcle %r4,%r2,0
  59.         b 4(%r1)
  60.         .section __ex_table,"a"
  61. .long   0b,1b
  62.         .long 3b,2b
  63.         .previous
  64.         .align 4
  65.         .text
  66.         .globl __clear_user_asm
  67. __clear_user_asm:
  68. lr %r4,%r2
  69. lr %r5,%r3
  70. sr %r2,%r2
  71. sr %r3,%r3
  72. sacf 512
  73. 0: mvcle %r4,%r2,0
  74. jo 0b
  75. sacf 0
  76. lr %r2,%r3
  77. br %r14
  78. 1: l %r1,__LC_PGM_OLD_PSW+4
  79.         sll %r4,1
  80.         srl %r4,1
  81. 2:      lhi %r5,-4096
  82.         sll %r5,1
  83.         srl %r5,1
  84.         n %r5,__LC_TRANS_EXC_ADDR
  85.         sr %r5,%r4
  86.         bm 4(%r1)
  87. 3:      mvcle %r4,%r2,0
  88.         b 4(%r1)
  89.         .section __ex_table,"a"
  90. .long   0b,1b
  91.         .long 3b,2b
  92.         .previous