alphacpuid.pl 1.6 KB

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