fork download
  1. --- stack.asm 2012-07-01 12:57:44.224441163 +0100
  2. +++ new.asm 2012-07-01 12:58:00.245440067 +0100
  3. @@ -9,19 +9,21 @@
  4. .type main, @function
  5. main:
  6. .LFB3038:
  7. - sub rsp, 640008
  8. + push rbx
  9. .LCFI0:
  10. + mov edi, 640000
  11. + call operator new(unsigned long)
  12. mov edx, 1
  13. + mov rbx, rax
  14. xor eax, eax
  15. .L2:
  16. - lea rsi, [rsp]
  17. - mov rcx, rax
  18. - sal rcx, 5
  19. - add rcx, rsi
  20. lea rsi, [0+rax*4]
  21. + mov rcx, rax
  22. add rax, 1
  23. cvtsi2sd xmm0, rsi
  24. + sal rcx, 5
  25. lea rsi, [rdx+1]
  26. + add rcx, rbx
  27. movsd QWORD PTR [rcx], xmm0
  28. cvtsi2sd xmm0, rdx
  29. movsd QWORD PTR [rcx+8], xmm0
  30. @@ -39,14 +41,13 @@
  31. mov rdi, rax
  32. call std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
  33. xorpd xmm3, xmm3
  34. - xor ecx, ecx
  35. + xor esi, esi
  36. movapd xmm0, xmm3
  37. .L3:
  38. - lea rdx, [rsp]
  39. - mov rax, rcx
  40. + mov rax, rsi
  41. + xor ecx, ecx
  42. sal rax, 5
  43. - add rax, rdx
  44. - xor edx, edx
  45. + add rax, rbx
  46. movsd xmm7, QWORD PTR [rax]
  47. movsd xmm6, QWORD PTR [rax+8]
  48. movsd xmm5, QWORD PTR [rax+16]
  49. @@ -54,39 +55,38 @@
  50. .p2align 4,,10
  51. .p2align 3
  52. .L4:
  53. - mov rax, rdx
  54. + mov rdx, rcx
  55. movapd xmm1, xmm7
  56. movapd xmm2, xmm6
  57. - lea rsi, [rsp]
  58. - sal rax, 5
  59. - add rdx, 1
  60. - add rax, rsi
  61. - cmp rdx, 20000
  62. - subsd xmm1, QWORD PTR [rax]
  63. - subsd xmm2, QWORD PTR [rax+8]
  64. + sal rdx, 5
  65. + add rcx, 1
  66. + add rdx, rbx
  67. + cmp rcx, 20000
  68. + subsd xmm1, QWORD PTR [rdx]
  69. + subsd xmm2, QWORD PTR [rdx+8]
  70. mulsd xmm1, xmm1
  71. mulsd xmm2, xmm2
  72. addsd xmm1, xmm3
  73. addsd xmm1, xmm2
  74. movapd xmm2, xmm5
  75. - subsd xmm2, QWORD PTR [rax+16]
  76. + subsd xmm2, QWORD PTR [rdx+16]
  77. mulsd xmm2, xmm2
  78. addsd xmm1, xmm2
  79. movapd xmm2, xmm4
  80. - subsd xmm2, QWORD PTR [rax+24]
  81. + subsd xmm2, QWORD PTR [rdx+24]
  82. mulsd xmm2, xmm2
  83. addsd xmm1, xmm2
  84. addsd xmm0, xmm1
  85. jne .L4
  86. - add rcx, 1
  87. - cmp rcx, 20000
  88. + add rsi, 1
  89. + cmp rsi, 20000
  90. jne .L3
  91. mov edi, OFFSET FLAT:std::cout
  92. call std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<double>(double)
  93. mov rdi, rax
  94. call std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
  95. xor eax, eax
  96. - add rsp, 640008
  97. + pop rbx
  98. .LCFI1:
  99. ret
  100. .LFE3038:
  101. @@ -141,7 +141,9 @@
  102. .byte 0x4
  103. .long .LCFI0-.LFB3038
  104. .byte 0xe
  105. - .uleb128 0x9c410
  106. + .uleb128 0x10
  107. + .byte 0x83
  108. + .uleb128 0x2
  109. .byte 0x4
  110. .long .LCFI1-.LCFI0
  111. .byte 0xe
  112.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout

Standard output is empty