Created
December 26, 2018 21:28
-
-
Save kmcallister/febdb1085c485c6a01bf431798e0ac97 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
#include <util/atomic.h> | |
void blahblah(); | |
void foo() { | |
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { | |
blahblah(); | |
} | |
} | |
// avr-gcc -c foo.c -std=c99 -Os && avr-objdump -dr foo.o |
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
Disassembly of section .text: | |
00000000 <foo>: | |
0: cf 93 push r28 | |
2: cf b7 in r28, 0x3f ; 63 | |
4: f8 94 cli | |
6: 00 d0 rcall .+0 ; 0x8 <foo+0x8> | |
6: R_AVR_13_PCREL blahblah | |
8: cf bf out 0x3f, r28 ; 63 | |
a: cf 91 pop r28 | |
c: 08 95 ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment