Guest User

Untitled

a guest
Jun 14th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. $ cat yoba.cpp
  2. #include <tuple>
  3.  
  4. using namespace std;
  5.  
  6. struct YOBA {
  7. int x;
  8.  
  9. bool operator == (const YOBA &otherYoba) const
  10. {
  11. return x == otherYoba.x;
  12. }
  13. };
  14.  
  15.  
  16. bool unique_f (int a1, char a2, YOBA a3, int b1, char b2, YOBA b3)
  17. {
  18. return (tie (a1, a2, a3) == tie (b1, b2, b3));
  19. }
  20. $ g++ -O2 -std=c++11 -c yoba.cpp
  21. $ objdump -d --demangle yoba.o
  22.  
  23. yoba.o: формат файла elf32-i386
  24.  
  25.  
  26. Дизассемблирование раздела .text:
  27.  
  28. 00000000 <unique_f(int, char, YOBA, int, char, YOBA)>:
  29. 0: 53 push %ebx
  30. 1: 8b 5c 24 08 mov 0x8(%esp),%ebx
  31. 5: 31 c0 xor %eax,%eax
  32. 7: 39 5c 24 14 cmp %ebx,0x14(%esp)
  33. b: 8b 54 24 0c mov 0xc(%esp),%edx
  34. f: 8b 4c 24 18 mov 0x18(%esp),%ecx
  35. 13: 74 03 je 18 <unique_f(int, char, YOBA, int, char, YOBA)+0x18>
  36. 15: 5b pop %ebx
  37. 16: c3 ret
  38. 17: 90 nop
  39. 18: 38 d1 cmp %dl,%cl
  40. 1a: 75 f9 jne 15 <unique_f(int, char, YOBA, int, char, YOBA)+0x15>
  41. 1c: 8b 44 24 1c mov 0x1c(%esp),%eax
  42. 20: 39 44 24 10 cmp %eax,0x10(%esp)
  43. 24: 5b pop %ebx
  44. 25: 0f 94 c0 sete %al
  45. 28: c3 ret
  46. $
Advertisement
Add Comment
Please, Sign In to add comment