Created
August 26, 2016 13:09
-
-
Save Alcaro/38143d7688c1f4bcc2a2d15e43764232 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiled with https://gcc.godbolt.org/ AVR gcc 4.5.3, flags -Os | |
void g(volatile int* q) | |
{ | |
*q=0; | |
} | |
void h(volatile long* q) | |
{ | |
*q=0; | |
} | |
int sizeof_int = sizeof(int); | |
int sizeof_long = sizeof(long); | |
__SREG__ = 0x3f | |
__SP_H__ = 0x3e | |
__SP_L__ = 0x3d | |
__CCP__ = 0x34 | |
__tmp_reg__ = 0 | |
__zero_reg__ = 1 | |
g(int volatile*): | |
/* prologue: function */ | |
/* frame size = 0 */ | |
/* stack size = 0 */ | |
mov r30,r24 | |
mov r31,r25 | |
std Z+1,__zero_reg__ | |
st Z,__zero_reg__ | |
/* epilogue start */ | |
ret | |
h(long volatile*): | |
/* prologue: function */ | |
/* frame size = 0 */ | |
/* stack size = 0 */ | |
mov r30,r24 | |
mov r31,r25 | |
st Z,__zero_reg__ | |
std Z+1,__zero_reg__ | |
std Z+2,__zero_reg__ | |
std Z+3,__zero_reg__ | |
/* epilogue start */ | |
ret | |
sizeof_int: | |
.word 2 | |
sizeof_long: | |
.word 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment