Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. --- Equals-base.dasm 2017-01-24 10:46:23.778939800 -0800
  2. +++ Equals-diff.dasm 2017-01-24 10:47:25.091443100 -0800
  3. @@ -1,133 +1,148 @@
  4. ; Assembly listing for method System.Collections.Generic.GenericEqualityComparer`1[ByteString][ByteString]:Equals(struct,struct):bool:this
  5. ; Emitting BLENDED_CODE for X64 CPU with SSE2
  6. ; optimized code
  7. ; rsp based frame
  8. ; partially interruptible
  9. ; Final local variable assignments
  10. ;
  11. ;* V00 this [V00 ] ( 0, 0 ) ref -> zero-ref this
  12. ; V01 arg1 [V01,T00] ( 4, 6 ) byref -> rdx ld-addr-op
  13. ; V02 arg2 [V02,T01] ( 3, 6 ) byref -> r8
  14. ;* V03 tmp0 [V03 ] ( 0, 0 ) ref -> zero-ref
  15. ; V04 OutArgs [V04 ] ( 1, 1 ) lclBlk (32) [rsp+0x00]
  16. ;
  17. ; Lcl frame size = 40
  18.  
  19. G_M8165_IG01:
  20. sub rsp, 40
  21.  
  22. G_M8165_IG02:
  23. mov rcx, rdx
  24. mov rdx, r8
  25. call ByteString:Equals(struct):bool:this
  26. movzx rax, al
  27.  
  28. G_M8165_IG03:
  29. add rsp, 40
  30. ret
  31.  
  32. ; Total bytes of code 23, prolog size 4 for method System.Collections.Generic.GenericEqualityComparer`1[ByteString][ByteString]:Equals(struct,struct):bool:this
  33. ; ============================================================
  34. ; Assembly listing for method ByteString:Equals(struct):bool:this
  35. ; Emitting BLENDED_CODE for X64 CPU with SSE2
  36. ; optimized code
  37. ; rsp based frame
  38. ; fully interruptible
  39. ; Final local variable assignments
  40. ;
  41. -; V00 this [V00,T06] ( 8, 16 ) byref -> rcx this
  42. -; V01 arg1 [V01,T00] ( 8, 22 ) byref -> rdx ld-addr-op
  43. -; V02 loc0 [V02,T05] ( 6, 20.5) int -> r8
  44. -; V03 tmp0 [V03,T01] ( 3, 24 ) ref -> rax
  45. -; V04 tmp1 [V04,T03] ( 3, 24 ) int -> r9
  46. -; V05 tmp2 [V05,T02] ( 3, 24 ) ref -> r9
  47. -; V06 tmp3 [V06,T04] ( 3, 24 ) int -> r10
  48. +; V00 this [V00,T08] ( 10, 14 ) byref -> rcx this
  49. +; V01 arg1 [V01,T05] ( 15, 44 ) byref -> rdx ld-addr-op
  50. +; V02 loc0 [V02,T04] ( 16, 57 ) int -> r9
  51. +; V03 tmp0 [V03,T00] ( 15, 120 ) ref -> rax
  52. +; V04 tmp1 [V04,T02] ( 15, 120 ) int -> rsi
  53. +; V05 tmp2 [V05,T01] ( 15, 120 ) ref -> rsi
  54. +; V06 tmp3 [V06,T03] ( 15, 120 ) int -> rdi
  55. ; V07 OutArgs [V07 ] ( 1, 1 ) lclBlk (32) [rsp+0x00]
  56. +; V08 cse0 [V08,T09] ( 9, 13.5) int -> r8
  57. +; V09 cse1 [V09,T06] ( 8, 21.5) int -> rcx
  58. +; V10 cse2 [V10,T07] ( 7, 17.5) int -> rdx
  59. +; V11 cse3 [V11,T10] ( 6, 13.5) ref -> r10
  60. +; V12 cse4 [V12,T11] ( 5, 9.5) ref -> r11
  61. ;
  62. ; Lcl frame size = 40
  63.  
  64. G_M3809_IG01:
  65. + push rdi
  66. + push rsi
  67. sub rsp, 40
  68.  
  69. G_M3809_IG02:
  70. - mov eax, dword ptr [rcx+12]
  71. - cmp eax, dword ptr [rdx+12]
  72. + mov r8d, dword ptr [rcx+12]
  73. + cmp r8d, dword ptr [rdx+12]
  74. je SHORT G_M3809_IG04
  75. xor eax, eax
  76.  
  77. G_M3809_IG03:
  78. add rsp, 40
  79. + pop rsi
  80. + pop rdi
  81. ret
  82.  
  83. G_M3809_IG04:
  84. - xor r8d, r8d
  85. - cmp dword ptr [rcx+12], 0
  86. + xor r9d, r9d
  87. + test r8d, r8d
  88. jle SHORT G_M3809_IG08
  89. + mov r10, gword ptr [rcx]
  90. + mov ecx, dword ptr [rcx+8]
  91. + mov r11, gword ptr [rdx]
  92. + mov edx, dword ptr [rdx+8]
  93.  
  94. G_M3809_IG05:
  95. - mov rax, gword ptr [rcx]
  96. - mov r9d, r8d
  97. - add r9d, dword ptr [rcx+8]
  98. - cmp r9d, dword ptr [rax+8]
  99. + mov rax, r10
  100. + lea esi, [rcx+r9]
  101. + cmp esi, dword ptr [rax+8]
  102. jae SHORT G_M3809_IG10
  103. - movsxd r9, r9d
  104. - movzx rax, byte ptr [rax+r9+16]
  105. - mov r9, gword ptr [rdx]
  106. - mov r10d, r8d
  107. - add r10d, dword ptr [rdx+8]
  108. - cmp r10d, dword ptr [r9+8]
  109. + movsxd rsi, esi
  110. + movzx rax, byte ptr [rax+rsi+16]
  111. + mov rsi, r11
  112. + lea edi, [rdx+r9]
  113. + cmp edi, dword ptr [rsi+8]
  114. jae SHORT G_M3809_IG10
  115. - movsxd r10, r10d
  116. - cmp al, byte ptr [r9+r10+16]
  117. + movsxd rdi, edi
  118. + cmp al, byte ptr [rsi+rdi+16]
  119. je SHORT G_M3809_IG07
  120. xor eax, eax
  121.  
  122. G_M3809_IG06:
  123. add rsp, 40
  124. + pop rsi
  125. + pop rdi
  126. ret
  127.  
  128. G_M3809_IG07:
  129. - inc r8d
  130. - cmp r8d, dword ptr [rcx+12]
  131. + inc r9d
  132. + cmp r9d, r8d
  133. jl SHORT G_M3809_IG05
  134.  
  135. G_M3809_IG08:
  136. mov eax, 1
  137.  
  138. G_M3809_IG09:
  139. add rsp, 40
  140. + pop rsi
  141. + pop rdi
  142. ret
  143.  
  144. G_M3809_IG10:
  145. call CORINFO_HELP_RNGCHKFAIL
  146. int3
  147.  
  148. -; Total bytes of code 111, prolog size 4 for method ByteString:Equals(struct):bool:this
  149. +; Total bytes of code 121, prolog size 6 for method ByteString:Equals(struct):bool:this
  150. ; ============================================================
  151. A 30.297
  152. T 30.151
  153. C 19.798
  154. G 19.755
  155.  
  156. AA 9.177
  157. TA 9.133
  158. AT 9.131
  159. TT 9.091
  160. CA 6.002
  161. AC 6.001
  162. AG 5.987
  163. GA 5.984
  164. CT 5.971
  165. TC 5.971
  166. GT 5.957
  167. TG 5.956
  168. CC 3.917
  169. GC 3.910
  170. CG 3.909
  171. GG 3.903
  172.  
  173. 147166 GGT
  174. 44658 GGTA
  175. 4736 GGTATT
  176. 89 GGTATTTTAATT
  177. 89 GGTATTTTAATTTATAGT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement