fork download
  1. #include <stdint.h>
  2.  
  3. int32_t foo (int32_t x)
  4. {
  5. return (x / 4);
  6. }
  7.  
  8.  
  9. // Result:
  10.  
  11. .file "a.c"
  12. __SP_H__ = 0x3e
  13. __SP_L__ = 0x3d
  14. __SREG__ = 0x3f
  15. __tmp_reg__ = 0
  16. __zero_reg__ = 1
  17. .text
  18. .global foo
  19. .type foo, @function
  20. foo:
  21. push r28
  22. push r29
  23. rcall .
  24. rcall .
  25. in r28,__SP_L__
  26. in r29,__SP_H__
  27. /* prologue: function */
  28. /* frame size = 4 */
  29. /* stack size = 6 */
  30. .L__stack_usage = 6
  31. std Y+1,r22
  32. std Y+2,r23
  33. std Y+3,r24
  34. std Y+4,r25
  35. ldd r24,Y+1
  36. ldd r25,Y+2
  37. ldd r26,Y+3
  38. ldd r27,Y+4
  39. tst r27
  40. brge .L2
  41. adiw r24,3
  42. adc r26,__zero_reg__
  43. adc r27,__zero_reg__
  44. .L2:
  45. asr r27
  46. ror r26
  47. ror r25
  48. ror r24
  49. asr r27
  50. ror r26
  51. ror r25
  52. ror r24
  53. mov r22,r24
  54. mov r23,r25
  55. mov r24,r26
  56. mov r25,r27
  57. /* epilogue start */
  58. pop __tmp_reg__
  59. pop __tmp_reg__
  60. pop __tmp_reg__
  61. pop __tmp_reg__
  62. pop r29
  63. pop r28
  64. ret
  65. .size foo, .-foo
  66. .ident "GCC: (Gentoo 4.9.0_alpha20130707) 4.9.0-alpha20130707 20130707 (experimental)"
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:11:2: error: expected identifier or ‘(’ before ‘.’ token
  .file "a.c"
  ^
prog.c:19:13: error: stray ‘@’ in program
  .type foo, @function
             ^
stdout
Standard output is empty