Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1.  
  2.  
  3. struct foo {
  4. int a:2;
  5. };
  6.  
  7.  
  8. struct bar {
  9. unsigned int a:2;
  10. };
  11.  
  12. int test(struct foo *foo, struct bar *bar)
  13. {
  14. if (foo->a == 0x3)
  15. return 1;
  16. if (bar->a == 0x3)
  17. return 2;
  18.  
  19. return 0;
  20. }
  21.  
  22.  
  23.  
  24.  
  25. Disassembly of section .text:
  26.  
  27. 00000000 <test>:
  28. 0: e5d10000 ldrb r0, [r1]
  29. 4: e2000003 and r0, r0, #3
  30. 8: e3500003 cmp r0, #3
  31. c: 03a00002 moveq r0, #2
  32. 10: 13a00000 movne r0, #0
  33. 14: e12fff1e bx lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement