Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 .syntax unified
- 2 .cpu cortex-m3
- 3 .fpu softvfp
- 4 .eabi_attribute 20, 1
- 5 .eabi_attribute 21, 1
- 6 .eabi_attribute 23, 3
- 7 .eabi_attribute 24, 1
- 8 .eabi_attribute 25, 1
- 9 .eabi_attribute 26, 1
- 10 .eabi_attribute 30, 1
- 11 .eabi_attribute 34, 1
- 12 .eabi_attribute 18, 4
- 13 .thumb
- 14 .file "test.c"
- 15 .text
- 16 .Ltext0:
- 17 .cfi_sections .debug_frame
- 18 .align 2
- 19 .global svcTest
- 20 .thumb
- 21 .thumb_func
- 23 svcTest:
- 24 .LFB0:
- 25 .file 1 "test.h"
- 1:test.h ****
- 2:test.h **** inline void svcTest (int a, int *b)
- 3:test.h **** {
- 26 .loc 1 3 0
- 27 .cfi_startproc
- 28 @ args = 0, pretend = 0, frame = 0
- 29 @ frame_needed = 0, uses_anonymous_args = 0
- 30 @ link register save eliminated.
- 31 .LVL0:
- 4:test.h **** register int p1 __asm__("r0") = a;
- 5:test.h **** register int *p2 __asm__("r1") = b;
- 6:test.h **** __asm__ __volatile__ ("svc %0"
- 32 .loc 1 6 0
- 33 @ 6 "test.h" 1
- 34 0000 0CDF svc #12
- 35 @ 0 "" 2
- 36 .thumb
- 37 0002 7047 bx lr
- 38 .cfi_endproc
- 39 .LFE0:
- 41 .align 2
- 42 .global fooBar
- 43 .thumb
- 44 .thumb_func
- 46 fooBar:
- 47 .LFB1:
- 48 .file 2 "test.c"
- 1:test.c **** #include <stddef.h>
- 2:test.c ****
- 3:test.c **** #include "test.h"
- 4:test.c ****
- 5:test.c **** void fooBar (int x, const int *y)
- 6:test.c **** {
- 49 .loc 2 6 0
- 50 .cfi_startproc
- 51 @ args = 0, pretend = 0, frame = 0
- 52 @ frame_needed = 0, uses_anonymous_args = 0
- 53 @ link register save eliminated.
- 54 .LVL1:
- 55 0004 0346 mov r3, r0
- 56 .LBB4:
- 57 .LBB5:
- 4:test.h **** register int p1 __asm__("r0") = a;
- 58 .loc 1 4 0
- 59 0006 2121 movs r1, #33
- 60 .LVL2:
- 5:test.h **** __asm__ __volatile__ ("svc %0"
- 61 .loc 1 5 0
- 62 0008 0022 movs r2, #0
- 63 .LVL3:
- 64 .L3:
- 4:test.h **** register int p1 __asm__("r0") = a;
- 65 .loc 1 4 0 discriminator 1
- 66 000a 0846 mov r0, r1
- 67 .loc 1 6 0 discriminator 1
- 68 @ 6 "test.h" 1
- 69 000c 0CDF svc #12
- 70 @ 0 "" 2
- 71 .thumb
- 72 .LBE5:
- 73 .LBE4:
- 7:test.c **** do
- 8:test.c **** {
- 9:test.c **** svcTest(33, NULL);
- 10:test.c **** x--;
- 74 .loc 2 10 0 discriminator 1
- 75 000e 013B subs r3, r3, #1
- 76 .LVL4:
- 11:test.c **** }
- 12:test.c **** while (x>0);
- 77 .loc 2 12 0 discriminator 1
- 78 0010 002B cmp r3, #0
- 79 0012 FADC bgt .L3
- 13:test.c **** }
- 80 .loc 2 13 0
- 81 0014 7047 bx lr
- 82 .cfi_endproc
- 83 .LFE1:
- 85 .Letext0:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement