alphacpuid.s 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. .text
  2. .set noat
  3. .globl OPENSSL_cpuid_setup
  4. .ent OPENSSL_cpuid_setup
  5. OPENSSL_cpuid_setup:
  6. .frame $30,0,$26
  7. .prologue 0
  8. ret ($26)
  9. .end OPENSSL_cpuid_setup
  10. .globl OPENSSL_wipe_cpu
  11. .ent OPENSSL_wipe_cpu
  12. OPENSSL_wipe_cpu:
  13. .frame $30,0,$26
  14. .prologue 0
  15. clr $1
  16. clr $2
  17. clr $3
  18. clr $4
  19. clr $5
  20. clr $6
  21. clr $7
  22. clr $8
  23. clr $16
  24. clr $17
  25. clr $18
  26. clr $19
  27. clr $20
  28. clr $21
  29. clr $22
  30. clr $23
  31. clr $24
  32. clr $25
  33. clr $27
  34. clr $at
  35. clr $29
  36. fclr $f0
  37. fclr $f1
  38. fclr $f10
  39. fclr $f11
  40. fclr $f12
  41. fclr $f13
  42. fclr $f14
  43. fclr $f15
  44. fclr $f16
  45. fclr $f17
  46. fclr $f18
  47. fclr $f19
  48. fclr $f20
  49. fclr $f21
  50. fclr $f22
  51. fclr $f23
  52. fclr $f24
  53. fclr $f25
  54. fclr $f26
  55. fclr $f27
  56. fclr $f28
  57. fclr $f29
  58. fclr $f30
  59. mov $sp,$0
  60. ret ($26)
  61. .end OPENSSL_wipe_cpu
  62. .globl OPENSSL_atomic_add
  63. .ent OPENSSL_atomic_add
  64. OPENSSL_atomic_add:
  65. .frame $30,0,$26
  66. .prologue 0
  67. 1: ldl_l $0,($16)
  68. addl $0,$17,$1
  69. stl_c $1,($16)
  70. beq $1,1b
  71. addl $0,$17,$0
  72. ret ($26)
  73. .end OPENSSL_atomic_add
  74. .globl OPENSSL_rdtsc
  75. .ent OPENSSL_rdtsc
  76. OPENSSL_rdtsc:
  77. .frame $30,0,$26
  78. .prologue 0
  79. rpcc $0
  80. ret ($26)
  81. .end OPENSSL_rdtsc
  82. .globl OPENSSL_cleanse
  83. .ent OPENSSL_cleanse
  84. OPENSSL_cleanse:
  85. .frame $30,0,$26
  86. .prologue 0
  87. and $16,7,$0
  88. bic $17,7,$at
  89. beq $at,.Little
  90. beq $0,.Laligned
  91. .Little:
  92. ldq_u $1,0($16)
  93. mov $16,$2
  94. .Lalign:
  95. mskbl $1,$16,$1
  96. lda $16,1($16)
  97. subq $17,1,$17
  98. subq $0,1,$0
  99. beq $17,.Lout
  100. bne $0,.Lalign
  101. .Lout: stq_u $1,0($2)
  102. beq $17,.Ldone
  103. bic $17,7,$at
  104. mov $17,$0
  105. beq $at,.Little
  106. .Laligned:
  107. stq $31,0($16)
  108. subq $17,8,$17
  109. lda $16,8($16)
  110. bic $17,7,$at
  111. bne $at,.Laligned
  112. beq $17,.Ldone
  113. mov $17,$0
  114. br .Little
  115. .Ldone: ret ($26)
  116. .end OPENSSL_cleanse