Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. void isr() __attribute__((interrupt));
  2. void isr() { }
  3.  
  4. void non_isr() { }
  5.  
  6. // compiled with:
  7. // arm-none-eabi-gcc -O3 -o test.o -mthumb -march=armv7-m -c test.c
  8.  
  9. // results in (arm-none-eabi-objdump -S test.o):
  10. test.o:     file format elf32-littlearm
  11.  
  12. Disassembly of section .text:
  13.  
  14. 00000000 <isr>:
  15.    0:   4668        mov r0, sp
  16.    2:   f020 0107   bic.w   r1, r0, #7
  17.    6:   468d        mov sp, r1
  18.    8:   b401        push    {r0}
  19.    a:   bc01        pop {r0}
  20.    c:   4685        mov sp, r0
  21.    e:   4770        bx  lr
  22.  
  23. 00000010 <non_isr>:
  24.   10:   4770        bx  lr
  25.   12:   bf00        nop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement