Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // volatile const
  2. unsigned int ld16(volatile const unsigned short int *p)
  3. {
  4. return *p;
  5. }
  6.  
  7. .file "test6.c"
  8. .section .text
  9. .align 2
  10. .global ld16
  11. .type ld16, @function
  12. ld16:
  13. ldhu r2, 0(r4) # 6 [c=8 l=4] zero_extendhisi2/1
  14. andi r2, r2, 0xffff # 12 [c=4 l=4] zero_extendhisi2/0
  15. ret # 19 [c=0 l=4] simple_return
  16. .size ld16, .-ld16
  17. .ident "GCC: (GNU) 9.2.1 20191009"
  18.  
  19. // const
  20. unsigned int ld16(const unsigned short int *p)
  21. {
  22. return *p;
  23. }
  24.  
  25. .file "test6.c"
  26. .section .text
  27. .align 2
  28. .global ld16
  29. .type ld16, @function
  30. ld16:
  31. ldhu r2, 0(r4) # 11 [c=8 l=4] zero_extendhisi2/1
  32. ret # 18 [c=0 l=4] simple_return
  33. .size ld16, .-ld16
  34. .ident "GCC: (GNU) 9.2.1 20191009"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement