Advertisement
Guest User

Powers of Two, GCC's Assembly output — gcc version 4.6.1

a guest
Jul 27th, 2011
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.03 KB | None | 0 0
  1.  
  2.  
  3. ==> powersoftwo-1-c2.s <===================================================
  4. .text
  5. .align 4,0x90
  6. .globl _isPowerOfTwo
  7. _isPowerOfTwo:
  8. LFB16:
  9. jmp L8
  10. .align 4,0x90
  11. L10:
  12. cmpl $1, %edi
  13. jbe L2
  14. shrl %edi
  15. L8:
  16. testb $1, %dil
  17. je L10
  18. L2:
  19. xorl %eax, %eax
  20. cmpl $1, %edi
  21. sete %al
  22. ret
  23. LFE16:
  24. .cstring
  25. .align 3
  26. LC0:
  27. .ascii "%d powers of two found in %lu ns\12\0"
  28. .section __TEXT,__text_startup,regular,pure_instructions
  29. .align 4
  30. .globl _main
  31. _main:
  32. LFB17:
  33. pushq %rbx
  34. LCFI0:
  35. subq $16, %rsp
  36. LCFI1:
  37. call _mach_absolute_time
  38. xorl %edx, %edx
  39. xorl %esi, %esi
  40. movq %rax, %rbx
  41. xorl %eax, %eax
  42. .align 4
  43. L24:
  44. cmpl $1, %eax
  45. sete %al
  46. addl $1, %edx
  47. movzbl %al, %eax
  48. addl %eax, %esi
  49. cmpl $-1, %edx
  50. je L15
  51. testb $1, %dl
  52. jne L19
  53. cmpl $1, %edx
  54. movl %edx, %eax
  55. jbe L19
  56. .align 4
  57. L21:
  58. shrl %eax
  59. testb $1, %al
  60. jne L24
  61. cmpl $1, %eax
  62. ja L21
  63. .p2align 4,,4
  64. jmp L24
  65. .align 4
  66. L19:
  67. movl %edx, %eax
  68. jmp L24
  69. L15:
  70. movl %esi, 8(%rsp)
  71. .p2align 4,,5
  72. call _mach_absolute_time
  73. movl 8(%rsp), %esi
  74. leaq LC0(%rip), %rdi
  75. subq %rbx, %rax
  76. movq %rax, %rdx
  77. xorl %eax, %eax
  78. call _printf
  79. addq $16, %rsp
  80. LCFI2:
  81. xorl %eax, %eax
  82. popq %rbx
  83. LCFI3:
  84. ret
  85. LFE17:
  86. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  87. EH_frame1:
  88. .set L$set$0,LECIE1-LSCIE1
  89. .long L$set$0
  90. LSCIE1:
  91. .long 0
  92. .byte 0x1
  93. .ascii "zR\0"
  94. .byte 0x1
  95. .byte 0x78
  96. .byte 0x10
  97. .byte 0x1
  98. .byte 0x10
  99. .byte 0xc
  100. .byte 0x7
  101. .byte 0x8
  102. .byte 0x90
  103. .byte 0x1
  104. .align 3
  105. LECIE1:
  106. LSFDE1:
  107. .set L$set$1,LEFDE1-LASFDE1
  108. .long L$set$1
  109. LASFDE1:
  110. .long LASFDE1-EH_frame1
  111. .quad LFB16-.
  112. .set L$set$2,LFE16-LFB16
  113. .quad L$set$2
  114. .byte 0
  115. .align 3
  116. LEFDE1:
  117. LSFDE3:
  118. .set L$set$3,LEFDE3-LASFDE3
  119. .long L$set$3
  120. LASFDE3:
  121. .long LASFDE3-EH_frame1
  122. .quad LFB17-.
  123. .set L$set$4,LFE17-LFB17
  124. .quad L$set$4
  125. .byte 0
  126. .byte 0x4
  127. .set L$set$5,LCFI0-LFB17
  128. .long L$set$5
  129. .byte 0xe
  130. .byte 0x10
  131. .byte 0x83
  132. .byte 0x2
  133. .byte 0x4
  134. .set L$set$6,LCFI1-LCFI0
  135. .long L$set$6
  136. .byte 0xe
  137. .byte 0x20
  138. .byte 0x4
  139. .set L$set$7,LCFI2-LCFI1
  140. .long L$set$7
  141. .byte 0xe
  142. .byte 0x10
  143. .byte 0x4
  144. .set L$set$8,LCFI3-LCFI2
  145. .long L$set$8
  146. .byte 0xe
  147. .byte 0x8
  148. .align 3
  149. LEFDE3:
  150. .subsections_via_symbols
  151.  
  152.  
  153.  
  154. ==> powersoftwo-2-c2.s <===================================================
  155. .text
  156. .align 4,0x90
  157. .globl _isPowerOfTwo
  158. _isPowerOfTwo:
  159. LFB16:
  160. leal -1(%rdi), %eax
  161. cmpl $1, %eax
  162. jbe L16
  163. cmpl $4, %edi
  164. je L16
  165. cmpl $16, %edi
  166. je L16
  167. cmpl $8, %edi
  168. .p2align 4,,2
  169. je L16
  170. cmpl $64, %edi
  171. .p2align 4,,2
  172. je L16
  173. cmpl $32, %edi
  174. .p2align 4,,2
  175. je L16
  176. cmpl $256, %edi
  177. je L16
  178. cmpl $128, %edi
  179. je L16
  180. cmpl $1024, %edi
  181. je L16
  182. cmpl $512, %edi
  183. je L16
  184. cmpl $4096, %edi
  185. je L16
  186. cmpl $2048, %edi
  187. je L16
  188. cmpl $16384, %edi
  189. je L16
  190. cmpl $8192, %edi
  191. je L16
  192. cmpl $65536, %edi
  193. je L16
  194. cmpl $32768, %edi
  195. je L16
  196. cmpl $262144, %edi
  197. je L16
  198. cmpl $131072, %edi
  199. je L16
  200. cmpl $1048576, %edi
  201. je L16
  202. cmpl $524288, %edi
  203. je L16
  204. cmpl $4194304, %edi
  205. je L16
  206. cmpl $2097152, %edi
  207. je L16
  208. cmpl $16777216, %edi
  209. je L16
  210. cmpl $8388608, %edi
  211. je L16
  212. cmpl $67108864, %edi
  213. je L16
  214. cmpl $33554432, %edi
  215. je L16
  216. cmpl $268435456, %edi
  217. je L16
  218. cmpl $134217728, %edi
  219. je L16
  220. cmpl $1073741824, %edi
  221. je L17
  222. cmpl $536870912, %edi
  223. je L17
  224. xorl %eax, %eax
  225. cmpl $-2147483648, %edi
  226. sete %al
  227. ret
  228. .align 4,0x90
  229. L16:
  230. movl $1, %eax
  231. ret
  232. L17:
  233. movl $1, %eax
  234. ret
  235. LFE16:
  236. .cstring
  237. .align 3
  238. LC0:
  239. .ascii "%d powers of two found in %lu ns\12\0"
  240. .section __TEXT,__text_startup,regular,pure_instructions
  241. .align 4
  242. .globl _main
  243. _main:
  244. LFB17:
  245. pushq %r12
  246. LCFI0:
  247. pushq %rbp
  248. LCFI1:
  249. xorl %ebp, %ebp
  250. pushq %rbx
  251. LCFI2:
  252. xorl %ebx, %ebx
  253. call _mach_absolute_time
  254. movq %rax, %r12
  255. .align 4
  256. L20:
  257. movl %ebp, %edi
  258. call _isPowerOfTwo
  259. testl %eax, %eax
  260. setne %al
  261. addl $1, %ebp
  262. movzbl %al, %eax
  263. addl %eax, %ebx
  264. cmpl $-1, %ebp
  265. jne L20
  266. call _mach_absolute_time
  267. leaq LC0(%rip), %rdi
  268. movl %ebx, %esi
  269. subq %r12, %rax
  270. movq %rax, %rdx
  271. xorl %eax, %eax
  272. call _printf
  273. popq %rbx
  274. LCFI3:
  275. xorl %eax, %eax
  276. popq %rbp
  277. LCFI4:
  278. popq %r12
  279. LCFI5:
  280. ret
  281. LFE17:
  282. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  283. EH_frame1:
  284. .set L$set$0,LECIE1-LSCIE1
  285. .long L$set$0
  286. LSCIE1:
  287. .long 0
  288. .byte 0x1
  289. .ascii "zR\0"
  290. .byte 0x1
  291. .byte 0x78
  292. .byte 0x10
  293. .byte 0x1
  294. .byte 0x10
  295. .byte 0xc
  296. .byte 0x7
  297. .byte 0x8
  298. .byte 0x90
  299. .byte 0x1
  300. .align 3
  301. LECIE1:
  302. LSFDE1:
  303. .set L$set$1,LEFDE1-LASFDE1
  304. .long L$set$1
  305. LASFDE1:
  306. .long LASFDE1-EH_frame1
  307. .quad LFB16-.
  308. .set L$set$2,LFE16-LFB16
  309. .quad L$set$2
  310. .byte 0
  311. .align 3
  312. LEFDE1:
  313. LSFDE3:
  314. .set L$set$3,LEFDE3-LASFDE3
  315. .long L$set$3
  316. LASFDE3:
  317. .long LASFDE3-EH_frame1
  318. .quad LFB17-.
  319. .set L$set$4,LFE17-LFB17
  320. .quad L$set$4
  321. .byte 0
  322. .byte 0x4
  323. .set L$set$5,LCFI0-LFB17
  324. .long L$set$5
  325. .byte 0xe
  326. .byte 0x10
  327. .byte 0x8c
  328. .byte 0x2
  329. .byte 0x4
  330. .set L$set$6,LCFI1-LCFI0
  331. .long L$set$6
  332. .byte 0xe
  333. .byte 0x18
  334. .byte 0x86
  335. .byte 0x3
  336. .byte 0x4
  337. .set L$set$7,LCFI2-LCFI1
  338. .long L$set$7
  339. .byte 0xe
  340. .byte 0x20
  341. .byte 0x83
  342. .byte 0x4
  343. .byte 0x4
  344. .set L$set$8,LCFI3-LCFI2
  345. .long L$set$8
  346. .byte 0xe
  347. .byte 0x18
  348. .byte 0x4
  349. .set L$set$9,LCFI4-LCFI3
  350. .long L$set$9
  351. .byte 0xe
  352. .byte 0x10
  353. .byte 0x4
  354. .set L$set$10,LCFI5-LCFI4
  355. .long L$set$10
  356. .byte 0xe
  357. .byte 0x8
  358. .align 3
  359. LEFDE3:
  360. .subsections_via_symbols
  361.  
  362.  
  363.  
  364. ==> powersoftwo-3-c2.s <===================================================
  365. .text
  366. .align 4,0x90
  367. .globl _isPowerOfTwo
  368. _isPowerOfTwo:
  369. LFB16:
  370. cmpl $1, %edi
  371. movl $1, %eax
  372. ja L3
  373. jmp L2
  374. .align 4,0x90
  375. L8:
  376. cmpl %eax, %edi
  377. jbe L2
  378. L3:
  379. addl %eax, %eax
  380. .p2align 4,,7
  381. jns L8
  382. L2:
  383. cmpl %eax, %edi
  384. sete %al
  385. movzbl %al, %eax
  386. ret
  387. LFE16:
  388. .cstring
  389. .align 3
  390. LC0:
  391. .ascii "%d powers of two found in %lu ns\12\0"
  392. .section __TEXT,__text_startup,regular,pure_instructions
  393. .align 4
  394. .globl _main
  395. _main:
  396. LFB17:
  397. pushq %rbx
  398. LCFI0:
  399. subq $16, %rsp
  400. LCFI1:
  401. call _mach_absolute_time
  402. xorl %edx, %edx
  403. xorl %esi, %esi
  404. movq %rax, %rbx
  405. movl $1, %eax
  406. .align 4
  407. L20:
  408. cmpl %eax, %edx
  409. sete %al
  410. addl $1, %edx
  411. movzbl %al, %eax
  412. addl %eax, %esi
  413. cmpl $-1, %edx
  414. je L13
  415. cmpl $1, %edx
  416. movl $1, %eax
  417. jbe L20
  418. .align 4
  419. L17:
  420. addl %eax, %eax
  421. js L20
  422. cmpl %eax, %edx
  423. ja L17
  424. .p2align 4,,7
  425. jmp L20
  426. L13:
  427. movl %esi, 8(%rsp)
  428. .p2align 4,,5
  429. call _mach_absolute_time
  430. movl 8(%rsp), %esi
  431. leaq LC0(%rip), %rdi
  432. subq %rbx, %rax
  433. movq %rax, %rdx
  434. xorl %eax, %eax
  435. call _printf
  436. addq $16, %rsp
  437. LCFI2:
  438. xorl %eax, %eax
  439. popq %rbx
  440. LCFI3:
  441. ret
  442. LFE17:
  443. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  444. EH_frame1:
  445. .set L$set$0,LECIE1-LSCIE1
  446. .long L$set$0
  447. LSCIE1:
  448. .long 0
  449. .byte 0x1
  450. .ascii "zR\0"
  451. .byte 0x1
  452. .byte 0x78
  453. .byte 0x10
  454. .byte 0x1
  455. .byte 0x10
  456. .byte 0xc
  457. .byte 0x7
  458. .byte 0x8
  459. .byte 0x90
  460. .byte 0x1
  461. .align 3
  462. LECIE1:
  463. LSFDE1:
  464. .set L$set$1,LEFDE1-LASFDE1
  465. .long L$set$1
  466. LASFDE1:
  467. .long LASFDE1-EH_frame1
  468. .quad LFB16-.
  469. .set L$set$2,LFE16-LFB16
  470. .quad L$set$2
  471. .byte 0
  472. .align 3
  473. LEFDE1:
  474. LSFDE3:
  475. .set L$set$3,LEFDE3-LASFDE3
  476. .long L$set$3
  477. LASFDE3:
  478. .long LASFDE3-EH_frame1
  479. .quad LFB17-.
  480. .set L$set$4,LFE17-LFB17
  481. .quad L$set$4
  482. .byte 0
  483. .byte 0x4
  484. .set L$set$5,LCFI0-LFB17
  485. .long L$set$5
  486. .byte 0xe
  487. .byte 0x10
  488. .byte 0x83
  489. .byte 0x2
  490. .byte 0x4
  491. .set L$set$6,LCFI1-LCFI0
  492. .long L$set$6
  493. .byte 0xe
  494. .byte 0x20
  495. .byte 0x4
  496. .set L$set$7,LCFI2-LCFI1
  497. .long L$set$7
  498. .byte 0xe
  499. .byte 0x10
  500. .byte 0x4
  501. .set L$set$8,LCFI3-LCFI2
  502. .long L$set$8
  503. .byte 0xe
  504. .byte 0x8
  505. .align 3
  506. LEFDE3:
  507. .subsections_via_symbols
  508.  
  509.  
  510.  
  511. ==> powersoftwo-4-c2.s <===================================================
  512. .text
  513. .align 4,0x90
  514. .globl _isPowerOfTwo
  515. _isPowerOfTwo:
  516. LFB16:
  517. subq $16, %rsp
  518. LCFI0:
  519. cmpl $1, %edi
  520. movl $1, %ecx
  521. movdqa LC0(%rip), %xmm0
  522. movdqa %xmm0, -120(%rsp)
  523. movdqa LC1(%rip), %xmm0
  524. movdqa %xmm0, -104(%rsp)
  525. movdqa LC2(%rip), %xmm0
  526. movdqa %xmm0, -88(%rsp)
  527. movdqa LC3(%rip), %xmm0
  528. movdqa %xmm0, -72(%rsp)
  529. movdqa LC4(%rip), %xmm0
  530. movdqa %xmm0, -56(%rsp)
  531. movdqa LC5(%rip), %xmm0
  532. movdqa %xmm0, -40(%rsp)
  533. movdqa LC6(%rip), %xmm0
  534. movdqa %xmm0, -24(%rsp)
  535. movdqa LC7(%rip), %xmm0
  536. movdqa %xmm0, -8(%rsp)
  537. jbe L2
  538. leaq -116(%rsp), %rax
  539. xorl %edx, %edx
  540. jmp L3
  541. .align 4,0x90
  542. L8:
  543. cmpl $30, %edx
  544. jg L2
  545. L3:
  546. movl (%rax), %ecx
  547. addl $1, %edx
  548. addq $4, %rax
  549. cmpl %edi, %ecx
  550. jb L8
  551. L2:
  552. xorl %eax, %eax
  553. cmpl %ecx, %edi
  554. sete %al
  555. addq $16, %rsp
  556. LCFI1:
  557. ret
  558. LFE16:
  559. .cstring
  560. .align 3
  561. LC8:
  562. .ascii "%d powers of two found in %lu ns\12\0"
  563. .section __TEXT,__text_startup,regular,pure_instructions
  564. .align 4
  565. .globl _main
  566. _main:
  567. LFB17:
  568. pushq %r12
  569. LCFI2:
  570. pushq %rbp
  571. LCFI3:
  572. xorl %ebp, %ebp
  573. pushq %rbx
  574. LCFI4:
  575. xorl %ebx, %ebx
  576. call _mach_absolute_time
  577. movq %rax, %r12
  578. .align 4
  579. L10:
  580. movl %ebp, %edi
  581. call _isPowerOfTwo
  582. testl %eax, %eax
  583. setne %al
  584. addl $1, %ebp
  585. movzbl %al, %eax
  586. addl %eax, %ebx
  587. cmpl $-1, %ebp
  588. jne L10
  589. call _mach_absolute_time
  590. leaq LC8(%rip), %rdi
  591. movl %ebx, %esi
  592. subq %r12, %rax
  593. movq %rax, %rdx
  594. xorl %eax, %eax
  595. call _printf
  596. popq %rbx
  597. LCFI5:
  598. xorl %eax, %eax
  599. popq %rbp
  600. LCFI6:
  601. popq %r12
  602. LCFI7:
  603. ret
  604. LFE17:
  605. .literal16
  606. .align 4
  607. LC0:
  608. .long 1
  609. .long 2
  610. .long 4
  611. .long 8
  612. .align 4
  613. LC1:
  614. .long 16
  615. .long 32
  616. .long 64
  617. .long 128
  618. .align 4
  619. LC2:
  620. .long 256
  621. .long 512
  622. .long 1024
  623. .long 2048
  624. .align 4
  625. LC3:
  626. .long 4096
  627. .long 8192
  628. .long 16384
  629. .long 32768
  630. .align 4
  631. LC4:
  632. .long 65536
  633. .long 131072
  634. .long 262144
  635. .long 524288
  636. .align 4
  637. LC5:
  638. .long 1048576
  639. .long 2097152
  640. .long 4194304
  641. .long 8388608
  642. .align 4
  643. LC6:
  644. .long 16777216
  645. .long 33554432
  646. .long 67108864
  647. .long 134217728
  648. .align 4
  649. LC7:
  650. .long 268435456
  651. .long 536870912
  652. .long 1073741824
  653. .long -2147483648
  654. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  655. EH_frame1:
  656. .set L$set$0,LECIE1-LSCIE1
  657. .long L$set$0
  658. LSCIE1:
  659. .long 0
  660. .byte 0x1
  661. .ascii "zR\0"
  662. .byte 0x1
  663. .byte 0x78
  664. .byte 0x10
  665. .byte 0x1
  666. .byte 0x10
  667. .byte 0xc
  668. .byte 0x7
  669. .byte 0x8
  670. .byte 0x90
  671. .byte 0x1
  672. .align 3
  673. LECIE1:
  674. LSFDE1:
  675. .set L$set$1,LEFDE1-LASFDE1
  676. .long L$set$1
  677. LASFDE1:
  678. .long LASFDE1-EH_frame1
  679. .quad LFB16-.
  680. .set L$set$2,LFE16-LFB16
  681. .quad L$set$2
  682. .byte 0
  683. .byte 0x4
  684. .set L$set$3,LCFI0-LFB16
  685. .long L$set$3
  686. .byte 0xe
  687. .byte 0x18
  688. .byte 0x4
  689. .set L$set$4,LCFI1-LCFI0
  690. .long L$set$4
  691. .byte 0xe
  692. .byte 0x8
  693. .align 3
  694. LEFDE1:
  695. LSFDE3:
  696. .set L$set$5,LEFDE3-LASFDE3
  697. .long L$set$5
  698. LASFDE3:
  699. .long LASFDE3-EH_frame1
  700. .quad LFB17-.
  701. .set L$set$6,LFE17-LFB17
  702. .quad L$set$6
  703. .byte 0
  704. .byte 0x4
  705. .set L$set$7,LCFI2-LFB17
  706. .long L$set$7
  707. .byte 0xe
  708. .byte 0x10
  709. .byte 0x8c
  710. .byte 0x2
  711. .byte 0x4
  712. .set L$set$8,LCFI3-LCFI2
  713. .long L$set$8
  714. .byte 0xe
  715. .byte 0x18
  716. .byte 0x86
  717. .byte 0x3
  718. .byte 0x4
  719. .set L$set$9,LCFI4-LCFI3
  720. .long L$set$9
  721. .byte 0xe
  722. .byte 0x20
  723. .byte 0x83
  724. .byte 0x4
  725. .byte 0x4
  726. .set L$set$10,LCFI5-LCFI4
  727. .long L$set$10
  728. .byte 0xe
  729. .byte 0x18
  730. .byte 0x4
  731. .set L$set$11,LCFI6-LCFI5
  732. .long L$set$11
  733. .byte 0xe
  734. .byte 0x10
  735. .byte 0x4
  736. .set L$set$12,LCFI7-LCFI6
  737. .long L$set$12
  738. .byte 0xe
  739. .byte 0x8
  740. .align 3
  741. LEFDE3:
  742. .subsections_via_symbols
  743.  
  744.  
  745.  
  746. ==> powersoftwo-5-c2.s <===================================================
  747. .text
  748. .align 4,0x90
  749. .globl _isPowerOfTwo
  750. _isPowerOfTwo:
  751. LFB16:
  752. subq $16, %rsp
  753. LCFI0:
  754. xorl %eax, %eax
  755. testl %edi, %edi
  756. movdqa LC0(%rip), %xmm0
  757. movdqa %xmm0, -120(%rsp)
  758. movdqa LC1(%rip), %xmm0
  759. movdqa %xmm0, -104(%rsp)
  760. movdqa LC2(%rip), %xmm0
  761. movdqa %xmm0, -88(%rsp)
  762. movdqa LC3(%rip), %xmm0
  763. movdqa %xmm0, -72(%rsp)
  764. movdqa LC4(%rip), %xmm0
  765. movdqa %xmm0, -56(%rsp)
  766. movdqa LC5(%rip), %xmm0
  767. movdqa %xmm0, -40(%rsp)
  768. movdqa LC6(%rip), %xmm0
  769. movdqa %xmm0, -24(%rsp)
  770. movdqa LC7(%rip), %xmm0
  771. movdqa %xmm0, -8(%rsp)
  772. je L4
  773. cmpl $1, %edi
  774. movb $1, %al
  775. je L4
  776. cmpl $65536, %edi
  777. movl $65536, %esi
  778. je L5
  779. movl $16, %edx
  780. movb $16, %al
  781. jmp L8
  782. .align 4,0x90
  783. L14:
  784. cmpl $1, %eax
  785. jle L5
  786. L8:
  787. movl %eax, %ecx
  788. movl %edx, %r8d
  789. shrl $31, %ecx
  790. addl %eax, %ecx
  791. sarl %eax
  792. sarl %ecx
  793. addl %eax, %edx
  794. subl %ecx, %r8d
  795. cmpl %esi, %edi
  796. cmovb %r8d, %edx
  797. movslq %edx, %rcx
  798. movl -120(%rsp,%rcx,4), %esi
  799. cmpl %edi, %esi
  800. jne L14
  801. L5:
  802. xorl %eax, %eax
  803. cmpl %esi, %edi
  804. sete %al
  805. L4:
  806. addq $16, %rsp
  807. LCFI1:
  808. ret
  809. LFE16:
  810. .cstring
  811. .align 3
  812. LC8:
  813. .ascii "%d powers of two found in %lu ns\12\0"
  814. .section __TEXT,__text_startup,regular,pure_instructions
  815. .align 4
  816. .globl _main
  817. _main:
  818. LFB17:
  819. pushq %r12
  820. LCFI2:
  821. pushq %rbp
  822. LCFI3:
  823. xorl %ebp, %ebp
  824. pushq %rbx
  825. LCFI4:
  826. xorl %ebx, %ebx
  827. call _mach_absolute_time
  828. movq %rax, %r12
  829. .align 4
  830. L16:
  831. movl %ebp, %edi
  832. call _isPowerOfTwo
  833. testl %eax, %eax
  834. setne %al
  835. addl $1, %ebp
  836. movzbl %al, %eax
  837. addl %eax, %ebx
  838. cmpl $-1, %ebp
  839. jne L16
  840. call _mach_absolute_time
  841. leaq LC8(%rip), %rdi
  842. movl %ebx, %esi
  843. subq %r12, %rax
  844. movq %rax, %rdx
  845. xorl %eax, %eax
  846. call _printf
  847. popq %rbx
  848. LCFI5:
  849. xorl %eax, %eax
  850. popq %rbp
  851. LCFI6:
  852. popq %r12
  853. LCFI7:
  854. ret
  855. LFE17:
  856. .literal16
  857. .align 4
  858. LC0:
  859. .long 1
  860. .long 2
  861. .long 4
  862. .long 8
  863. .align 4
  864. LC1:
  865. .long 16
  866. .long 32
  867. .long 64
  868. .long 128
  869. .align 4
  870. LC2:
  871. .long 256
  872. .long 512
  873. .long 1024
  874. .long 2048
  875. .align 4
  876. LC3:
  877. .long 4096
  878. .long 8192
  879. .long 16384
  880. .long 32768
  881. .align 4
  882. LC4:
  883. .long 65536
  884. .long 131072
  885. .long 262144
  886. .long 524288
  887. .align 4
  888. LC5:
  889. .long 1048576
  890. .long 2097152
  891. .long 4194304
  892. .long 8388608
  893. .align 4
  894. LC6:
  895. .long 16777216
  896. .long 33554432
  897. .long 67108864
  898. .long 134217728
  899. .align 4
  900. LC7:
  901. .long 268435456
  902. .long 536870912
  903. .long 1073741824
  904. .long -2147483648
  905. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  906. EH_frame1:
  907. .set L$set$0,LECIE1-LSCIE1
  908. .long L$set$0
  909. LSCIE1:
  910. .long 0
  911. .byte 0x1
  912. .ascii "zR\0"
  913. .byte 0x1
  914. .byte 0x78
  915. .byte 0x10
  916. .byte 0x1
  917. .byte 0x10
  918. .byte 0xc
  919. .byte 0x7
  920. .byte 0x8
  921. .byte 0x90
  922. .byte 0x1
  923. .align 3
  924. LECIE1:
  925. LSFDE1:
  926. .set L$set$1,LEFDE1-LASFDE1
  927. .long L$set$1
  928. LASFDE1:
  929. .long LASFDE1-EH_frame1
  930. .quad LFB16-.
  931. .set L$set$2,LFE16-LFB16
  932. .quad L$set$2
  933. .byte 0
  934. .byte 0x4
  935. .set L$set$3,LCFI0-LFB16
  936. .long L$set$3
  937. .byte 0xe
  938. .byte 0x18
  939. .byte 0x4
  940. .set L$set$4,LCFI1-LCFI0
  941. .long L$set$4
  942. .byte 0xe
  943. .byte 0x8
  944. .align 3
  945. LEFDE1:
  946. LSFDE3:
  947. .set L$set$5,LEFDE3-LASFDE3
  948. .long L$set$5
  949. LASFDE3:
  950. .long LASFDE3-EH_frame1
  951. .quad LFB17-.
  952. .set L$set$6,LFE17-LFB17
  953. .quad L$set$6
  954. .byte 0
  955. .byte 0x4
  956. .set L$set$7,LCFI2-LFB17
  957. .long L$set$7
  958. .byte 0xe
  959. .byte 0x10
  960. .byte 0x8c
  961. .byte 0x2
  962. .byte 0x4
  963. .set L$set$8,LCFI3-LCFI2
  964. .long L$set$8
  965. .byte 0xe
  966. .byte 0x18
  967. .byte 0x86
  968. .byte 0x3
  969. .byte 0x4
  970. .set L$set$9,LCFI4-LCFI3
  971. .long L$set$9
  972. .byte 0xe
  973. .byte 0x20
  974. .byte 0x83
  975. .byte 0x4
  976. .byte 0x4
  977. .set L$set$10,LCFI5-LCFI4
  978. .long L$set$10
  979. .byte 0xe
  980. .byte 0x18
  981. .byte 0x4
  982. .set L$set$11,LCFI6-LCFI5
  983. .long L$set$11
  984. .byte 0xe
  985. .byte 0x10
  986. .byte 0x4
  987. .set L$set$12,LCFI7-LCFI6
  988. .long L$set$12
  989. .byte 0xe
  990. .byte 0x8
  991. .align 3
  992. LEFDE3:
  993. .subsections_via_symbols
  994.  
  995.  
  996.  
  997. ==> powersoftwo-6-c2.s <===================================================
  998. .text
  999. .align 4,0x90
  1000. .globl _isPowerOfTwo
  1001. _isPowerOfTwo:
  1002. LFB16:
  1003. pushq %rbx
  1004. LCFI0:
  1005. movl %edi, %edx
  1006. xorl %eax, %eax
  1007. addq $-128, %rsp
  1008. LCFI1:
  1009. subl $1, %edx
  1010. movl %edi, %ebx
  1011. movdqa LC0(%rip), %xmm0
  1012. movdqa %xmm0, (%rsp)
  1013. movdqa LC1(%rip), %xmm0
  1014. movdqa %xmm0, 16(%rsp)
  1015. movdqa LC2(%rip), %xmm0
  1016. movdqa %xmm0, 32(%rsp)
  1017. movdqa LC3(%rip), %xmm0
  1018. movdqa %xmm0, 48(%rsp)
  1019. movdqa LC4(%rip), %xmm0
  1020. movdqa %xmm0, 64(%rsp)
  1021. movdqa LC5(%rip), %xmm0
  1022. movdqa %xmm0, 80(%rsp)
  1023. movdqa LC6(%rip), %xmm0
  1024. movdqa %xmm0, 96(%rsp)
  1025. movdqa LC7(%rip), %xmm0
  1026. movdqa %xmm0, 112(%rsp)
  1027. js L2
  1028. mov %edi, %eax
  1029. cvtsi2sdq %rax, %xmm0
  1030. call _log
  1031. movl $1, %eax
  1032. divsd LC8(%rip), %xmm0
  1033. cvttsd2si %xmm0, %edx
  1034. movslq %edx, %rcx
  1035. cmpl %ebx, (%rsp,%rcx,4)
  1036. je L2
  1037. addl $1, %edx
  1038. xorl %eax, %eax
  1039. movslq %edx, %rdx
  1040. cmpl (%rsp,%rdx,4), %ebx
  1041. sete %al
  1042. L2:
  1043. subq $-128, %rsp
  1044. LCFI2:
  1045. popq %rbx
  1046. LCFI3:
  1047. ret
  1048. LFE16:
  1049. .cstring
  1050. .align 3
  1051. LC9:
  1052. .ascii "%d powers of two found in %lu ns\12\0"
  1053. .section __TEXT,__text_startup,regular,pure_instructions
  1054. .align 4
  1055. .globl _main
  1056. _main:
  1057. LFB17:
  1058. pushq %r12
  1059. LCFI4:
  1060. pushq %rbp
  1061. LCFI5:
  1062. xorl %ebp, %ebp
  1063. pushq %rbx
  1064. LCFI6:
  1065. xorl %ebx, %ebx
  1066. call _mach_absolute_time
  1067. movq %rax, %r12
  1068. .align 4
  1069. L10:
  1070. movl %ebp, %edi
  1071. call _isPowerOfTwo
  1072. testl %eax, %eax
  1073. setne %al
  1074. addl $1, %ebp
  1075. movzbl %al, %eax
  1076. addl %eax, %ebx
  1077. cmpl $-1, %ebp
  1078. jne L10
  1079. call _mach_absolute_time
  1080. leaq LC9(%rip), %rdi
  1081. movl %ebx, %esi
  1082. subq %r12, %rax
  1083. movq %rax, %rdx
  1084. xorl %eax, %eax
  1085. call _printf
  1086. popq %rbx
  1087. LCFI7:
  1088. xorl %eax, %eax
  1089. popq %rbp
  1090. LCFI8:
  1091. popq %r12
  1092. LCFI9:
  1093. ret
  1094. LFE17:
  1095. .literal16
  1096. .align 4
  1097. LC0:
  1098. .long 1
  1099. .long 2
  1100. .long 4
  1101. .long 8
  1102. .align 4
  1103. LC1:
  1104. .long 16
  1105. .long 32
  1106. .long 64
  1107. .long 128
  1108. .align 4
  1109. LC2:
  1110. .long 256
  1111. .long 512
  1112. .long 1024
  1113. .long 2048
  1114. .align 4
  1115. LC3:
  1116. .long 4096
  1117. .long 8192
  1118. .long 16384
  1119. .long 32768
  1120. .align 4
  1121. LC4:
  1122. .long 65536
  1123. .long 131072
  1124. .long 262144
  1125. .long 524288
  1126. .align 4
  1127. LC5:
  1128. .long 1048576
  1129. .long 2097152
  1130. .long 4194304
  1131. .long 8388608
  1132. .align 4
  1133. LC6:
  1134. .long 16777216
  1135. .long 33554432
  1136. .long 67108864
  1137. .long 134217728
  1138. .align 4
  1139. LC7:
  1140. .long 268435456
  1141. .long 536870912
  1142. .long 1073741824
  1143. .long -2147483648
  1144. .literal8
  1145. .align 3
  1146. LC8:
  1147. .long 4277811695
  1148. .long 1072049730
  1149. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  1150. EH_frame1:
  1151. .set L$set$0,LECIE1-LSCIE1
  1152. .long L$set$0
  1153. LSCIE1:
  1154. .long 0
  1155. .byte 0x1
  1156. .ascii "zR\0"
  1157. .byte 0x1
  1158. .byte 0x78
  1159. .byte 0x10
  1160. .byte 0x1
  1161. .byte 0x10
  1162. .byte 0xc
  1163. .byte 0x7
  1164. .byte 0x8
  1165. .byte 0x90
  1166. .byte 0x1
  1167. .align 3
  1168. LECIE1:
  1169. LSFDE1:
  1170. .set L$set$1,LEFDE1-LASFDE1
  1171. .long L$set$1
  1172. LASFDE1:
  1173. .long LASFDE1-EH_frame1
  1174. .quad LFB16-.
  1175. .set L$set$2,LFE16-LFB16
  1176. .quad L$set$2
  1177. .byte 0
  1178. .byte 0x4
  1179. .set L$set$3,LCFI0-LFB16
  1180. .long L$set$3
  1181. .byte 0xe
  1182. .byte 0x10
  1183. .byte 0x83
  1184. .byte 0x2
  1185. .byte 0x4
  1186. .set L$set$4,LCFI1-LCFI0
  1187. .long L$set$4
  1188. .byte 0xe
  1189. .byte 0x90,0x1
  1190. .byte 0x4
  1191. .set L$set$5,LCFI2-LCFI1
  1192. .long L$set$5
  1193. .byte 0xe
  1194. .byte 0x10
  1195. .byte 0x4
  1196. .set L$set$6,LCFI3-LCFI2
  1197. .long L$set$6
  1198. .byte 0xe
  1199. .byte 0x8
  1200. .align 3
  1201. LEFDE1:
  1202. LSFDE3:
  1203. .set L$set$7,LEFDE3-LASFDE3
  1204. .long L$set$7
  1205. LASFDE3:
  1206. .long LASFDE3-EH_frame1
  1207. .quad LFB17-.
  1208. .set L$set$8,LFE17-LFB17
  1209. .quad L$set$8
  1210. .byte 0
  1211. .byte 0x4
  1212. .set L$set$9,LCFI4-LFB17
  1213. .long L$set$9
  1214. .byte 0xe
  1215. .byte 0x10
  1216. .byte 0x8c
  1217. .byte 0x2
  1218. .byte 0x4
  1219. .set L$set$10,LCFI5-LCFI4
  1220. .long L$set$10
  1221. .byte 0xe
  1222. .byte 0x18
  1223. .byte 0x86
  1224. .byte 0x3
  1225. .byte 0x4
  1226. .set L$set$11,LCFI6-LCFI5
  1227. .long L$set$11
  1228. .byte 0xe
  1229. .byte 0x20
  1230. .byte 0x83
  1231. .byte 0x4
  1232. .byte 0x4
  1233. .set L$set$12,LCFI7-LCFI6
  1234. .long L$set$12
  1235. .byte 0xe
  1236. .byte 0x18
  1237. .byte 0x4
  1238. .set L$set$13,LCFI8-LCFI7
  1239. .long L$set$13
  1240. .byte 0xe
  1241. .byte 0x10
  1242. .byte 0x4
  1243. .set L$set$14,LCFI9-LCFI8
  1244. .long L$set$14
  1245. .byte 0xe
  1246. .byte 0x8
  1247. .align 3
  1248. LEFDE3:
  1249. .subsections_via_symbols
  1250.  
  1251.  
  1252.  
  1253. ==> powersoftwo-7-c2.s <===================================================
  1254. .text
  1255. .align 4,0x90
  1256. .globl _isPowerOfTwo
  1257. _isPowerOfTwo:
  1258. LFB16:
  1259. xorl %eax, %eax
  1260. testl %edi, %edi
  1261. jne L5
  1262. jmp L2
  1263. .align 4,0x90
  1264. L11:
  1265. testl %edi, %edi
  1266. je L8
  1267. L5:
  1268. leal 1(%rax), %edx
  1269. testb $1, %dil
  1270. cmovne %edx, %eax
  1271. shrl %edi
  1272. cmpl $1, %eax
  1273. movl %eax, %edx
  1274. jbe L11
  1275. L8:
  1276. xorl %eax, %eax
  1277. cmpl $1, %edx
  1278. sete %al
  1279. L2:
  1280. rep
  1281. ret
  1282. LFE16:
  1283. .cstring
  1284. .align 3
  1285. LC0:
  1286. .ascii "%d powers of two found in %lu ns\12\0"
  1287. .section __TEXT,__text_startup,regular,pure_instructions
  1288. .align 4
  1289. .globl _main
  1290. _main:
  1291. LFB17:
  1292. pushq %rbx
  1293. LCFI0:
  1294. subq $16, %rsp
  1295. LCFI1:
  1296. call _mach_absolute_time
  1297. xorl %edi, %edi
  1298. xorl %esi, %esi
  1299. movq %rax, %rbx
  1300. xorl %eax, %eax
  1301. .align 4
  1302. L22:
  1303. cmpl $1, %eax
  1304. sete %al
  1305. addl $1, %edi
  1306. movzbl %al, %eax
  1307. addl %eax, %esi
  1308. cmpl $-1, %edi
  1309. je L23
  1310. movl %edi, %edx
  1311. xorl %eax, %eax
  1312. .align 4
  1313. L16:
  1314. leal 1(%rax), %ecx
  1315. testb $1, %dl
  1316. cmovne %ecx, %eax
  1317. shrl %edx
  1318. cmpl $1, %eax
  1319. ja L22
  1320. testl %edx, %edx
  1321. jne L16
  1322. jmp L22
  1323. L23:
  1324. movl %esi, 8(%rsp)
  1325. .p2align 4,,5
  1326. call _mach_absolute_time
  1327. movl 8(%rsp), %esi
  1328. leaq LC0(%rip), %rdi
  1329. subq %rbx, %rax
  1330. movq %rax, %rdx
  1331. xorl %eax, %eax
  1332. call _printf
  1333. addq $16, %rsp
  1334. LCFI2:
  1335. xorl %eax, %eax
  1336. popq %rbx
  1337. LCFI3:
  1338. ret
  1339. LFE17:
  1340. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  1341. EH_frame1:
  1342. .set L$set$0,LECIE1-LSCIE1
  1343. .long L$set$0
  1344. LSCIE1:
  1345. .long 0
  1346. .byte 0x1
  1347. .ascii "zR\0"
  1348. .byte 0x1
  1349. .byte 0x78
  1350. .byte 0x10
  1351. .byte 0x1
  1352. .byte 0x10
  1353. .byte 0xc
  1354. .byte 0x7
  1355. .byte 0x8
  1356. .byte 0x90
  1357. .byte 0x1
  1358. .align 3
  1359. LECIE1:
  1360. LSFDE1:
  1361. .set L$set$1,LEFDE1-LASFDE1
  1362. .long L$set$1
  1363. LASFDE1:
  1364. .long LASFDE1-EH_frame1
  1365. .quad LFB16-.
  1366. .set L$set$2,LFE16-LFB16
  1367. .quad L$set$2
  1368. .byte 0
  1369. .align 3
  1370. LEFDE1:
  1371. LSFDE3:
  1372. .set L$set$3,LEFDE3-LASFDE3
  1373. .long L$set$3
  1374. LASFDE3:
  1375. .long LASFDE3-EH_frame1
  1376. .quad LFB17-.
  1377. .set L$set$4,LFE17-LFB17
  1378. .quad L$set$4
  1379. .byte 0
  1380. .byte 0x4
  1381. .set L$set$5,LCFI0-LFB17
  1382. .long L$set$5
  1383. .byte 0xe
  1384. .byte 0x10
  1385. .byte 0x83
  1386. .byte 0x2
  1387. .byte 0x4
  1388. .set L$set$6,LCFI1-LCFI0
  1389. .long L$set$6
  1390. .byte 0xe
  1391. .byte 0x20
  1392. .byte 0x4
  1393. .set L$set$7,LCFI2-LCFI1
  1394. .long L$set$7
  1395. .byte 0xe
  1396. .byte 0x10
  1397. .byte 0x4
  1398. .set L$set$8,LCFI3-LCFI2
  1399. .long L$set$8
  1400. .byte 0xe
  1401. .byte 0x8
  1402. .align 3
  1403. LEFDE3:
  1404. .subsections_via_symbols
  1405.  
  1406.  
  1407.  
  1408. ==> powersoftwo-8-c2.s <===================================================
  1409. .text
  1410. .align 4,0x90
  1411. .globl _isPowerOfTwo
  1412. _isPowerOfTwo:
  1413. LFB16:
  1414. jmp L8
  1415. .align 4,0x90
  1416. L10:
  1417. cmpl $1, %edi
  1418. jbe L2
  1419. shrl %edi
  1420. L8:
  1421. testb $1, %dil
  1422. je L10
  1423. L2:
  1424. xorl %eax, %eax
  1425. cmpl $1, %edi
  1426. sete %al
  1427. ret
  1428. LFE16:
  1429. .cstring
  1430. .align 3
  1431. LC0:
  1432. .ascii "%d powers of two found in %lu ns\12\0"
  1433. .section __TEXT,__text_startup,regular,pure_instructions
  1434. .align 4
  1435. .globl _main
  1436. _main:
  1437. LFB17:
  1438. pushq %rbx
  1439. LCFI0:
  1440. subq $16, %rsp
  1441. LCFI1:
  1442. call _mach_absolute_time
  1443. xorl %edx, %edx
  1444. xorl %esi, %esi
  1445. movq %rax, %rbx
  1446. xorl %eax, %eax
  1447. .align 4
  1448. L24:
  1449. cmpl $1, %eax
  1450. sete %al
  1451. addl $1, %edx
  1452. movzbl %al, %eax
  1453. addl %eax, %esi
  1454. cmpl $-1, %edx
  1455. je L15
  1456. testb $1, %dl
  1457. jne L19
  1458. cmpl $1, %edx
  1459. movl %edx, %eax
  1460. jbe L19
  1461. .align 4
  1462. L21:
  1463. shrl %eax
  1464. testb $1, %al
  1465. jne L24
  1466. cmpl $1, %eax
  1467. ja L21
  1468. .p2align 4,,4
  1469. jmp L24
  1470. .align 4
  1471. L19:
  1472. movl %edx, %eax
  1473. jmp L24
  1474. L15:
  1475. movl %esi, 8(%rsp)
  1476. .p2align 4,,5
  1477. call _mach_absolute_time
  1478. movl 8(%rsp), %esi
  1479. leaq LC0(%rip), %rdi
  1480. subq %rbx, %rax
  1481. movq %rax, %rdx
  1482. xorl %eax, %eax
  1483. call _printf
  1484. addq $16, %rsp
  1485. LCFI2:
  1486. xorl %eax, %eax
  1487. popq %rbx
  1488. LCFI3:
  1489. ret
  1490. LFE17:
  1491. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  1492. EH_frame1:
  1493. .set L$set$0,LECIE1-LSCIE1
  1494. .long L$set$0
  1495. LSCIE1:
  1496. .long 0
  1497. .byte 0x1
  1498. .ascii "zR\0"
  1499. .byte 0x1
  1500. .byte 0x78
  1501. .byte 0x10
  1502. .byte 0x1
  1503. .byte 0x10
  1504. .byte 0xc
  1505. .byte 0x7
  1506. .byte 0x8
  1507. .byte 0x90
  1508. .byte 0x1
  1509. .align 3
  1510. LECIE1:
  1511. LSFDE1:
  1512. .set L$set$1,LEFDE1-LASFDE1
  1513. .long L$set$1
  1514. LASFDE1:
  1515. .long LASFDE1-EH_frame1
  1516. .quad LFB16-.
  1517. .set L$set$2,LFE16-LFB16
  1518. .quad L$set$2
  1519. .byte 0
  1520. .align 3
  1521. LEFDE1:
  1522. LSFDE3:
  1523. .set L$set$3,LEFDE3-LASFDE3
  1524. .long L$set$3
  1525. LASFDE3:
  1526. .long LASFDE3-EH_frame1
  1527. .quad LFB17-.
  1528. .set L$set$4,LFE17-LFB17
  1529. .quad L$set$4
  1530. .byte 0
  1531. .byte 0x4
  1532. .set L$set$5,LCFI0-LFB17
  1533. .long L$set$5
  1534. .byte 0xe
  1535. .byte 0x10
  1536. .byte 0x83
  1537. .byte 0x2
  1538. .byte 0x4
  1539. .set L$set$6,LCFI1-LCFI0
  1540. .long L$set$6
  1541. .byte 0xe
  1542. .byte 0x20
  1543. .byte 0x4
  1544. .set L$set$7,LCFI2-LCFI1
  1545. .long L$set$7
  1546. .byte 0xe
  1547. .byte 0x10
  1548. .byte 0x4
  1549. .set L$set$8,LCFI3-LCFI2
  1550. .long L$set$8
  1551. .byte 0xe
  1552. .byte 0x8
  1553. .align 3
  1554. LEFDE3:
  1555. .subsections_via_symbols
  1556.  
  1557.  
  1558.  
  1559. ==> powersoftwo-9a-c2.s <===================================================
  1560. .text
  1561. .align 4,0x90
  1562. .globl _isPowerOfTwo
  1563. _isPowerOfTwo:
  1564. LFB16:
  1565. xorl %eax, %eax
  1566. testl %edi, %edi
  1567. je L2
  1568. leal -1(%rdi), %eax
  1569. testl %edi, %eax
  1570. sete %al
  1571. movzbl %al, %eax
  1572. L2:
  1573. rep
  1574. ret
  1575. LFE16:
  1576. .cstring
  1577. .align 3
  1578. LC0:
  1579. .ascii "%d powers of two found in %lu ns\12\0"
  1580. .section __TEXT,__text_startup,regular,pure_instructions
  1581. .align 4
  1582. .globl _main
  1583. _main:
  1584. LFB17:
  1585. pushq %rbp
  1586. LCFI0:
  1587. pushq %rbx
  1588. LCFI1:
  1589. xorl %ebx, %ebx
  1590. subq $8, %rsp
  1591. LCFI2:
  1592. call _mach_absolute_time
  1593. movl $1, %edx
  1594. movq %rax, %rbp
  1595. xorl %eax, %eax
  1596. jmp L6
  1597. .align 4
  1598. L7:
  1599. addl $1, %eax
  1600. addl $1, %edx
  1601. L6:
  1602. testl %eax, %eax
  1603. je L7
  1604. leal -1(%rax), %ecx
  1605. testl %eax, %ecx
  1606. sete %cl
  1607. movzbl %cl, %ecx
  1608. addl %ecx, %ebx
  1609. cmpl $-1, %edx
  1610. jne L7
  1611. call _mach_absolute_time
  1612. leaq LC0(%rip), %rdi
  1613. movl %ebx, %esi
  1614. subq %rbp, %rax
  1615. movq %rax, %rdx
  1616. xorl %eax, %eax
  1617. call _printf
  1618. addq $8, %rsp
  1619. LCFI3:
  1620. xorl %eax, %eax
  1621. popq %rbx
  1622. LCFI4:
  1623. popq %rbp
  1624. LCFI5:
  1625. ret
  1626. LFE17:
  1627. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  1628. EH_frame1:
  1629. .set L$set$0,LECIE1-LSCIE1
  1630. .long L$set$0
  1631. LSCIE1:
  1632. .long 0
  1633. .byte 0x1
  1634. .ascii "zR\0"
  1635. .byte 0x1
  1636. .byte 0x78
  1637. .byte 0x10
  1638. .byte 0x1
  1639. .byte 0x10
  1640. .byte 0xc
  1641. .byte 0x7
  1642. .byte 0x8
  1643. .byte 0x90
  1644. .byte 0x1
  1645. .align 3
  1646. LECIE1:
  1647. LSFDE1:
  1648. .set L$set$1,LEFDE1-LASFDE1
  1649. .long L$set$1
  1650. LASFDE1:
  1651. .long LASFDE1-EH_frame1
  1652. .quad LFB16-.
  1653. .set L$set$2,LFE16-LFB16
  1654. .quad L$set$2
  1655. .byte 0
  1656. .align 3
  1657. LEFDE1:
  1658. LSFDE3:
  1659. .set L$set$3,LEFDE3-LASFDE3
  1660. .long L$set$3
  1661. LASFDE3:
  1662. .long LASFDE3-EH_frame1
  1663. .quad LFB17-.
  1664. .set L$set$4,LFE17-LFB17
  1665. .quad L$set$4
  1666. .byte 0
  1667. .byte 0x4
  1668. .set L$set$5,LCFI0-LFB17
  1669. .long L$set$5
  1670. .byte 0xe
  1671. .byte 0x10
  1672. .byte 0x86
  1673. .byte 0x2
  1674. .byte 0x4
  1675. .set L$set$6,LCFI1-LCFI0
  1676. .long L$set$6
  1677. .byte 0xe
  1678. .byte 0x18
  1679. .byte 0x83
  1680. .byte 0x3
  1681. .byte 0x4
  1682. .set L$set$7,LCFI2-LCFI1
  1683. .long L$set$7
  1684. .byte 0xe
  1685. .byte 0x20
  1686. .byte 0x4
  1687. .set L$set$8,LCFI3-LCFI2
  1688. .long L$set$8
  1689. .byte 0xe
  1690. .byte 0x18
  1691. .byte 0x4
  1692. .set L$set$9,LCFI4-LCFI3
  1693. .long L$set$9
  1694. .byte 0xe
  1695. .byte 0x10
  1696. .byte 0x4
  1697. .set L$set$10,LCFI5-LCFI4
  1698. .long L$set$10
  1699. .byte 0xe
  1700. .byte 0x8
  1701. .align 3
  1702. LEFDE3:
  1703. .subsections_via_symbols
  1704.  
  1705.  
  1706.  
  1707. ==> powersoftwo-9b-c2.s <===================================================
  1708. .text
  1709. .align 4,0x90
  1710. .globl _isPowerOfTwo
  1711. _isPowerOfTwo:
  1712. LFB16:
  1713. xorl %eax, %eax
  1714. testl %edi, %edi
  1715. je L2
  1716. movl %edi, %eax
  1717. negl %eax
  1718. andl %edi, %eax
  1719. cmpl %eax, %edi
  1720. sete %al
  1721. movzbl %al, %eax
  1722. L2:
  1723. rep
  1724. ret
  1725. LFE16:
  1726. .cstring
  1727. .align 3
  1728. LC0:
  1729. .ascii "%d powers of two found in %lu ns\12\0"
  1730. .section __TEXT,__text_startup,regular,pure_instructions
  1731. .align 4
  1732. .globl _main
  1733. _main:
  1734. LFB17:
  1735. pushq %rbp
  1736. LCFI0:
  1737. pushq %rbx
  1738. LCFI1:
  1739. xorl %ebx, %ebx
  1740. subq $8, %rsp
  1741. LCFI2:
  1742. call _mach_absolute_time
  1743. movl $1, %edx
  1744. movq %rax, %rbp
  1745. xorl %eax, %eax
  1746. jmp L6
  1747. .align 4
  1748. L7:
  1749. addl $1, %eax
  1750. addl $1, %edx
  1751. L6:
  1752. testl %eax, %eax
  1753. je L7
  1754. movl %eax, %ecx
  1755. negl %ecx
  1756. andl %eax, %ecx
  1757. cmpl %eax, %ecx
  1758. sete %cl
  1759. movzbl %cl, %ecx
  1760. addl %ecx, %ebx
  1761. cmpl $-1, %edx
  1762. jne L7
  1763. call _mach_absolute_time
  1764. leaq LC0(%rip), %rdi
  1765. movl %ebx, %esi
  1766. subq %rbp, %rax
  1767. movq %rax, %rdx
  1768. xorl %eax, %eax
  1769. call _printf
  1770. addq $8, %rsp
  1771. LCFI3:
  1772. xorl %eax, %eax
  1773. popq %rbx
  1774. LCFI4:
  1775. popq %rbp
  1776. LCFI5:
  1777. ret
  1778. LFE17:
  1779. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  1780. EH_frame1:
  1781. .set L$set$0,LECIE1-LSCIE1
  1782. .long L$set$0
  1783. LSCIE1:
  1784. .long 0
  1785. .byte 0x1
  1786. .ascii "zR\0"
  1787. .byte 0x1
  1788. .byte 0x78
  1789. .byte 0x10
  1790. .byte 0x1
  1791. .byte 0x10
  1792. .byte 0xc
  1793. .byte 0x7
  1794. .byte 0x8
  1795. .byte 0x90
  1796. .byte 0x1
  1797. .align 3
  1798. LECIE1:
  1799. LSFDE1:
  1800. .set L$set$1,LEFDE1-LASFDE1
  1801. .long L$set$1
  1802. LASFDE1:
  1803. .long LASFDE1-EH_frame1
  1804. .quad LFB16-.
  1805. .set L$set$2,LFE16-LFB16
  1806. .quad L$set$2
  1807. .byte 0
  1808. .align 3
  1809. LEFDE1:
  1810. LSFDE3:
  1811. .set L$set$3,LEFDE3-LASFDE3
  1812. .long L$set$3
  1813. LASFDE3:
  1814. .long LASFDE3-EH_frame1
  1815. .quad LFB17-.
  1816. .set L$set$4,LFE17-LFB17
  1817. .quad L$set$4
  1818. .byte 0
  1819. .byte 0x4
  1820. .set L$set$5,LCFI0-LFB17
  1821. .long L$set$5
  1822. .byte 0xe
  1823. .byte 0x10
  1824. .byte 0x86
  1825. .byte 0x2
  1826. .byte 0x4
  1827. .set L$set$6,LCFI1-LCFI0
  1828. .long L$set$6
  1829. .byte 0xe
  1830. .byte 0x18
  1831. .byte 0x83
  1832. .byte 0x3
  1833. .byte 0x4
  1834. .set L$set$7,LCFI2-LCFI1
  1835. .long L$set$7
  1836. .byte 0xe
  1837. .byte 0x20
  1838. .byte 0x4
  1839. .set L$set$8,LCFI3-LCFI2
  1840. .long L$set$8
  1841. .byte 0xe
  1842. .byte 0x18
  1843. .byte 0x4
  1844. .set L$set$9,LCFI4-LCFI3
  1845. .long L$set$9
  1846. .byte 0xe
  1847. .byte 0x10
  1848. .byte 0x4
  1849. .set L$set$10,LCFI5-LCFI4
  1850. .long L$set$10
  1851. .byte 0xe
  1852. .byte 0x8
  1853. .align 3
  1854. LEFDE3:
  1855. .subsections_via_symbols
  1856.  
  1857.  
  1858.  
  1859. ==> powersoftwo-R1-c2.s <===================================================
  1860. .text
  1861. .align 4,0x90
  1862. .globl _is_pot_recur
  1863. _is_pot_recur:
  1864. LFB16:
  1865. movl %esi, %ecx
  1866. movl $1, %edx
  1867. testl %ecx, %ecx
  1868. je L8
  1869. L16:
  1870. movl %edx, %eax
  1871. sall %cl, %eax
  1872. subl $1, %eax
  1873. movl %eax, %esi
  1874. sall %cl, %esi
  1875. andl %edi, %esi
  1876. cmpl $1, %esi
  1877. sbbl %r8d, %r8d
  1878. notl %r8d
  1879. andl $2, %r8d
  1880. testl %edi, %eax
  1881. setne %al
  1882. movzbl %al, %eax
  1883. addl %eax, %r8d
  1884. cmpl $1, %r8d
  1885. je L13
  1886. cmpl $2, %r8d
  1887. je L15
  1888. xorl %eax, %eax
  1889. ret
  1890. .align 4,0x90
  1891. L15:
  1892. shrl %cl, %edi
  1893. L13:
  1894. shrl %ecx
  1895. testl %ecx, %ecx
  1896. jne L16
  1897. L8:
  1898. movl $1, %eax
  1899. ret
  1900. LFE16:
  1901. .align 4,0x90
  1902. .globl _is_pot
  1903. _is_pot:
  1904. LFB17:
  1905. movl $-65536, %r9d
  1906. movl $65535, %edx
  1907. movl $16, %esi
  1908. movl $16, %eax
  1909. movl $1, %r8d
  1910. L18:
  1911. movl %r9d, %ecx
  1912. andl %edi, %ecx
  1913. cmpl $1, %ecx
  1914. sbbl %ecx, %ecx
  1915. notl %ecx
  1916. andl $2, %ecx
  1917. testl %edx, %edi
  1918. setne %dl
  1919. movzbl %dl, %edx
  1920. addl %edx, %ecx
  1921. cmpl $1, %ecx
  1922. je L21
  1923. cmpl $2, %ecx
  1924. je L28
  1925. xorl %eax, %eax
  1926. ret
  1927. .align 4,0x90
  1928. L21:
  1929. shrl %eax
  1930. L23:
  1931. movl %eax, %ecx
  1932. movl %r8d, %edx
  1933. movl %eax, %esi
  1934. sall %cl, %edx
  1935. subl $1, %edx
  1936. movl %edx, %r9d
  1937. sall %cl, %r9d
  1938. testl %eax, %eax
  1939. jne L18
  1940. movl $1, %eax
  1941. ret
  1942. .align 4,0x90
  1943. L28:
  1944. movl %esi, %ecx
  1945. shrl %eax
  1946. shrl %cl, %edi
  1947. jmp L23
  1948. LFE17:
  1949. .cstring
  1950. .align 3
  1951. LC0:
  1952. .ascii "%d powers of two found in %lu ns\12\0"
  1953. .section __TEXT,__text_startup,regular,pure_instructions
  1954. .align 4
  1955. .globl _main
  1956. _main:
  1957. LFB18:
  1958. pushq %rbp
  1959. LCFI0:
  1960. pushq %rbx
  1961. LCFI1:
  1962. xorl %ebx, %ebx
  1963. subq $8, %rsp
  1964. LCFI2:
  1965. call _mach_absolute_time
  1966. xorl %edi, %edi
  1967. movl $1, %r9d
  1968. movq %rax, %rbp
  1969. jmp L30
  1970. .align 4
  1971. L44:
  1972. cmpl $2, %ecx
  1973. je L43
  1974. xorl %eax, %eax
  1975. addl $1, %edi
  1976. addl %eax, %ebx
  1977. cmpl $-1, %edi
  1978. je L36
  1979. L30:
  1980. movl %edi, %edx
  1981. movl $-65536, %r10d
  1982. movl $65535, %esi
  1983. movl $16, %r8d
  1984. movl $16, %eax
  1985. L37:
  1986. movl %r10d, %ecx
  1987. andl %edx, %ecx
  1988. cmpl $1, %ecx
  1989. sbbl %ecx, %ecx
  1990. notl %ecx
  1991. andl $2, %ecx
  1992. testl %esi, %edx
  1993. setne %sil
  1994. movzbl %sil, %esi
  1995. addl %esi, %ecx
  1996. cmpl $1, %ecx
  1997. jne L44
  1998. L42:
  1999. shrl %eax
  2000. movl %r9d, %esi
  2001. movl %eax, %ecx
  2002. movl %eax, %r8d
  2003. sall %cl, %esi
  2004. subl $1, %esi
  2005. movl %esi, %r10d
  2006. sall %cl, %r10d
  2007. testl %eax, %eax
  2008. jne L37
  2009. movl $1, %eax
  2010. addl $1, %edi
  2011. addl %eax, %ebx
  2012. cmpl $-1, %edi
  2013. jne L30
  2014. L36:
  2015. call _mach_absolute_time
  2016. leaq LC0(%rip), %rdi
  2017. movl %ebx, %esi
  2018. subq %rbp, %rax
  2019. movq %rax, %rdx
  2020. xorl %eax, %eax
  2021. call _printf
  2022. addq $8, %rsp
  2023. LCFI3:
  2024. xorl %eax, %eax
  2025. popq %rbx
  2026. LCFI4:
  2027. popq %rbp
  2028. LCFI5:
  2029. ret
  2030. .align 4
  2031. L43:
  2032. LCFI6:
  2033. movl %r8d, %ecx
  2034. shrl %cl, %edx
  2035. jmp L42
  2036. LFE18:
  2037. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  2038. EH_frame1:
  2039. .set L$set$0,LECIE1-LSCIE1
  2040. .long L$set$0
  2041. LSCIE1:
  2042. .long 0
  2043. .byte 0x1
  2044. .ascii "zR\0"
  2045. .byte 0x1
  2046. .byte 0x78
  2047. .byte 0x10
  2048. .byte 0x1
  2049. .byte 0x10
  2050. .byte 0xc
  2051. .byte 0x7
  2052. .byte 0x8
  2053. .byte 0x90
  2054. .byte 0x1
  2055. .align 3
  2056. LECIE1:
  2057. LSFDE1:
  2058. .set L$set$1,LEFDE1-LASFDE1
  2059. .long L$set$1
  2060. LASFDE1:
  2061. .long LASFDE1-EH_frame1
  2062. .quad LFB16-.
  2063. .set L$set$2,LFE16-LFB16
  2064. .quad L$set$2
  2065. .byte 0
  2066. .align 3
  2067. LEFDE1:
  2068. LSFDE3:
  2069. .set L$set$3,LEFDE3-LASFDE3
  2070. .long L$set$3
  2071. LASFDE3:
  2072. .long LASFDE3-EH_frame1
  2073. .quad LFB17-.
  2074. .set L$set$4,LFE17-LFB17
  2075. .quad L$set$4
  2076. .byte 0
  2077. .align 3
  2078. LEFDE3:
  2079. LSFDE5:
  2080. .set L$set$5,LEFDE5-LASFDE5
  2081. .long L$set$5
  2082. LASFDE5:
  2083. .long LASFDE5-EH_frame1
  2084. .quad LFB18-.
  2085. .set L$set$6,LFE18-LFB18
  2086. .quad L$set$6
  2087. .byte 0
  2088. .byte 0x4
  2089. .set L$set$7,LCFI0-LFB18
  2090. .long L$set$7
  2091. .byte 0xe
  2092. .byte 0x10
  2093. .byte 0x86
  2094. .byte 0x2
  2095. .byte 0x4
  2096. .set L$set$8,LCFI1-LCFI0
  2097. .long L$set$8
  2098. .byte 0xe
  2099. .byte 0x18
  2100. .byte 0x83
  2101. .byte 0x3
  2102. .byte 0x4
  2103. .set L$set$9,LCFI2-LCFI1
  2104. .long L$set$9
  2105. .byte 0xe
  2106. .byte 0x20
  2107. .byte 0x4
  2108. .set L$set$10,LCFI3-LCFI2
  2109. .long L$set$10
  2110. .byte 0xa
  2111. .byte 0xe
  2112. .byte 0x18
  2113. .byte 0x4
  2114. .set L$set$11,LCFI4-LCFI3
  2115. .long L$set$11
  2116. .byte 0xe
  2117. .byte 0x10
  2118. .byte 0x4
  2119. .set L$set$12,LCFI5-LCFI4
  2120. .long L$set$12
  2121. .byte 0xe
  2122. .byte 0x8
  2123. .byte 0x4
  2124. .set L$set$13,LCFI6-LCFI5
  2125. .long L$set$13
  2126. .byte 0xb
  2127. .align 3
  2128. LEFDE5:
  2129. .subsections_via_symbols
  2130.  
  2131.  
  2132.  
  2133. ==> powersoftwo-R2-c2.s <===================================================
  2134. .text
  2135. .align 4,0x90
  2136. .globl _isPowerOfTwo
  2137. _isPowerOfTwo:
  2138. LFB16:
  2139. testl $1431655765, %edi
  2140. je L2
  2141. xorl %eax, %eax
  2142. testl $-1431655766, %edi
  2143. jne L3
  2144. L2:
  2145. testl $858993459, %edi
  2146. jne L14
  2147. testl $252645135, %edi
  2148. jne L15
  2149. L5:
  2150. testl $16711935, %edi
  2151. je L6
  2152. xorl %eax, %eax
  2153. testl $-16711936, %edi
  2154. jne L3
  2155. L6:
  2156. testw %di, %di
  2157. movl $1, %eax
  2158. je L3
  2159. xorl %eax, %eax
  2160. andl $-65536, %edi
  2161. sete %al
  2162. L3:
  2163. rep
  2164. ret
  2165. .align 4,0x90
  2166. L14:
  2167. xorl %eax, %eax
  2168. testl $-858993460, %edi
  2169. jne L3
  2170. testl $252645135, %edi
  2171. je L5
  2172. L15:
  2173. xorl %eax, %eax
  2174. testl $-252645136, %edi
  2175. je L5
  2176. rep
  2177. ret
  2178. LFE16:
  2179. .cstring
  2180. .align 3
  2181. LC0:
  2182. .ascii "%d powers of two found in %lu ns\12\0"
  2183. .section __TEXT,__text_startup,regular,pure_instructions
  2184. .align 4
  2185. .globl _main
  2186. _main:
  2187. LFB17:
  2188. pushq %rbp
  2189. LCFI0:
  2190. pushq %rbx
  2191. LCFI1:
  2192. xorl %ebx, %ebx
  2193. subq $8, %rsp
  2194. LCFI2:
  2195. call _mach_absolute_time
  2196. movq %rax, %rbp
  2197. xorl %eax, %eax
  2198. .align 4
  2199. L22:
  2200. testl $1431655765, %eax
  2201. je L17
  2202. xorl %edx, %edx
  2203. testl $-1431655766, %eax
  2204. jne L18
  2205. L17:
  2206. testl $858993459, %eax
  2207. je L19
  2208. xorl %edx, %edx
  2209. testl $-858993460, %eax
  2210. jne L18
  2211. L19:
  2212. testl $252645135, %eax
  2213. je L20
  2214. xorl %edx, %edx
  2215. testl $-252645136, %eax
  2216. jne L18
  2217. L20:
  2218. testl $16711935, %eax
  2219. je L21
  2220. xorl %edx, %edx
  2221. testl $-16711936, %eax
  2222. jne L18
  2223. L21:
  2224. testw %ax, %ax
  2225. movl $1, %edx
  2226. je L18
  2227. xorl %edx, %edx
  2228. testl $-65536, %eax
  2229. sete %dl
  2230. .align 4
  2231. L18:
  2232. addl $1, %eax
  2233. addl %edx, %ebx
  2234. cmpl $-1, %eax
  2235. jne L22
  2236. call _mach_absolute_time
  2237. leaq LC0(%rip), %rdi
  2238. movl %ebx, %esi
  2239. subq %rbp, %rax
  2240. movq %rax, %rdx
  2241. xorl %eax, %eax
  2242. call _printf
  2243. addq $8, %rsp
  2244. LCFI3:
  2245. xorl %eax, %eax
  2246. popq %rbx
  2247. LCFI4:
  2248. popq %rbp
  2249. LCFI5:
  2250. ret
  2251. LFE17:
  2252. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  2253. EH_frame1:
  2254. .set L$set$0,LECIE1-LSCIE1
  2255. .long L$set$0
  2256. LSCIE1:
  2257. .long 0
  2258. .byte 0x1
  2259. .ascii "zR\0"
  2260. .byte 0x1
  2261. .byte 0x78
  2262. .byte 0x10
  2263. .byte 0x1
  2264. .byte 0x10
  2265. .byte 0xc
  2266. .byte 0x7
  2267. .byte 0x8
  2268. .byte 0x90
  2269. .byte 0x1
  2270. .align 3
  2271. LECIE1:
  2272. LSFDE1:
  2273. .set L$set$1,LEFDE1-LASFDE1
  2274. .long L$set$1
  2275. LASFDE1:
  2276. .long LASFDE1-EH_frame1
  2277. .quad LFB16-.
  2278. .set L$set$2,LFE16-LFB16
  2279. .quad L$set$2
  2280. .byte 0
  2281. .align 3
  2282. LEFDE1:
  2283. LSFDE3:
  2284. .set L$set$3,LEFDE3-LASFDE3
  2285. .long L$set$3
  2286. LASFDE3:
  2287. .long LASFDE3-EH_frame1
  2288. .quad LFB17-.
  2289. .set L$set$4,LFE17-LFB17
  2290. .quad L$set$4
  2291. .byte 0
  2292. .byte 0x4
  2293. .set L$set$5,LCFI0-LFB17
  2294. .long L$set$5
  2295. .byte 0xe
  2296. .byte 0x10
  2297. .byte 0x86
  2298. .byte 0x2
  2299. .byte 0x4
  2300. .set L$set$6,LCFI1-LCFI0
  2301. .long L$set$6
  2302. .byte 0xe
  2303. .byte 0x18
  2304. .byte 0x83
  2305. .byte 0x3
  2306. .byte 0x4
  2307. .set L$set$7,LCFI2-LCFI1
  2308. .long L$set$7
  2309. .byte 0xe
  2310. .byte 0x20
  2311. .byte 0x4
  2312. .set L$set$8,LCFI3-LCFI2
  2313. .long L$set$8
  2314. .byte 0xe
  2315. .byte 0x18
  2316. .byte 0x4
  2317. .set L$set$9,LCFI4-LCFI3
  2318. .long L$set$9
  2319. .byte 0xe
  2320. .byte 0x10
  2321. .byte 0x4
  2322. .set L$set$10,LCFI5-LCFI4
  2323. .long L$set$10
  2324. .byte 0xe
  2325. .byte 0x8
  2326. .align 3
  2327. LEFDE3:
  2328. .subsections_via_symbols
  2329.  
  2330.  
  2331.  
  2332. ==> powersoftwo-R3-c2.s <===================================================
  2333. .text
  2334. .align 4,0x90
  2335. .globl _isPowerOf2
  2336. _isPowerOf2:
  2337. LFB16:
  2338. subq $8, %rsp
  2339. LCFI0:
  2340. mov %edi, %edi
  2341. call ___popcountdi2
  2342. cmpl $1, %eax
  2343. sete %al
  2344. addq $8, %rsp
  2345. LCFI1:
  2346. movzbl %al, %eax
  2347. ret
  2348. LFE16:
  2349. .cstring
  2350. .align 3
  2351. LC0:
  2352. .ascii "%d powers of two found in %lu ns\12\0"
  2353. .section __TEXT,__text_startup,regular,pure_instructions
  2354. .align 4
  2355. .globl _main
  2356. _main:
  2357. LFB17:
  2358. pushq %r12
  2359. LCFI2:
  2360. pushq %rbp
  2361. LCFI3:
  2362. xorl %ebp, %ebp
  2363. pushq %rbx
  2364. LCFI4:
  2365. xorl %ebx, %ebx
  2366. call _mach_absolute_time
  2367. movq %rax, %r12
  2368. .align 4
  2369. L3:
  2370. mov %ebp, %edi
  2371. call ___popcountdi2
  2372. cmpl $1, %eax
  2373. sete %al
  2374. addl $1, %ebp
  2375. movzbl %al, %eax
  2376. addl %eax, %ebx
  2377. cmpl $-1, %ebp
  2378. jne L3
  2379. call _mach_absolute_time
  2380. leaq LC0(%rip), %rdi
  2381. movl %ebx, %esi
  2382. subq %r12, %rax
  2383. movq %rax, %rdx
  2384. xorl %eax, %eax
  2385. call _printf
  2386. popq %rbx
  2387. LCFI5:
  2388. xorl %eax, %eax
  2389. popq %rbp
  2390. LCFI6:
  2391. popq %r12
  2392. LCFI7:
  2393. ret
  2394. LFE17:
  2395. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  2396. EH_frame1:
  2397. .set L$set$0,LECIE1-LSCIE1
  2398. .long L$set$0
  2399. LSCIE1:
  2400. .long 0
  2401. .byte 0x1
  2402. .ascii "zR\0"
  2403. .byte 0x1
  2404. .byte 0x78
  2405. .byte 0x10
  2406. .byte 0x1
  2407. .byte 0x10
  2408. .byte 0xc
  2409. .byte 0x7
  2410. .byte 0x8
  2411. .byte 0x90
  2412. .byte 0x1
  2413. .align 3
  2414. LECIE1:
  2415. LSFDE1:
  2416. .set L$set$1,LEFDE1-LASFDE1
  2417. .long L$set$1
  2418. LASFDE1:
  2419. .long LASFDE1-EH_frame1
  2420. .quad LFB16-.
  2421. .set L$set$2,LFE16-LFB16
  2422. .quad L$set$2
  2423. .byte 0
  2424. .byte 0x4
  2425. .set L$set$3,LCFI0-LFB16
  2426. .long L$set$3
  2427. .byte 0xe
  2428. .byte 0x10
  2429. .byte 0x4
  2430. .set L$set$4,LCFI1-LCFI0
  2431. .long L$set$4
  2432. .byte 0xe
  2433. .byte 0x8
  2434. .align 3
  2435. LEFDE1:
  2436. LSFDE3:
  2437. .set L$set$5,LEFDE3-LASFDE3
  2438. .long L$set$5
  2439. LASFDE3:
  2440. .long LASFDE3-EH_frame1
  2441. .quad LFB17-.
  2442. .set L$set$6,LFE17-LFB17
  2443. .quad L$set$6
  2444. .byte 0
  2445. .byte 0x4
  2446. .set L$set$7,LCFI2-LFB17
  2447. .long L$set$7
  2448. .byte 0xe
  2449. .byte 0x10
  2450. .byte 0x8c
  2451. .byte 0x2
  2452. .byte 0x4
  2453. .set L$set$8,LCFI3-LCFI2
  2454. .long L$set$8
  2455. .byte 0xe
  2456. .byte 0x18
  2457. .byte 0x86
  2458. .byte 0x3
  2459. .byte 0x4
  2460. .set L$set$9,LCFI4-LCFI3
  2461. .long L$set$9
  2462. .byte 0xe
  2463. .byte 0x20
  2464. .byte 0x83
  2465. .byte 0x4
  2466. .byte 0x4
  2467. .set L$set$10,LCFI5-LCFI4
  2468. .long L$set$10
  2469. .byte 0xe
  2470. .byte 0x18
  2471. .byte 0x4
  2472. .set L$set$11,LCFI6-LCFI5
  2473. .long L$set$11
  2474. .byte 0xe
  2475. .byte 0x10
  2476. .byte 0x4
  2477. .set L$set$12,LCFI7-LCFI6
  2478. .long L$set$12
  2479. .byte 0xe
  2480. .byte 0x8
  2481. .align 3
  2482. LEFDE3:
  2483. .subsections_via_symbols
  2484.  
  2485.  
  2486.  
  2487. ==> powersoftwo-R3-i7.s <===================================================
  2488. .text
  2489. .align 4,0x90
  2490. .globl _isPowerOf2
  2491. _isPowerOf2:
  2492. LFB16:
  2493. popcnt %edi, %edi
  2494. xorl %eax, %eax
  2495. cmpl $1, %edi
  2496. sete %al
  2497. ret
  2498. LFE16:
  2499. .cstring
  2500. .align 3
  2501. LC0:
  2502. .ascii "%d powers of two found in %lu ns\12\0"
  2503. .section __TEXT,__text_startup,regular,pure_instructions
  2504. .align 4
  2505. .globl _main
  2506. _main:
  2507. LFB17:
  2508. pushq %rbp
  2509. LCFI0:
  2510. pushq %rbx
  2511. LCFI1:
  2512. xorl %ebx, %ebx
  2513. subq $8, %rsp
  2514. LCFI2:
  2515. call _mach_absolute_time
  2516. movq %rax, %rbp
  2517. xorl %eax, %eax
  2518. .align 4
  2519. L3:
  2520. popcnt %eax, %edx
  2521. cmpl $1, %edx
  2522. sete %dl
  2523. addl $1, %eax
  2524. movzbl %dl, %edx
  2525. addl %edx, %ebx
  2526. cmpl $-1, %eax
  2527. jne L3
  2528. call _mach_absolute_time
  2529. leaq LC0(%rip), %rdi
  2530. movl %ebx, %esi
  2531. subq %rbp, %rax
  2532. movq %rax, %rdx
  2533. xorl %eax, %eax
  2534. call _printf
  2535. addq $8, %rsp
  2536. LCFI3:
  2537. xorl %eax, %eax
  2538. popq %rbx
  2539. LCFI4:
  2540. popq %rbp
  2541. LCFI5:
  2542. ret
  2543. LFE17:
  2544. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  2545. EH_frame1:
  2546. .set L$set$0,LECIE1-LSCIE1
  2547. .long L$set$0
  2548. LSCIE1:
  2549. .long 0
  2550. .byte 0x1
  2551. .ascii "zR\0"
  2552. .byte 0x1
  2553. .byte 0x78
  2554. .byte 0x10
  2555. .byte 0x1
  2556. .byte 0x10
  2557. .byte 0xc
  2558. .byte 0x7
  2559. .byte 0x8
  2560. .byte 0x90
  2561. .byte 0x1
  2562. .align 3
  2563. LECIE1:
  2564. LSFDE1:
  2565. .set L$set$1,LEFDE1-LASFDE1
  2566. .long L$set$1
  2567. LASFDE1:
  2568. .long LASFDE1-EH_frame1
  2569. .quad LFB16-.
  2570. .set L$set$2,LFE16-LFB16
  2571. .quad L$set$2
  2572. .byte 0
  2573. .align 3
  2574. LEFDE1:
  2575. LSFDE3:
  2576. .set L$set$3,LEFDE3-LASFDE3
  2577. .long L$set$3
  2578. LASFDE3:
  2579. .long LASFDE3-EH_frame1
  2580. .quad LFB17-.
  2581. .set L$set$4,LFE17-LFB17
  2582. .quad L$set$4
  2583. .byte 0
  2584. .byte 0x4
  2585. .set L$set$5,LCFI0-LFB17
  2586. .long L$set$5
  2587. .byte 0xe
  2588. .byte 0x10
  2589. .byte 0x86
  2590. .byte 0x2
  2591. .byte 0x4
  2592. .set L$set$6,LCFI1-LCFI0
  2593. .long L$set$6
  2594. .byte 0xe
  2595. .byte 0x18
  2596. .byte 0x83
  2597. .byte 0x3
  2598. .byte 0x4
  2599. .set L$set$7,LCFI2-LCFI1
  2600. .long L$set$7
  2601. .byte 0xe
  2602. .byte 0x20
  2603. .byte 0x4
  2604. .set L$set$8,LCFI3-LCFI2
  2605. .long L$set$8
  2606. .byte 0xe
  2607. .byte 0x18
  2608. .byte 0x4
  2609. .set L$set$9,LCFI4-LCFI3
  2610. .long L$set$9
  2611. .byte 0xe
  2612. .byte 0x10
  2613. .byte 0x4
  2614. .set L$set$10,LCFI5-LCFI4
  2615. .long L$set$10
  2616. .byte 0xe
  2617. .byte 0x8
  2618. .align 3
  2619. LEFDE3:
  2620. .subsections_via_symbols
  2621.  
  2622.  
  2623.  
  2624. ==> powersoftwo-R4-c2.s <===================================================
  2625. .text
  2626. .align 4,0x90
  2627. .globl _isPowerOf2
  2628. _isPowerOf2:
  2629. LFB16:
  2630. xorl %eax, %eax
  2631. testl %edi, %edi
  2632. je L2
  2633. bsfl %edi, %ecx
  2634. movb $1, %al
  2635. sall %cl, %eax
  2636. cmpl %eax, %edi
  2637. sete %al
  2638. movzbl %al, %eax
  2639. L2:
  2640. rep
  2641. ret
  2642. LFE16:
  2643. .cstring
  2644. .align 3
  2645. LC0:
  2646. .ascii "%d powers of two found in %lu ns\12\0"
  2647. .section __TEXT,__text_startup,regular,pure_instructions
  2648. .align 4
  2649. .globl _main
  2650. _main:
  2651. LFB17:
  2652. pushq %rbp
  2653. LCFI0:
  2654. pushq %rbx
  2655. LCFI1:
  2656. xorl %ebx, %ebx
  2657. subq $8, %rsp
  2658. LCFI2:
  2659. call _mach_absolute_time
  2660. movl $1, %edx
  2661. movl $1, %esi
  2662. movq %rax, %rbp
  2663. xorl %eax, %eax
  2664. jmp L6
  2665. .align 4
  2666. L7:
  2667. addl $1, %eax
  2668. addl $1, %edx
  2669. L6:
  2670. testl %eax, %eax
  2671. je L7
  2672. bsfl %eax, %ecx
  2673. movl %esi, %edi
  2674. sall %cl, %edi
  2675. cmpl %eax, %edi
  2676. sete %cl
  2677. movzbl %cl, %ecx
  2678. addl %ecx, %ebx
  2679. cmpl $-1, %edx
  2680. jne L7
  2681. call _mach_absolute_time
  2682. leaq LC0(%rip), %rdi
  2683. movl %ebx, %esi
  2684. subq %rbp, %rax
  2685. movq %rax, %rdx
  2686. xorl %eax, %eax
  2687. call _printf
  2688. addq $8, %rsp
  2689. LCFI3:
  2690. xorl %eax, %eax
  2691. popq %rbx
  2692. LCFI4:
  2693. popq %rbp
  2694. LCFI5:
  2695. ret
  2696. LFE17:
  2697. .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
  2698. EH_frame1:
  2699. .set L$set$0,LECIE1-LSCIE1
  2700. .long L$set$0
  2701. LSCIE1:
  2702. .long 0
  2703. .byte 0x1
  2704. .ascii "zR\0"
  2705. .byte 0x1
  2706. .byte 0x78
  2707. .byte 0x10
  2708. .byte 0x1
  2709. .byte 0x10
  2710. .byte 0xc
  2711. .byte 0x7
  2712. .byte 0x8
  2713. .byte 0x90
  2714. .byte 0x1
  2715. .align 3
  2716. LECIE1:
  2717. LSFDE1:
  2718. .set L$set$1,LEFDE1-LASFDE1
  2719. .long L$set$1
  2720. LASFDE1:
  2721. .long LASFDE1-EH_frame1
  2722. .quad LFB16-.
  2723. .set L$set$2,LFE16-LFB16
  2724. .quad L$set$2
  2725. .byte 0
  2726. .align 3
  2727. LEFDE1:
  2728. LSFDE3:
  2729. .set L$set$3,LEFDE3-LASFDE3
  2730. .long L$set$3
  2731. LASFDE3:
  2732. .long LASFDE3-EH_frame1
  2733. .quad LFB17-.
  2734. .set L$set$4,LFE17-LFB17
  2735. .quad L$set$4
  2736. .byte 0
  2737. .byte 0x4
  2738. .set L$set$5,LCFI0-LFB17
  2739. .long L$set$5
  2740. .byte 0xe
  2741. .byte 0x10
  2742. .byte 0x86
  2743. .byte 0x2
  2744. .byte 0x4
  2745. .set L$set$6,LCFI1-LCFI0
  2746. .long L$set$6
  2747. .byte 0xe
  2748. .byte 0x18
  2749. .byte 0x83
  2750. .byte 0x3
  2751. .byte 0x4
  2752. .set L$set$7,LCFI2-LCFI1
  2753. .long L$set$7
  2754. .byte 0xe
  2755. .byte 0x20
  2756. .byte 0x4
  2757. .set L$set$8,LCFI3-LCFI2
  2758. .long L$set$8
  2759. .byte 0xe
  2760. .byte 0x18
  2761. .byte 0x4
  2762. .set L$set$9,LCFI4-LCFI3
  2763. .long L$set$9
  2764. .byte 0xe
  2765. .byte 0x10
  2766. .byte 0x4
  2767. .set L$set$10,LCFI5-LCFI4
  2768. .long L$set$10
  2769. .byte 0xe
  2770. .byte 0x8
  2771. .align 3
  2772. LEFDE3:
  2773. .subsections_via_symbols
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement