ARM GAS  /tmp/ccIXlM3Z.s 			page 1


   1              		.cpu cortex-m0
   2              		.arch armv6s-m
   3              		.fpu softvfp
   4              		.eabi_attribute 23, 1
   5              		.eabi_attribute 24, 1
   6              		.eabi_attribute 25, 1
   7              		.eabi_attribute 26, 1
   8              		.eabi_attribute 30, 2
   9              		.eabi_attribute 34, 0
  10              		.eabi_attribute 18, 4
  11              		.file	"ringbuffer.c"
  12              		.text
  13              	.Ltext0:
  14              		.cfi_sections	.debug_frame
  15              		.file 1 "Component/ringbuffer/ringbuffer.c"
  16              		.section	.text._ringbuffer_status,"ax",%progbits
  17              		.align	1
  18              		.p2align 2,,3
  19              		.global	_ringbuffer_status
  20              		.syntax unified
  21              		.code	16
  22              		.thumb_func
  24              	_ringbuffer_status:
  25              	.LVL0:
  26              	.LFB0:
   1:Component/ringbuffer/ringbuffer.c **** #include "ringbuffer.h"
   2:Component/ringbuffer/ringbuffer.c **** 
   3:Component/ringbuffer/ringbuffer.c **** enum ringbuffer_state _ringbuffer_status(ringbuffer_t self);
   4:Component/ringbuffer/ringbuffer.c **** #define ringbuffer_space_len(self) ((self)->buffer_size - ringbuffer_data_len(self))
   5:Component/ringbuffer/ringbuffer.c **** /**
   6:Component/ringbuffer/ringbuffer.c ****  * @brief 检查环形缓冲区状态
   7:Component/ringbuffer/ringbuffer.c ****  *
   8:Component/ringbuffer/ringbuffer.c ****  * 根据环形缓冲区的读写指针和镜像指针，返回环形缓冲区的状态。
   9:Component/ringbuffer/ringbuffer.c ****  *
  10:Component/ringbuffer/ringbuffer.c ****  * @param self 环形缓冲区对象
  11:Component/ringbuffer/ringbuffer.c ****  *
  12:Component/ringbuffer/ringbuffer.c ****  * @return 环形缓冲区的状态
  13:Component/ringbuffer/ringbuffer.c ****  *         - RINGBUFFER_EMPTY：环形缓冲区为空
  14:Component/ringbuffer/ringbuffer.c ****  *         - RINGBUFFER_FULL：环形缓冲区已满
  15:Component/ringbuffer/ringbuffer.c ****  *         - RINGBUFFER_HALFFULL：环形缓冲区半满
  16:Component/ringbuffer/ringbuffer.c ****  */
  17:Component/ringbuffer/ringbuffer.c **** inline enum ringbuffer_state _ringbuffer_status(ringbuffer_t self)
  18:Component/ringbuffer/ringbuffer.c **** {
  27              		.loc 1 18 1 view -0
  28              		.cfi_startproc
  29              		@ args = 0, pretend = 0, frame = 0
  30              		@ frame_needed = 0, uses_anonymous_args = 0
  31              		@ link register save eliminated.
  19:Component/ringbuffer/ringbuffer.c ****     if (self->read_index == self->write_index)
  32              		.loc 1 19 5 view .LVU1
  33              		.loc 1 19 13 is_stmt 0 view .LVU2
  34 0000 4168     		ldr	r1, [r0, #4]
  35              		.loc 1 19 33 view .LVU3
  36 0002 8268     		ldr	r2, [r0, #8]
  18:Component/ringbuffer/ringbuffer.c ****     if (self->read_index == self->write_index)
  37              		.loc 1 18 1 view .LVU4
  38 0004 0300     		movs	r3, r0
ARM GAS  /tmp/ccIXlM3Z.s 			page 2


  39              		.loc 1 19 13 view .LVU5
  40 0006 4908     		lsrs	r1, r1, #1
  20:Component/ringbuffer/ringbuffer.c ****     {
  21:Component/ringbuffer/ringbuffer.c ****         if (self->read_mirror == self->write_mirror)
  22:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  23:Component/ringbuffer/ringbuffer.c ****         else
  24:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_FULL;
  25:Component/ringbuffer/ringbuffer.c ****     }
  26:Component/ringbuffer/ringbuffer.c ****     return RINGBUFFER_HALFFULL;
  41              		.loc 1 26 12 view .LVU6
  42 0008 0220     		movs	r0, #2
  43              	.LVL1:
  19:Component/ringbuffer/ringbuffer.c ****     {
  44              		.loc 1 19 33 view .LVU7
  45 000a 5208     		lsrs	r2, r2, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
  46              		.loc 1 19 8 view .LVU8
  47 000c 9142     		cmp	r1, r2
  48 000e 04D1     		bne	.L2
  49              	.LVL2:
  50              	.LBB10:
  51              	.LBI10:
  17:Component/ringbuffer/ringbuffer.c **** {
  52              		.loc 1 17 30 is_stmt 1 view .LVU9
  53              	.LBB11:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  54              		.loc 1 21 9 view .LVU10
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  55              		.loc 1 21 17 is_stmt 0 view .LVU11
  56 0010 5A68     		ldr	r2, [r3, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  57              		.loc 1 21 38 view .LVU12
  58 0012 9868     		ldr	r0, [r3, #8]
  59 0014 5040     		eors	r0, r2
  60 0016 C007     		lsls	r0, r0, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  61              		.loc 1 21 12 view .LVU13
  62 0018 C00F     		lsrs	r0, r0, #31
  63              	.LVL3:
  64              	.L2:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
  65              		.loc 1 21 12 view .LVU14
  66              	.LBE11:
  67              	.LBE10:
  27:Component/ringbuffer/ringbuffer.c **** }
  68              		.loc 1 27 1 view .LVU15
  69              		@ sp needed
  70 001a 7047     		bx	lr
  71              		.cfi_endproc
  72              	.LFE0:
  74              		.section	.text.ringbuffer_init,"ax",%progbits
  75              		.align	1
  76              		.p2align 2,,3
  77              		.global	ringbuffer_init
  78              		.syntax unified
  79              		.code	16
  80              		.thumb_func
ARM GAS  /tmp/ccIXlM3Z.s 			page 3


  82              	ringbuffer_init:
  83              	.LVL4:
  84              	.LFB1:
  28:Component/ringbuffer/ringbuffer.c **** 
  29:Component/ringbuffer/ringbuffer.c **** /**
  30:Component/ringbuffer/ringbuffer.c ****  * @brief 初始化环形缓冲区
  31:Component/ringbuffer/ringbuffer.c ****  *
  32:Component/ringbuffer/ringbuffer.c ****  * 初始化环形缓冲区结构体，设置读写指针和缓冲区指针及大小。
  33:Component/ringbuffer/ringbuffer.c ****  *
  34:Component/ringbuffer/ringbuffer.c ****  * @param self 环形缓冲区结构体指针
  35:Component/ringbuffer/ringbuffer.c ****  * @param buffer 缓冲区指针
  36:Component/ringbuffer/ringbuffer.c ****  * @param size 缓冲区大小（字节数），必须为4的倍数
  37:Component/ringbuffer/ringbuffer.c ****  */
  38:Component/ringbuffer/ringbuffer.c **** void ringbuffer_init(ringbuffer_t self, uint8_t *buffer, uint32_t size)
  39:Component/ringbuffer/ringbuffer.c **** {
  85              		.loc 1 39 1 is_stmt 1 view -0
  86              		.cfi_startproc
  87              		@ args = 0, pretend = 0, frame = 0
  88              		@ frame_needed = 0, uses_anonymous_args = 0
  40:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
  89              		.loc 1 40 36 view .LVU17
  41:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(buffer != NULL);
  90              		.loc 1 41 38 view .LVU18
  42:Component/ringbuffer/ringbuffer.c **** 
  43:Component/ringbuffer/ringbuffer.c ****     self->read_mirror = self->read_index = 0;
  91              		.loc 1 43 5 view .LVU19
  92              		.loc 1 43 42 is_stmt 0 view .LVU20
  93 0000 0123     		movs	r3, #1
  39:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
  94              		.loc 1 39 1 view .LVU21
  95 0002 10B5     		push	{r4, lr}
  96              	.LCFI0:
  97              		.cfi_def_cfa_offset 8
  98              		.cfi_offset 4, -8
  99              		.cfi_offset 14, -4
 100              		.loc 1 43 42 view .LVU22
 101 0004 4468     		ldr	r4, [r0, #4]
  44:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = self->write_index = 0;
  45:Component/ringbuffer/ringbuffer.c **** 
  46:Component/ringbuffer/ringbuffer.c ****     /* set buffer pool and size */
  47:Component/ringbuffer/ringbuffer.c ****     self->buffer_ptr = buffer;
 102              		.loc 1 47 22 view .LVU23
 103 0006 0160     		str	r1, [r0]
  43:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = self->write_index = 0;
 104              		.loc 1 43 42 view .LVU24
 105 0008 1C40     		ands	r4, r3
 106 000a 4460     		str	r4, [r0, #4]
  43:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = self->write_index = 0;
 107              		.loc 1 43 23 view .LVU25
 108 000c 4468     		ldr	r4, [r0, #4]
  48:Component/ringbuffer/ringbuffer.c ****     self->buffer_size = size & 0xFFFFFFFC;
  49:Component/ringbuffer/ringbuffer.c **** }
 109              		.loc 1 49 1 view .LVU26
 110              		@ sp needed
  43:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = self->write_index = 0;
 111              		.loc 1 43 23 view .LVU27
 112 000e 9C43     		bics	r4, r3
ARM GAS  /tmp/ccIXlM3Z.s 			page 4


 113 0010 4460     		str	r4, [r0, #4]
  44:Component/ringbuffer/ringbuffer.c **** 
 114              		.loc 1 44 5 is_stmt 1 view .LVU28
  44:Component/ringbuffer/ringbuffer.c **** 
 115              		.loc 1 44 44 is_stmt 0 view .LVU29
 116 0012 8468     		ldr	r4, [r0, #8]
 117 0014 1C40     		ands	r4, r3
 118 0016 8460     		str	r4, [r0, #8]
  44:Component/ringbuffer/ringbuffer.c **** 
 119              		.loc 1 44 24 view .LVU30
 120 0018 8468     		ldr	r4, [r0, #8]
 121 001a 9C43     		bics	r4, r3
  48:Component/ringbuffer/ringbuffer.c ****     self->buffer_size = size & 0xFFFFFFFC;
 122              		.loc 1 48 30 view .LVU31
 123 001c 0233     		adds	r3, r3, #2
 124 001e 9A43     		bics	r2, r3
 125              	.LVL5:
  44:Component/ringbuffer/ringbuffer.c **** 
 126              		.loc 1 44 24 view .LVU32
 127 0020 8460     		str	r4, [r0, #8]
  47:Component/ringbuffer/ringbuffer.c ****     self->buffer_size = size & 0xFFFFFFFC;
 128              		.loc 1 47 5 is_stmt 1 view .LVU33
  48:Component/ringbuffer/ringbuffer.c ****     self->buffer_size = size & 0xFFFFFFFC;
 129              		.loc 1 48 5 view .LVU34
  48:Component/ringbuffer/ringbuffer.c ****     self->buffer_size = size & 0xFFFFFFFC;
 130              		.loc 1 48 23 is_stmt 0 view .LVU35
 131 0022 C260     		str	r2, [r0, #12]
 132              		.loc 1 49 1 view .LVU36
 133 0024 10BD     		pop	{r4, pc}
 134              		.cfi_endproc
 135              	.LFE1:
 137 0026 C046     		.section	.text.ringbuffer_reset,"ax",%progbits
 138              		.align	1
 139              		.p2align 2,,3
 140              		.global	ringbuffer_reset
 141              		.syntax unified
 142              		.code	16
 143              		.thumb_func
 145              	ringbuffer_reset:
 146              	.LVL6:
 147              	.LFB2:
  50:Component/ringbuffer/ringbuffer.c **** 
  51:Component/ringbuffer/ringbuffer.c **** /**
  52:Component/ringbuffer/ringbuffer.c ****  * @brief 重置环形缓冲区
  53:Component/ringbuffer/ringbuffer.c ****  *
  54:Component/ringbuffer/ringbuffer.c ****  * 该函数用于重置环形缓冲区，将所有索引和镜像都设为0。
  55:Component/ringbuffer/ringbuffer.c ****  *
  56:Component/ringbuffer/ringbuffer.c ****  * @param self 环形缓冲区对象指针
  57:Component/ringbuffer/ringbuffer.c ****  */
  58:Component/ringbuffer/ringbuffer.c **** void ringbuffer_reset(ringbuffer_t self)
  59:Component/ringbuffer/ringbuffer.c **** {
 148              		.loc 1 59 1 is_stmt 1 view -0
 149              		.cfi_startproc
 150              		@ args = 0, pretend = 0, frame = 0
 151              		@ frame_needed = 0, uses_anonymous_args = 0
 152              		@ link register save eliminated.
  60:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
ARM GAS  /tmp/ccIXlM3Z.s 			page 5


 153              		.loc 1 60 36 view .LVU38
  61:Component/ringbuffer/ringbuffer.c **** 
  62:Component/ringbuffer/ringbuffer.c ****     self->read_mirror = 0;
 154              		.loc 1 62 5 view .LVU39
 155              		.loc 1 62 23 is_stmt 0 view .LVU40
 156 0000 0123     		movs	r3, #1
  63:Component/ringbuffer/ringbuffer.c ****     self->read_index = 0;
  64:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = 0;
  65:Component/ringbuffer/ringbuffer.c ****     self->write_index = 0;
  66:Component/ringbuffer/ringbuffer.c **** }
 157              		.loc 1 66 1 view .LVU41
 158              		@ sp needed
  62:Component/ringbuffer/ringbuffer.c ****     self->read_index = 0;
 159              		.loc 1 62 23 view .LVU42
 160 0002 4268     		ldr	r2, [r0, #4]
 161 0004 9A43     		bics	r2, r3
 162 0006 4260     		str	r2, [r0, #4]
  63:Component/ringbuffer/ringbuffer.c ****     self->read_index = 0;
 163              		.loc 1 63 5 is_stmt 1 view .LVU43
  63:Component/ringbuffer/ringbuffer.c ****     self->read_index = 0;
 164              		.loc 1 63 22 is_stmt 0 view .LVU44
 165 0008 4268     		ldr	r2, [r0, #4]
 166 000a 1A40     		ands	r2, r3
 167 000c 4260     		str	r2, [r0, #4]
  64:Component/ringbuffer/ringbuffer.c ****     self->write_index = 0;
 168              		.loc 1 64 5 is_stmt 1 view .LVU45
  64:Component/ringbuffer/ringbuffer.c ****     self->write_index = 0;
 169              		.loc 1 64 24 is_stmt 0 view .LVU46
 170 000e 8268     		ldr	r2, [r0, #8]
 171 0010 9A43     		bics	r2, r3
 172 0012 8260     		str	r2, [r0, #8]
  65:Component/ringbuffer/ringbuffer.c **** }
 173              		.loc 1 65 5 is_stmt 1 view .LVU47
  65:Component/ringbuffer/ringbuffer.c **** }
 174              		.loc 1 65 23 is_stmt 0 view .LVU48
 175 0014 8268     		ldr	r2, [r0, #8]
 176 0016 1340     		ands	r3, r2
 177 0018 8360     		str	r3, [r0, #8]
 178              		.loc 1 66 1 view .LVU49
 179 001a 7047     		bx	lr
 180              		.cfi_endproc
 181              	.LFE2:
 183              		.section	.text.ringbuffer_data_len,"ax",%progbits
 184              		.align	1
 185              		.p2align 2,,3
 186              		.global	ringbuffer_data_len
 187              		.syntax unified
 188              		.code	16
 189              		.thumb_func
 191              	ringbuffer_data_len:
 192              	.LVL7:
 193              	.LFB3:
  67:Component/ringbuffer/ringbuffer.c **** 
  68:Component/ringbuffer/ringbuffer.c **** /**
  69:Component/ringbuffer/ringbuffer.c ****  * @brief 获取环形缓冲区中的数据长度
  70:Component/ringbuffer/ringbuffer.c ****  *
  71:Component/ringbuffer/ringbuffer.c ****  * 该函数用于获取环形缓冲区中的数据长度。
ARM GAS  /tmp/ccIXlM3Z.s 			page 6


  72:Component/ringbuffer/ringbuffer.c ****  *
  73:Component/ringbuffer/ringbuffer.c ****  * @param self 环形缓冲区的实例指针
  74:Component/ringbuffer/ringbuffer.c ****  *
  75:Component/ringbuffer/ringbuffer.c ****  * @return 返回环形缓冲区中的数据长度，以字节为单位
  76:Component/ringbuffer/ringbuffer.c ****  *
  77:Component/ringbuffer/ringbuffer.c ****  * @note 使用前请确保传入的环形缓冲区实例有效
  78:Component/ringbuffer/ringbuffer.c ****  */
  79:Component/ringbuffer/ringbuffer.c **** inline uint32_t ringbuffer_data_len(ringbuffer_t self)
  80:Component/ringbuffer/ringbuffer.c **** {
 194              		.loc 1 80 1 is_stmt 1 view -0
 195              		.cfi_startproc
 196              		@ args = 0, pretend = 0, frame = 0
 197              		@ frame_needed = 0, uses_anonymous_args = 0
 198              		@ link register save eliminated.
  81:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self);
 199              		.loc 1 81 28 view .LVU51
  82:Component/ringbuffer/ringbuffer.c **** 
  83:Component/ringbuffer/ringbuffer.c ****     switch (_ringbuffer_status(self))
 200              		.loc 1 83 5 view .LVU52
 201              	.LBB23:
 202              	.LBI23:
  17:Component/ringbuffer/ringbuffer.c **** {
 203              		.loc 1 17 30 view .LVU53
 204              	.LBB24:
  19:Component/ringbuffer/ringbuffer.c ****     {
 205              		.loc 1 19 5 view .LVU54
  19:Component/ringbuffer/ringbuffer.c ****     {
 206              		.loc 1 19 13 is_stmt 0 view .LVU55
 207 0000 4268     		ldr	r2, [r0, #4]
  19:Component/ringbuffer/ringbuffer.c ****     {
 208              		.loc 1 19 33 view .LVU56
 209 0002 8368     		ldr	r3, [r0, #8]
  19:Component/ringbuffer/ringbuffer.c ****     {
 210              		.loc 1 19 13 view .LVU57
 211 0004 5208     		lsrs	r2, r2, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 212              		.loc 1 19 33 view .LVU58
 213 0006 5B08     		lsrs	r3, r3, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 214              		.loc 1 19 8 view .LVU59
 215 0008 9A42     		cmp	r2, r3
 216 000a 0AD0     		beq	.L13
 217              	.LVL8:
  19:Component/ringbuffer/ringbuffer.c ****     {
 218              		.loc 1 19 8 view .LVU60
 219              	.LBE24:
 220              	.LBE23:
 221              	.LBB28:
 222              	.LBI28:
  79:Component/ringbuffer/ringbuffer.c **** {
 223              		.loc 1 79 17 is_stmt 1 view .LVU61
 224              	.LBB29:
  84:Component/ringbuffer/ringbuffer.c ****     {
  85:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_EMPTY:
  86:Component/ringbuffer/ringbuffer.c ****         return 0;
  87:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_FULL:
  88:Component/ringbuffer/ringbuffer.c ****         return self->buffer_size;
ARM GAS  /tmp/ccIXlM3Z.s 			page 7


  89:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
  90:Component/ringbuffer/ringbuffer.c ****     default:
  91:Component/ringbuffer/ringbuffer.c ****     {
  92:Component/ringbuffer/ringbuffer.c ****         uint32_t wi = self->write_index, ri = self->read_index;
 225              		.loc 1 92 9 view .LVU62
 226              		.loc 1 92 27 is_stmt 0 view .LVU63
 227 000c 8268     		ldr	r2, [r0, #8]
 228              		.loc 1 92 51 view .LVU64
 229 000e 4368     		ldr	r3, [r0, #4]
 230              		.loc 1 92 27 view .LVU65
 231 0010 5208     		lsrs	r2, r2, #1
 232              	.LVL9:
 233              		.loc 1 92 51 view .LVU66
 234 0012 5B08     		lsrs	r3, r3, #1
 235              	.LVL10:
  93:Component/ringbuffer/ringbuffer.c **** 
  94:Component/ringbuffer/ringbuffer.c ****         if (wi > ri)
 236              		.loc 1 94 9 is_stmt 1 view .LVU67
 237              		.loc 1 94 12 is_stmt 0 view .LVU68
 238 0014 9A42     		cmp	r2, r3
 239 0016 01D9     		bls	.L10
 240              	.LVL11:
 241              	.L12:
  95:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
  96:Component/ringbuffer/ringbuffer.c ****         else
  97:Component/ringbuffer/ringbuffer.c ****             return self->buffer_size - (ri - wi);
 242              		.loc 1 97 38 view .LVU69
 243 0018 D01A     		subs	r0, r2, r3
 244              	.LVL12:
 245              	.L7:
 246              		.loc 1 97 38 view .LVU70
 247              	.LBE29:
 248              	.LBE28:
  98:Component/ringbuffer/ringbuffer.c ****     }
  99:Component/ringbuffer/ringbuffer.c ****     }
 100:Component/ringbuffer/ringbuffer.c **** }
 249              		.loc 1 100 1 view .LVU71
 250              		@ sp needed
 251 001a 7047     		bx	lr
 252              	.LVL13:
 253              	.L10:
 254              	.LBB31:
 255              	.LBB30:
  97:Component/ringbuffer/ringbuffer.c ****     }
 256              		.loc 1 97 13 is_stmt 1 view .LVU72
  97:Component/ringbuffer/ringbuffer.c ****     }
 257              		.loc 1 97 24 is_stmt 0 view .LVU73
 258 001c C168     		ldr	r1, [r0, #12]
  97:Component/ringbuffer/ringbuffer.c ****     }
 259              		.loc 1 97 38 view .LVU74
 260 001e 8A18     		adds	r2, r1, r2
 261              	.LVL14:
  97:Component/ringbuffer/ringbuffer.c ****     }
 262              		.loc 1 97 38 view .LVU75
 263 0020 FAE7     		b	.L12
 264              	.LVL15:
 265              	.L13:
ARM GAS  /tmp/ccIXlM3Z.s 			page 8


  97:Component/ringbuffer/ringbuffer.c ****     }
 266              		.loc 1 97 38 view .LVU76
 267              	.LBE30:
 268              	.LBE31:
 269              	.LBB32:
 270              	.LBB27:
 271              	.LBB25:
 272              	.LBI25:
  17:Component/ringbuffer/ringbuffer.c **** {
 273              		.loc 1 17 30 is_stmt 1 view .LVU77
 274              	.LBB26:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 275              		.loc 1 21 9 view .LVU78
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 276              		.loc 1 21 17 is_stmt 0 view .LVU79
 277 0022 4368     		ldr	r3, [r0, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 278              		.loc 1 21 38 view .LVU80
 279 0024 8268     		ldr	r2, [r0, #8]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 280              		.loc 1 21 17 view .LVU81
 281 0026 DB07     		lsls	r3, r3, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 282              		.loc 1 21 38 view .LVU82
 283 0028 D207     		lsls	r2, r2, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 284              		.loc 1 21 12 view .LVU83
 285 002a 9A42     		cmp	r2, r3
 286 002c 01D0     		beq	.L11
  24:Component/ringbuffer/ringbuffer.c ****     }
 287              		.loc 1 24 13 is_stmt 1 view .LVU84
 288              	.LVL16:
  24:Component/ringbuffer/ringbuffer.c ****     }
 289              		.loc 1 24 13 is_stmt 0 view .LVU85
 290              	.LBE26:
 291              	.LBE25:
 292              	.LBE27:
 293              	.LBE32:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 294              		.loc 1 88 9 is_stmt 1 view .LVU86
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 295              		.loc 1 88 20 is_stmt 0 view .LVU87
 296 002e C068     		ldr	r0, [r0, #12]
 297              	.LVL17:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 298              		.loc 1 88 20 view .LVU88
 299 0030 F3E7     		b	.L7
 300              	.LVL18:
 301              	.L11:
  86:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_FULL:
 302              		.loc 1 86 16 view .LVU89
 303 0032 0020     		movs	r0, #0
 304              	.LVL19:
  86:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_FULL:
 305              		.loc 1 86 16 view .LVU90
 306 0034 F1E7     		b	.L7
 307              		.cfi_endproc
ARM GAS  /tmp/ccIXlM3Z.s 			page 9


 308              	.LFE3:
 310 0036 C046     		.section	.text.ringbuffer_putchar,"ax",%progbits
 311              		.align	1
 312              		.p2align 2,,3
 313              		.global	ringbuffer_putchar
 314              		.syntax unified
 315              		.code	16
 316              		.thumb_func
 318              	ringbuffer_putchar:
 319              	.LVL20:
 320              	.LFB4:
 101:Component/ringbuffer/ringbuffer.c **** 
 102:Component/ringbuffer/ringbuffer.c **** /**
 103:Component/ringbuffer/ringbuffer.c ****  * @brief 向环形缓冲区中写入一个字符
 104:Component/ringbuffer/ringbuffer.c ****  *
 105:Component/ringbuffer/ringbuffer.c ****  * 将指定的字符写入到环形缓冲区中，并更新写指针。
 106:Component/ringbuffer/ringbuffer.c ****  *
 107:Component/ringbuffer/ringbuffer.c ****  * @param self 指向环形缓冲区的指针
 108:Component/ringbuffer/ringbuffer.c ****  * @param data 要写入的字符
 109:Component/ringbuffer/ringbuffer.c ****  *
 110:Component/ringbuffer/ringbuffer.c ****  * @return 写入成功返回1，否则返回0
 111:Component/ringbuffer/ringbuffer.c ****  *
 112:Component/ringbuffer/ringbuffer.c ****  * @note 在写入之前会检查缓冲区是否有足够的空间。如果缓冲区已满，则返
 113:Component/ringbuffer/ringbuffer.c ****  *       写入成功后，会更新写指针。如果写指针到达缓冲区末尾，会翻转镜
 114:Component/ringbuffer/ringbuffer.c ****  */
 115:Component/ringbuffer/ringbuffer.c **** uint32_t ringbuffer_putchar(ringbuffer_t self, uint8_t data)
 116:Component/ringbuffer/ringbuffer.c **** {
 321              		.loc 1 116 1 is_stmt 1 view -0
 322              		.cfi_startproc
 323              		@ args = 0, pretend = 0, frame = 0
 324              		@ frame_needed = 0, uses_anonymous_args = 0
 117:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
 325              		.loc 1 117 36 view .LVU92
 118:Component/ringbuffer/ringbuffer.c **** 
 119:Component/ringbuffer/ringbuffer.c ****     /* whether has enough space */
 120:Component/ringbuffer/ringbuffer.c ****     if (!RINGBUFFER_SPACE_LEN(self))
 326              		.loc 1 120 5 view .LVU93
 116:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
 327              		.loc 1 116 1 is_stmt 0 view .LVU94
 328 0000 30B5     		push	{r4, r5, lr}
 329              	.LCFI1:
 330              		.cfi_def_cfa_offset 12
 331              		.cfi_offset 4, -12
 332              		.cfi_offset 5, -8
 333              		.cfi_offset 14, -4
 334              		.loc 1 120 10 view .LVU95
 335 0002 C468     		ldr	r4, [r0, #12]
 336              	.LVL21:
 337              	.LBB44:
 338              	.LBI44:
  79:Component/ringbuffer/ringbuffer.c **** {
 339              		.loc 1 79 17 is_stmt 1 view .LVU96
 340              	.LBB45:
  81:Component/ringbuffer/ringbuffer.c **** 
 341              		.loc 1 81 28 view .LVU97
  83:Component/ringbuffer/ringbuffer.c ****     {
 342              		.loc 1 83 5 view .LVU98
ARM GAS  /tmp/ccIXlM3Z.s 			page 10


 343              	.LBB46:
 344              	.LBI46:
  17:Component/ringbuffer/ringbuffer.c **** {
 345              		.loc 1 17 30 view .LVU99
 346              	.LBB47:
  19:Component/ringbuffer/ringbuffer.c ****     {
 347              		.loc 1 19 5 view .LVU100
  19:Component/ringbuffer/ringbuffer.c ****     {
 348              		.loc 1 19 13 is_stmt 0 view .LVU101
 349 0004 4268     		ldr	r2, [r0, #4]
  19:Component/ringbuffer/ringbuffer.c ****     {
 350              		.loc 1 19 33 view .LVU102
 351 0006 8368     		ldr	r3, [r0, #8]
  19:Component/ringbuffer/ringbuffer.c ****     {
 352              		.loc 1 19 13 view .LVU103
 353 0008 5208     		lsrs	r2, r2, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 354              		.loc 1 19 33 view .LVU104
 355 000a 5B08     		lsrs	r3, r3, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 356              		.loc 1 19 8 view .LVU105
 357 000c 9A42     		cmp	r2, r3
 358 000e 20D0     		beq	.L24
 359              	.LVL22:
  19:Component/ringbuffer/ringbuffer.c ****     {
 360              		.loc 1 19 8 view .LVU106
 361              	.LBE47:
 362              	.LBE46:
 363              	.LBB51:
 364              	.LBI51:
  79:Component/ringbuffer/ringbuffer.c **** {
 365              		.loc 1 79 17 is_stmt 1 view .LVU107
 366              	.LBB52:
  92:Component/ringbuffer/ringbuffer.c **** 
 367              		.loc 1 92 9 view .LVU108
  92:Component/ringbuffer/ringbuffer.c **** 
 368              		.loc 1 92 27 is_stmt 0 view .LVU109
 369 0010 8268     		ldr	r2, [r0, #8]
  92:Component/ringbuffer/ringbuffer.c **** 
 370              		.loc 1 92 51 view .LVU110
 371 0012 4368     		ldr	r3, [r0, #4]
  92:Component/ringbuffer/ringbuffer.c **** 
 372              		.loc 1 92 27 view .LVU111
 373 0014 5208     		lsrs	r2, r2, #1
 374              	.LVL23:
  92:Component/ringbuffer/ringbuffer.c **** 
 375              		.loc 1 92 51 view .LVU112
 376 0016 5B08     		lsrs	r3, r3, #1
 377              	.LVL24:
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 378              		.loc 1 94 9 is_stmt 1 view .LVU113
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 379              		.loc 1 94 12 is_stmt 0 view .LVU114
 380 0018 9A42     		cmp	r2, r3
 381 001a 17D9     		bls	.L17
 382              	.LVL25:
 383              	.L23:
ARM GAS  /tmp/ccIXlM3Z.s 			page 11


  97:Component/ringbuffer/ringbuffer.c ****     }
 384              		.loc 1 97 38 view .LVU115
 385 001c D31A     		subs	r3, r2, r3
 386              	.LVL26:
 387              	.L16:
  97:Component/ringbuffer/ringbuffer.c ****     }
 388              		.loc 1 97 38 view .LVU116
 389              	.LBE52:
 390              	.LBE51:
 391              	.LBE45:
 392              	.LBE44:
 393              		.loc 1 120 8 discriminator 1 view .LVU117
 394 001e 9C42     		cmp	r4, r3
 395 0020 20D0     		beq	.L22
 396              	.L26:
 121:Component/ringbuffer/ringbuffer.c ****         return 0;
 122:Component/ringbuffer/ringbuffer.c **** 
 123:Component/ringbuffer/ringbuffer.c ****     self->buffer_ptr[self->write_index] = data;
 397              		.loc 1 123 5 is_stmt 1 view .LVU118
 398              		.loc 1 123 26 is_stmt 0 view .LVU119
 399 0022 8368     		ldr	r3, [r0, #8]
 400              		.loc 1 123 41 view .LVU120
 401 0024 0268     		ldr	r2, [r0]
 402              		.loc 1 123 26 view .LVU121
 403 0026 5B08     		lsrs	r3, r3, #1
 404              		.loc 1 123 41 view .LVU122
 405 0028 D154     		strb	r1, [r2, r3]
 124:Component/ringbuffer/ringbuffer.c **** 
 125:Component/ringbuffer/ringbuffer.c ****     /* flip mirror */
 126:Component/ringbuffer/ringbuffer.c ****     if (self->write_index == self->buffer_size - 1)
 406              		.loc 1 126 5 is_stmt 1 view .LVU123
 407              		.loc 1 126 13 is_stmt 0 view .LVU124
 408 002a 8268     		ldr	r2, [r0, #8]
 409              		.loc 1 126 34 view .LVU125
 410 002c C368     		ldr	r3, [r0, #12]
 411              		.loc 1 126 13 view .LVU126
 412 002e 5208     		lsrs	r2, r2, #1
 413              		.loc 1 126 48 view .LVU127
 414 0030 013B     		subs	r3, r3, #1
 415              		.loc 1 126 8 view .LVU128
 416 0032 9A42     		cmp	r2, r3
 417 0034 18D0     		beq	.L25
 127:Component/ringbuffer/ringbuffer.c ****     {
 128:Component/ringbuffer/ringbuffer.c ****         self->write_mirror = ~self->write_mirror;
 129:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 130:Component/ringbuffer/ringbuffer.c ****     }
 131:Component/ringbuffer/ringbuffer.c ****     else
 132:Component/ringbuffer/ringbuffer.c ****     {
 133:Component/ringbuffer/ringbuffer.c ****         self->write_index++;
 418              		.loc 1 133 9 is_stmt 1 view .LVU129
 419              		.loc 1 133 26 is_stmt 0 view .LVU130
 420 0036 0122     		movs	r2, #1
 421              		.loc 1 133 13 view .LVU131
 422 0038 8368     		ldr	r3, [r0, #8]
 423              		.loc 1 133 26 view .LVU132
 424 003a 8168     		ldr	r1, [r0, #8]
 425              	.LVL27:
ARM GAS  /tmp/ccIXlM3Z.s 			page 12


 426              		.loc 1 133 13 view .LVU133
 427 003c 5B08     		lsrs	r3, r3, #1
 428              		.loc 1 133 26 view .LVU134
 429 003e 0133     		adds	r3, r3, #1
 430 0040 5B00     		lsls	r3, r3, #1
 431 0042 0A40     		ands	r2, r1
 432 0044 1343     		orrs	r3, r2
 433 0046 8360     		str	r3, [r0, #8]
 434              	.L20:
 134:Component/ringbuffer/ringbuffer.c ****     }
 135:Component/ringbuffer/ringbuffer.c **** 
 136:Component/ringbuffer/ringbuffer.c ****     return 1;
 435              		.loc 1 136 12 view .LVU135
 436 0048 0120     		movs	r0, #1
 437              	.LVL28:
 438              	.L14:
 137:Component/ringbuffer/ringbuffer.c **** }
 439              		.loc 1 137 1 view .LVU136
 440              		@ sp needed
 441 004a 30BD     		pop	{r4, r5, pc}
 442              	.LVL29:
 443              	.L17:
 444              	.LBB58:
 445              	.LBB56:
 446              	.LBB54:
 447              	.LBB53:
  97:Component/ringbuffer/ringbuffer.c ****     }
 448              		.loc 1 97 13 is_stmt 1 view .LVU137
  97:Component/ringbuffer/ringbuffer.c ****     }
 449              		.loc 1 97 24 is_stmt 0 view .LVU138
 450 004c C568     		ldr	r5, [r0, #12]
  97:Component/ringbuffer/ringbuffer.c ****     }
 451              		.loc 1 97 38 view .LVU139
 452 004e AA18     		adds	r2, r5, r2
 453              	.LVL30:
  97:Component/ringbuffer/ringbuffer.c ****     }
 454              		.loc 1 97 38 view .LVU140
 455 0050 E4E7     		b	.L23
 456              	.LVL31:
 457              	.L24:
  97:Component/ringbuffer/ringbuffer.c ****     }
 458              		.loc 1 97 38 view .LVU141
 459              	.LBE53:
 460              	.LBE54:
 461              	.LBB55:
 462              	.LBB50:
 463              	.LBB48:
 464              	.LBI48:
  17:Component/ringbuffer/ringbuffer.c **** {
 465              		.loc 1 17 30 is_stmt 1 view .LVU142
 466              	.LBB49:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 467              		.loc 1 21 9 view .LVU143
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 468              		.loc 1 21 17 is_stmt 0 view .LVU144
 469 0052 4368     		ldr	r3, [r0, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
ARM GAS  /tmp/ccIXlM3Z.s 			page 13


 470              		.loc 1 21 38 view .LVU145
 471 0054 8268     		ldr	r2, [r0, #8]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 472              		.loc 1 21 17 view .LVU146
 473 0056 DB07     		lsls	r3, r3, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 474              		.loc 1 21 38 view .LVU147
 475 0058 D207     		lsls	r2, r2, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 476              		.loc 1 21 12 view .LVU148
 477 005a 9A42     		cmp	r2, r3
 478 005c 12D0     		beq	.L21
  24:Component/ringbuffer/ringbuffer.c ****     }
 479              		.loc 1 24 13 is_stmt 1 view .LVU149
 480              	.LVL32:
  24:Component/ringbuffer/ringbuffer.c ****     }
 481              		.loc 1 24 13 is_stmt 0 view .LVU150
 482              	.LBE49:
 483              	.LBE48:
 484              	.LBE50:
 485              	.LBE55:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 486              		.loc 1 88 9 is_stmt 1 view .LVU151
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 487              		.loc 1 88 20 is_stmt 0 view .LVU152
 488 005e C368     		ldr	r3, [r0, #12]
 489              	.LVL33:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 490              		.loc 1 88 20 view .LVU153
 491              	.LBE56:
 492              	.LBE58:
 120:Component/ringbuffer/ringbuffer.c ****         return 0;
 493              		.loc 1 120 8 discriminator 1 view .LVU154
 494 0060 9C42     		cmp	r4, r3
 495 0062 DED1     		bne	.L26
 496              	.L22:
 121:Component/ringbuffer/ringbuffer.c **** 
 497              		.loc 1 121 16 view .LVU155
 498 0064 0020     		movs	r0, #0
 499              	.LVL34:
 121:Component/ringbuffer/ringbuffer.c **** 
 500              		.loc 1 121 16 view .LVU156
 501 0066 F0E7     		b	.L14
 502              	.LVL35:
 503              	.L25:
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 504              		.loc 1 128 9 is_stmt 1 view .LVU157
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 505              		.loc 1 128 30 is_stmt 0 view .LVU158
 506 0068 0123     		movs	r3, #1
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 507              		.loc 1 128 28 view .LVU159
 508 006a 1C00     		movs	r4, r3
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 509              		.loc 1 128 35 view .LVU160
 510 006c 8168     		ldr	r1, [r0, #8]
 511              	.LVL36:
ARM GAS  /tmp/ccIXlM3Z.s 			page 14


 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 512              		.loc 1 128 28 view .LVU161
 513 006e 8268     		ldr	r2, [r0, #8]
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 514              		.loc 1 128 35 view .LVU162
 515 0070 C907     		lsls	r1, r1, #31
 516 0072 C90F     		lsrs	r1, r1, #31
 128:Component/ringbuffer/ringbuffer.c ****         self->write_index = 0;
 517              		.loc 1 128 28 view .LVU163
 518 0074 9A43     		bics	r2, r3
 519 0076 8C43     		bics	r4, r1
 520 0078 2243     		orrs	r2, r4
 521 007a 8260     		str	r2, [r0, #8]
 129:Component/ringbuffer/ringbuffer.c ****     }
 522              		.loc 1 129 9 is_stmt 1 view .LVU164
 129:Component/ringbuffer/ringbuffer.c ****     }
 523              		.loc 1 129 27 is_stmt 0 view .LVU165
 524 007c 8268     		ldr	r2, [r0, #8]
 525 007e 1340     		ands	r3, r2
 526 0080 8360     		str	r3, [r0, #8]
 527 0082 E1E7     		b	.L20
 528              	.LVL37:
 529              	.L21:
 530              	.LBB59:
 531              	.LBB57:
  86:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_FULL:
 532              		.loc 1 86 16 view .LVU166
 533 0084 0023     		movs	r3, #0
 534 0086 CAE7     		b	.L16
 535              	.LBE57:
 536              	.LBE59:
 537              		.cfi_endproc
 538              	.LFE4:
 540              		.section	.text.ringbuffer_getchar,"ax",%progbits
 541              		.align	1
 542              		.p2align 2,,3
 543              		.global	ringbuffer_getchar
 544              		.syntax unified
 545              		.code	16
 546              		.thumb_func
 548              	ringbuffer_getchar:
 549              	.LVL38:
 550              	.LFB5:
 138:Component/ringbuffer/ringbuffer.c **** 
 139:Component/ringbuffer/ringbuffer.c **** /**
 140:Component/ringbuffer/ringbuffer.c ****  * @brief 从环形缓冲区中读取一个字符
 141:Component/ringbuffer/ringbuffer.c ****  *
 142:Component/ringbuffer/ringbuffer.c ****  * 从指定的环形缓冲区中读取一个字符，并将其存储在提供的数据指针指向
 143:Component/ringbuffer/ringbuffer.c ****  * 如果环形缓冲区为空，则返回0，否则返回1。
 144:Component/ringbuffer/ringbuffer.c ****  *
 145:Component/ringbuffer/ringbuffer.c ****  * @param self 指向环形缓冲区的指针
 146:Component/ringbuffer/ringbuffer.c ****  * @param data 用于存储读取字符的数据指针
 147:Component/ringbuffer/ringbuffer.c ****  *
 148:Component/ringbuffer/ringbuffer.c ****  * @return 如果成功读取一个字符，则返回1；如果环形缓冲区为空，则返回0�
 149:Component/ringbuffer/ringbuffer.c ****  */
 150:Component/ringbuffer/ringbuffer.c **** uint32_t ringbuffer_getchar(ringbuffer_t self, uint8_t *data)
 151:Component/ringbuffer/ringbuffer.c **** {
ARM GAS  /tmp/ccIXlM3Z.s 			page 15


 551              		.loc 1 151 1 is_stmt 1 view -0
 552              		.cfi_startproc
 553              		@ args = 0, pretend = 0, frame = 0
 554              		@ frame_needed = 0, uses_anonymous_args = 0
 152:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
 555              		.loc 1 152 36 view .LVU168
 153:Component/ringbuffer/ringbuffer.c **** 
 154:Component/ringbuffer/ringbuffer.c ****     /* ringbuffer is empty */
 155:Component/ringbuffer/ringbuffer.c ****     if (!ringbuffer_data_len(self))
 556              		.loc 1 155 5 view .LVU169
 557              	.LBB71:
 558              	.LBI71:
  79:Component/ringbuffer/ringbuffer.c **** {
 559              		.loc 1 79 17 view .LVU170
 560              	.LBB72:
  81:Component/ringbuffer/ringbuffer.c **** 
 561              		.loc 1 81 28 view .LVU171
  83:Component/ringbuffer/ringbuffer.c ****     {
 562              		.loc 1 83 5 view .LVU172
 563              	.LBB73:
 564              	.LBI73:
  17:Component/ringbuffer/ringbuffer.c **** {
 565              		.loc 1 17 30 view .LVU173
 566              	.LBB74:
  19:Component/ringbuffer/ringbuffer.c ****     {
 567              		.loc 1 19 5 view .LVU174
 568              	.LBE74:
 569              	.LBE73:
 570              	.LBE72:
 571              	.LBE71:
 151:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
 572              		.loc 1 151 1 is_stmt 0 view .LVU175
 573 0000 0300     		movs	r3, r0
 574 0002 10B5     		push	{r4, lr}
 575              	.LCFI2:
 576              		.cfi_def_cfa_offset 8
 577              		.cfi_offset 4, -8
 578              		.cfi_offset 14, -4
 579              	.LBB85:
 580              	.LBB83:
 581              	.LBB79:
 582              	.LBB77:
  19:Component/ringbuffer/ringbuffer.c ****     {
 583              		.loc 1 19 13 view .LVU176
 584 0004 4068     		ldr	r0, [r0, #4]
 585              	.LVL39:
  19:Component/ringbuffer/ringbuffer.c ****     {
 586              		.loc 1 19 33 view .LVU177
 587 0006 9A68     		ldr	r2, [r3, #8]
  19:Component/ringbuffer/ringbuffer.c ****     {
 588              		.loc 1 19 13 view .LVU178
 589 0008 4008     		lsrs	r0, r0, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 590              		.loc 1 19 33 view .LVU179
 591 000a 5208     		lsrs	r2, r2, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 592              		.loc 1 19 8 view .LVU180
ARM GAS  /tmp/ccIXlM3Z.s 			page 16


 593 000c 9042     		cmp	r0, r2
 594 000e 2ED0     		beq	.L38
 595              	.LVL40:
  19:Component/ringbuffer/ringbuffer.c ****     {
 596              		.loc 1 19 8 view .LVU181
 597              	.LBE77:
 598              	.LBE79:
 599              	.LBB80:
 600              	.LBI80:
  79:Component/ringbuffer/ringbuffer.c **** {
 601              		.loc 1 79 17 is_stmt 1 view .LVU182
 602              	.LBB81:
  92:Component/ringbuffer/ringbuffer.c **** 
 603              		.loc 1 92 9 view .LVU183
  92:Component/ringbuffer/ringbuffer.c **** 
 604              		.loc 1 92 27 is_stmt 0 view .LVU184
 605 0010 9C68     		ldr	r4, [r3, #8]
  92:Component/ringbuffer/ringbuffer.c **** 
 606              		.loc 1 92 51 view .LVU185
 607 0012 5A68     		ldr	r2, [r3, #4]
  92:Component/ringbuffer/ringbuffer.c **** 
 608              		.loc 1 92 27 view .LVU186
 609 0014 6408     		lsrs	r4, r4, #1
 610              	.LVL41:
  92:Component/ringbuffer/ringbuffer.c **** 
 611              		.loc 1 92 51 view .LVU187
 612 0016 5208     		lsrs	r2, r2, #1
 613              	.LVL42:
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 614              		.loc 1 94 9 is_stmt 1 view .LVU188
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 615              		.loc 1 94 12 is_stmt 0 view .LVU189
 616 0018 9442     		cmp	r4, r2
 617 001a 04D8     		bhi	.L31
  97:Component/ringbuffer/ringbuffer.c ****     }
 618              		.loc 1 97 13 is_stmt 1 view .LVU190
  97:Component/ringbuffer/ringbuffer.c ****     }
 619              		.loc 1 97 24 is_stmt 0 view .LVU191
 620 001c D868     		ldr	r0, [r3, #12]
  97:Component/ringbuffer/ringbuffer.c ****     }
 621              		.loc 1 97 38 view .LVU192
 622 001e 0019     		adds	r0, r0, r4
 623 0020 801A     		subs	r0, r0, r2
 624              	.LVL43:
 625              	.L30:
  97:Component/ringbuffer/ringbuffer.c ****     }
 626              		.loc 1 97 38 view .LVU193
 627              	.LBE81:
 628              	.LBE80:
 629              	.LBE83:
 630              	.LBE85:
 631              		.loc 1 155 8 discriminator 1 view .LVU194
 632 0022 0028     		cmp	r0, #0
 633 0024 14D0     		beq	.L27
 634              	.L31:
 156:Component/ringbuffer/ringbuffer.c ****         return 0;
 157:Component/ringbuffer/ringbuffer.c **** 
ARM GAS  /tmp/ccIXlM3Z.s 			page 17


 158:Component/ringbuffer/ringbuffer.c ****     /* put byte */
 159:Component/ringbuffer/ringbuffer.c ****     *data = self->buffer_ptr[self->read_index];
 635              		.loc 1 159 5 is_stmt 1 view .LVU195
 636              		.loc 1 159 34 is_stmt 0 view .LVU196
 637 0026 5A68     		ldr	r2, [r3, #4]
 638              		.loc 1 159 29 view .LVU197
 639 0028 1868     		ldr	r0, [r3]
 640              		.loc 1 159 34 view .LVU198
 641 002a 5208     		lsrs	r2, r2, #1
 642              		.loc 1 159 29 view .LVU199
 643 002c 825C     		ldrb	r2, [r0, r2]
 644              		.loc 1 159 11 view .LVU200
 645 002e 0A70     		strb	r2, [r1]
 160:Component/ringbuffer/ringbuffer.c **** 
 161:Component/ringbuffer/ringbuffer.c ****     if (self->read_index == self->buffer_size - 1)
 646              		.loc 1 161 5 is_stmt 1 view .LVU201
 647              		.loc 1 161 13 is_stmt 0 view .LVU202
 648 0030 5968     		ldr	r1, [r3, #4]
 649              	.LVL44:
 650              		.loc 1 161 33 view .LVU203
 651 0032 DA68     		ldr	r2, [r3, #12]
 652              		.loc 1 161 13 view .LVU204
 653 0034 4908     		lsrs	r1, r1, #1
 654              		.loc 1 161 47 view .LVU205
 655 0036 013A     		subs	r2, r2, #1
 656              		.loc 1 161 8 view .LVU206
 657 0038 9142     		cmp	r1, r2
 658 003a 0AD0     		beq	.L39
 162:Component/ringbuffer/ringbuffer.c ****     {
 163:Component/ringbuffer/ringbuffer.c ****         self->read_mirror = ~self->read_mirror;
 164:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 165:Component/ringbuffer/ringbuffer.c ****     }
 166:Component/ringbuffer/ringbuffer.c ****     else
 167:Component/ringbuffer/ringbuffer.c ****     {
 168:Component/ringbuffer/ringbuffer.c ****         self->read_index++;
 659              		.loc 1 168 9 is_stmt 1 view .LVU207
 660              		.loc 1 168 25 is_stmt 0 view .LVU208
 661 003c 0121     		movs	r1, #1
 662              		.loc 1 168 13 view .LVU209
 663 003e 5A68     		ldr	r2, [r3, #4]
 664              		.loc 1 168 25 view .LVU210
 665 0040 5868     		ldr	r0, [r3, #4]
 666              		.loc 1 168 13 view .LVU211
 667 0042 5208     		lsrs	r2, r2, #1
 668              		.loc 1 168 25 view .LVU212
 669 0044 0132     		adds	r2, r2, #1
 670 0046 5200     		lsls	r2, r2, #1
 671 0048 0140     		ands	r1, r0
 672 004a 0A43     		orrs	r2, r1
 673 004c 5A60     		str	r2, [r3, #4]
 674              	.L33:
 169:Component/ringbuffer/ringbuffer.c ****     }
 170:Component/ringbuffer/ringbuffer.c **** 
 171:Component/ringbuffer/ringbuffer.c ****     return 1;
 675              		.loc 1 171 12 view .LVU213
 676 004e 0120     		movs	r0, #1
 677              	.L27:
ARM GAS  /tmp/ccIXlM3Z.s 			page 18


 172:Component/ringbuffer/ringbuffer.c **** }
 678              		.loc 1 172 1 view .LVU214
 679              		@ sp needed
 680 0050 10BD     		pop	{r4, pc}
 681              	.L39:
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 682              		.loc 1 163 9 is_stmt 1 view .LVU215
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 683              		.loc 1 163 29 is_stmt 0 view .LVU216
 684 0052 0122     		movs	r2, #1
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 685              		.loc 1 163 27 view .LVU217
 686 0054 1400     		movs	r4, r2
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 687              		.loc 1 163 34 view .LVU218
 688 0056 5868     		ldr	r0, [r3, #4]
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 689              		.loc 1 163 27 view .LVU219
 690 0058 5968     		ldr	r1, [r3, #4]
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 691              		.loc 1 163 34 view .LVU220
 692 005a C007     		lsls	r0, r0, #31
 693 005c C00F     		lsrs	r0, r0, #31
 163:Component/ringbuffer/ringbuffer.c ****         self->read_index = 0;
 694              		.loc 1 163 27 view .LVU221
 695 005e 9143     		bics	r1, r2
 696 0060 8443     		bics	r4, r0
 697 0062 2143     		orrs	r1, r4
 698 0064 5960     		str	r1, [r3, #4]
 164:Component/ringbuffer/ringbuffer.c ****     }
 699              		.loc 1 164 9 is_stmt 1 view .LVU222
 164:Component/ringbuffer/ringbuffer.c ****     }
 700              		.loc 1 164 26 is_stmt 0 view .LVU223
 701 0066 5968     		ldr	r1, [r3, #4]
 702 0068 0A40     		ands	r2, r1
 703 006a 5A60     		str	r2, [r3, #4]
 704 006c EFE7     		b	.L33
 705              	.LVL45:
 706              	.L38:
 707              	.LBB86:
 708              	.LBB84:
 709              	.LBB82:
 710              	.LBB78:
 711              	.LBB75:
 712              	.LBI75:
  17:Component/ringbuffer/ringbuffer.c **** {
 713              		.loc 1 17 30 is_stmt 1 view .LVU224
 714              	.LBB76:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 715              		.loc 1 21 9 view .LVU225
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 716              		.loc 1 21 17 is_stmt 0 view .LVU226
 717 006e 5A68     		ldr	r2, [r3, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 718              		.loc 1 21 38 view .LVU227
 719 0070 9868     		ldr	r0, [r3, #8]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
ARM GAS  /tmp/ccIXlM3Z.s 			page 19


 720              		.loc 1 21 17 view .LVU228
 721 0072 D207     		lsls	r2, r2, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 722              		.loc 1 21 38 view .LVU229
 723 0074 C007     		lsls	r0, r0, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 724              		.loc 1 21 12 view .LVU230
 725 0076 9042     		cmp	r0, r2
 726 0078 01D0     		beq	.L34
  24:Component/ringbuffer/ringbuffer.c ****     }
 727              		.loc 1 24 13 is_stmt 1 view .LVU231
 728              	.LVL46:
  24:Component/ringbuffer/ringbuffer.c ****     }
 729              		.loc 1 24 13 is_stmt 0 view .LVU232
 730              	.LBE76:
 731              	.LBE75:
 732              	.LBE78:
 733              	.LBE82:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 734              		.loc 1 88 9 is_stmt 1 view .LVU233
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 735              		.loc 1 88 20 is_stmt 0 view .LVU234
 736 007a D868     		ldr	r0, [r3, #12]
 737 007c D1E7     		b	.L30
 738              	.LVL47:
 739              	.L34:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 740              		.loc 1 88 20 view .LVU235
 741              	.LBE84:
 742              	.LBE86:
 156:Component/ringbuffer/ringbuffer.c **** 
 743              		.loc 1 156 16 view .LVU236
 744 007e 0020     		movs	r0, #0
 745              	.LVL48:
 156:Component/ringbuffer/ringbuffer.c **** 
 746              		.loc 1 156 16 view .LVU237
 747 0080 E6E7     		b	.L27
 748              		.cfi_endproc
 749              	.LFE5:
 751 0082 C046     		.section	.text.ringbuffer_get,"ax",%progbits
 752              		.align	1
 753              		.p2align 2,,3
 754              		.global	ringbuffer_get
 755              		.syntax unified
 756              		.code	16
 757              		.thumb_func
 759              	ringbuffer_get:
 760              	.LVL49:
 761              	.LFB6:
 173:Component/ringbuffer/ringbuffer.c **** 
 174:Component/ringbuffer/ringbuffer.c **** /**
 175:Component/ringbuffer/ringbuffer.c ****  * @brief 从环形缓冲区中获取数据
 176:Component/ringbuffer/ringbuffer.c ****  *
 177:Component/ringbuffer/ringbuffer.c ****  * 从指定的环形缓冲区中获取指定长度的数据，并将其复制到提供的缓冲区
 178:Component/ringbuffer/ringbuffer.c ****  *
 179:Component/ringbuffer/ringbuffer.c ****  * @param self 环形缓冲区的实例
 180:Component/ringbuffer/ringbuffer.c ****  * @param buffer 存储获取到的数据的缓冲区指针
ARM GAS  /tmp/ccIXlM3Z.s 			page 20


 181:Component/ringbuffer/ringbuffer.c ****  * @param length 要从环形缓冲区中获取的数据长度
 182:Component/ringbuffer/ringbuffer.c ****  *
 183:Component/ringbuffer/ringbuffer.c ****  * @return 成功获取的数据长度，如果环形缓冲区中没有数据，则返回0。
 184:Component/ringbuffer/ringbuffer.c ****  */
 185:Component/ringbuffer/ringbuffer.c **** uint32_t ringbuffer_get(ringbuffer_t self, void *buffer, uint32_t length)
 186:Component/ringbuffer/ringbuffer.c **** {
 762              		.loc 1 186 1 is_stmt 1 view -0
 763              		.cfi_startproc
 764              		@ args = 0, pretend = 0, frame = 0
 765              		@ frame_needed = 0, uses_anonymous_args = 0
 187:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 766              		.loc 1 187 5 view .LVU239
 188:Component/ringbuffer/ringbuffer.c ****     uint8_t *p = (uint8_t *)buffer;
 767              		.loc 1 188 5 view .LVU240
 186:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 768              		.loc 1 186 1 is_stmt 0 view .LVU241
 769 0000 70B5     		push	{r4, r5, r6, lr}
 770              	.LCFI3:
 771              		.cfi_def_cfa_offset 16
 772              		.cfi_offset 4, -16
 773              		.cfi_offset 5, -12
 774              		.cfi_offset 6, -8
 775              		.cfi_offset 14, -4
 186:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 776              		.loc 1 186 1 view .LVU242
 777 0002 0E00     		movs	r6, r1
 778              	.LVL50:
 189:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != NULL);
 779              		.loc 1 189 36 is_stmt 1 view .LVU243
 190:Component/ringbuffer/ringbuffer.c **** 
 191:Component/ringbuffer/ringbuffer.c ****     /* whether has enough data  */
 192:Component/ringbuffer/ringbuffer.c ****     size = ringbuffer_data_len(self);
 780              		.loc 1 192 5 view .LVU244
 781              	.LBB98:
 782              	.LBI98:
  79:Component/ringbuffer/ringbuffer.c **** {
 783              		.loc 1 79 17 view .LVU245
 784              	.LBB99:
  81:Component/ringbuffer/ringbuffer.c **** 
 785              		.loc 1 81 28 view .LVU246
  83:Component/ringbuffer/ringbuffer.c ****     {
 786              		.loc 1 83 5 view .LVU247
 787              	.LBB100:
 788              	.LBI100:
  17:Component/ringbuffer/ringbuffer.c **** {
 789              		.loc 1 17 30 view .LVU248
 790              	.LBB101:
  19:Component/ringbuffer/ringbuffer.c ****     {
 791              		.loc 1 19 5 view .LVU249
  19:Component/ringbuffer/ringbuffer.c ****     {
 792              		.loc 1 19 13 is_stmt 0 view .LVU250
 793 0004 4168     		ldr	r1, [r0, #4]
 794              	.LVL51:
  19:Component/ringbuffer/ringbuffer.c ****     {
 795              		.loc 1 19 33 view .LVU251
 796 0006 8368     		ldr	r3, [r0, #8]
 797              	.LBE101:
ARM GAS  /tmp/ccIXlM3Z.s 			page 21


 798              	.LBE100:
 799              	.LBE99:
 800              	.LBE98:
 186:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 801              		.loc 1 186 1 view .LVU252
 802 0008 0400     		movs	r4, r0
 803              	.LBB115:
 804              	.LBB112:
 805              	.LBB106:
 806              	.LBB104:
  19:Component/ringbuffer/ringbuffer.c ****     {
 807              		.loc 1 19 13 view .LVU253
 808 000a 4908     		lsrs	r1, r1, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 809              		.loc 1 19 33 view .LVU254
 810 000c 5B08     		lsrs	r3, r3, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 811              		.loc 1 19 8 view .LVU255
 812 000e 9942     		cmp	r1, r3
 813 0010 43D0     		beq	.L53
 814              	.LVL52:
  19:Component/ringbuffer/ringbuffer.c ****     {
 815              		.loc 1 19 8 view .LVU256
 816              	.LBE104:
 817              	.LBE106:
 818              	.LBB107:
 819              	.LBI107:
  79:Component/ringbuffer/ringbuffer.c **** {
 820              		.loc 1 79 17 is_stmt 1 view .LVU257
 821              	.LBB108:
  92:Component/ringbuffer/ringbuffer.c **** 
 822              		.loc 1 92 9 view .LVU258
  92:Component/ringbuffer/ringbuffer.c **** 
 823              		.loc 1 92 27 is_stmt 0 view .LVU259
 824 0012 8368     		ldr	r3, [r0, #8]
  92:Component/ringbuffer/ringbuffer.c **** 
 825              		.loc 1 92 51 view .LVU260
 826 0014 4568     		ldr	r5, [r0, #4]
  92:Component/ringbuffer/ringbuffer.c **** 
 827              		.loc 1 92 27 view .LVU261
 828 0016 5B08     		lsrs	r3, r3, #1
 829              	.LVL53:
  92:Component/ringbuffer/ringbuffer.c **** 
 830              		.loc 1 92 51 view .LVU262
 831 0018 6D08     		lsrs	r5, r5, #1
 832              	.LVL54:
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 833              		.loc 1 94 9 is_stmt 1 view .LVU263
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 834              		.loc 1 94 12 is_stmt 0 view .LVU264
 835 001a AB42     		cmp	r3, r5
 836 001c 3BD8     		bhi	.L54
  97:Component/ringbuffer/ringbuffer.c ****     }
 837              		.loc 1 97 13 is_stmt 1 view .LVU265
  97:Component/ringbuffer/ringbuffer.c ****     }
 838              		.loc 1 97 24 is_stmt 0 view .LVU266
 839 001e C168     		ldr	r1, [r0, #12]
ARM GAS  /tmp/ccIXlM3Z.s 			page 22


  97:Component/ringbuffer/ringbuffer.c ****     }
 840              		.loc 1 97 38 view .LVU267
 841 0020 CB18     		adds	r3, r1, r3
 842              	.LVL55:
  97:Component/ringbuffer/ringbuffer.c ****     }
 843              		.loc 1 97 38 view .LVU268
 844 0022 5D1B     		subs	r5, r3, r5
 845              	.LVL56:
 846              	.L43:
  97:Component/ringbuffer/ringbuffer.c ****     }
 847              		.loc 1 97 38 view .LVU269
 848              	.LBE108:
 849              	.LBE107:
 850              	.LBE112:
 851              	.LBE115:
 193:Component/ringbuffer/ringbuffer.c **** 
 194:Component/ringbuffer/ringbuffer.c ****     /* no data */
 195:Component/ringbuffer/ringbuffer.c ****     if (size == 0)
 852              		.loc 1 195 5 is_stmt 1 view .LVU270
 853              		.loc 1 195 8 is_stmt 0 view .LVU271
 854 0024 002D     		cmp	r5, #0
 855 0026 34D0     		beq	.L40
 856              	.L45:
 196:Component/ringbuffer/ringbuffer.c ****         return 0;
 197:Component/ringbuffer/ringbuffer.c **** 
 198:Component/ringbuffer/ringbuffer.c ****     /* less data */
 199:Component/ringbuffer/ringbuffer.c ****     if (size < length)
 857              		.loc 1 199 5 is_stmt 1 view .LVU272
 858              		.loc 1 199 8 is_stmt 0 view .LVU273
 859 0028 9542     		cmp	r5, r2
 860 002a 00D9     		bls	.L46
 861 002c 1500     		movs	r5, r2
 862              	.LVL57:
 863              	.L46:
 200:Component/ringbuffer/ringbuffer.c ****         length = size;
 201:Component/ringbuffer/ringbuffer.c **** 
 202:Component/ringbuffer/ringbuffer.c ****     if (self->buffer_size - self->read_index > length)
 864              		.loc 1 202 5 is_stmt 1 view .LVU274
 865              		.loc 1 202 13 is_stmt 0 view .LVU275
 866 002e E368     		ldr	r3, [r4, #12]
 867              		.loc 1 202 33 view .LVU276
 868 0030 6268     		ldr	r2, [r4, #4]
 203:Component/ringbuffer/ringbuffer.c ****     {
 204:Component/ringbuffer/ringbuffer.c ****         /* copy all of data */
 205:Component/ringbuffer/ringbuffer.c ****         memcpy(p, &self->buffer_ptr[self->read_index], length);
 869              		.loc 1 205 24 view .LVU277
 870 0032 2168     		ldr	r1, [r4]
 202:Component/ringbuffer/ringbuffer.c ****     {
 871              		.loc 1 202 33 view .LVU278
 872 0034 5208     		lsrs	r2, r2, #1
 202:Component/ringbuffer/ringbuffer.c ****     {
 873              		.loc 1 202 27 view .LVU279
 874 0036 9B1A     		subs	r3, r3, r2
 202:Component/ringbuffer/ringbuffer.c ****     {
 875              		.loc 1 202 8 view .LVU280
 876 0038 AB42     		cmp	r3, r5
 877 003a 36D8     		bhi	.L55
ARM GAS  /tmp/ccIXlM3Z.s 			page 23


 206:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 207:Component/ringbuffer/ringbuffer.c ****          * length of data in current mirror */
 208:Component/ringbuffer/ringbuffer.c ****         self->read_index += length;
 209:Component/ringbuffer/ringbuffer.c ****         return length;
 210:Component/ringbuffer/ringbuffer.c ****     }
 211:Component/ringbuffer/ringbuffer.c **** 
 212:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[0],
 878              		.loc 1 212 5 is_stmt 1 view .LVU281
 213:Component/ringbuffer/ringbuffer.c ****            &self->buffer_ptr[self->read_index],
 879              		.loc 1 213 34 is_stmt 0 view .LVU282
 880 003c 6368     		ldr	r3, [r4, #4]
 214:Component/ringbuffer/ringbuffer.c ****            self->buffer_size - self->read_index);
 881              		.loc 1 214 16 view .LVU283
 882 003e E268     		ldr	r2, [r4, #12]
 883              		.loc 1 214 36 view .LVU284
 884 0040 6068     		ldr	r0, [r4, #4]
 885              	.LVL58:
 213:Component/ringbuffer/ringbuffer.c ****            &self->buffer_ptr[self->read_index],
 886              		.loc 1 213 34 view .LVU285
 887 0042 5B08     		lsrs	r3, r3, #1
 888              		.loc 1 214 36 view .LVU286
 889 0044 4008     		lsrs	r0, r0, #1
 890              		.loc 1 214 30 view .LVU287
 891 0046 121A     		subs	r2, r2, r0
 213:Component/ringbuffer/ringbuffer.c ****            &self->buffer_ptr[self->read_index],
 892              		.loc 1 213 12 view .LVU288
 893 0048 C918     		adds	r1, r1, r3
 212:Component/ringbuffer/ringbuffer.c ****            &self->buffer_ptr[self->read_index],
 894              		.loc 1 212 5 view .LVU289
 895 004a 3000     		movs	r0, r6
 896 004c FFF7FEFF 		bl	memcpy
 897              	.LVL59:
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
 898              		.loc 1 215 5 is_stmt 1 view .LVU290
 899              		.loc 1 215 19 is_stmt 0 view .LVU291
 900 0050 E168     		ldr	r1, [r4, #12]
 901              		.loc 1 215 39 view .LVU292
 902 0052 6068     		ldr	r0, [r4, #4]
 216:Component/ringbuffer/ringbuffer.c ****            &self->buffer_ptr[0],
 217:Component/ringbuffer/ringbuffer.c ****            length - (self->buffer_size - self->read_index));
 903              		.loc 1 217 26 view .LVU293
 904 0054 E268     		ldr	r2, [r4, #12]
 905              		.loc 1 217 46 view .LVU294
 906 0056 6368     		ldr	r3, [r4, #4]
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
 907              		.loc 1 215 39 view .LVU295
 908 0058 4008     		lsrs	r0, r0, #1
 909              		.loc 1 217 46 view .LVU296
 910 005a 5B08     		lsrs	r3, r3, #1
 911              		.loc 1 217 40 view .LVU297
 912 005c D21A     		subs	r2, r2, r3
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
 913              		.loc 1 215 33 view .LVU298
 914 005e 081A     		subs	r0, r1, r0
 915              		.loc 1 217 19 view .LVU299
 916 0060 AA1A     		subs	r2, r5, r2
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
ARM GAS  /tmp/ccIXlM3Z.s 			page 24


 917              		.loc 1 215 5 view .LVU300
 918 0062 2168     		ldr	r1, [r4]
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
 919              		.loc 1 215 12 view .LVU301
 920 0064 3018     		adds	r0, r6, r0
 215:Component/ringbuffer/ringbuffer.c ****     memcpy(&p[self->buffer_size - self->read_index],
 921              		.loc 1 215 5 view .LVU302
 922 0066 FFF7FEFF 		bl	memcpy
 923              	.LVL60:
 218:Component/ringbuffer/ringbuffer.c **** 
 219:Component/ringbuffer/ringbuffer.c ****     /* we are going into the other side of the mirror */
 220:Component/ringbuffer/ringbuffer.c ****     self->read_mirror = ~self->read_mirror;
 924              		.loc 1 220 5 is_stmt 1 view .LVU303
 925              		.loc 1 220 25 is_stmt 0 view .LVU304
 926 006a 0123     		movs	r3, #1
 927              		.loc 1 220 23 view .LVU305
 928 006c 1800     		movs	r0, r3
 929              		.loc 1 220 30 view .LVU306
 930 006e 6168     		ldr	r1, [r4, #4]
 931              		.loc 1 220 23 view .LVU307
 932 0070 6268     		ldr	r2, [r4, #4]
 933              		.loc 1 220 30 view .LVU308
 934 0072 C907     		lsls	r1, r1, #31
 935 0074 C90F     		lsrs	r1, r1, #31
 936              		.loc 1 220 23 view .LVU309
 937 0076 8843     		bics	r0, r1
 938 0078 9A43     		bics	r2, r3
 939 007a 0243     		orrs	r2, r0
 940 007c 6260     		str	r2, [r4, #4]
 221:Component/ringbuffer/ringbuffer.c ****     self->read_index = length - (self->buffer_size - self->read_index);
 941              		.loc 1 221 5 is_stmt 1 view .LVU310
 942              		.loc 1 221 38 is_stmt 0 view .LVU311
 943 007e E268     		ldr	r2, [r4, #12]
 944              		.loc 1 221 58 view .LVU312
 945 0080 6168     		ldr	r1, [r4, #4]
 946 0082 4908     		lsrs	r1, r1, #1
 947              		.loc 1 221 52 view .LVU313
 948 0084 521A     		subs	r2, r2, r1
 949              		.loc 1 221 22 view .LVU314
 950 0086 6168     		ldr	r1, [r4, #4]
 951              		.loc 1 221 31 view .LVU315
 952 0088 AA1A     		subs	r2, r5, r2
 953              		.loc 1 221 22 view .LVU316
 954 008a 5200     		lsls	r2, r2, #1
 955 008c 0B40     		ands	r3, r1
 956 008e 1343     		orrs	r3, r2
 957 0090 6360     		str	r3, [r4, #4]
 222:Component/ringbuffer/ringbuffer.c **** 
 223:Component/ringbuffer/ringbuffer.c ****     return length;
 958              		.loc 1 223 5 is_stmt 1 view .LVU317
 959              	.LVL61:
 960              	.L40:
 224:Component/ringbuffer/ringbuffer.c **** }
 961              		.loc 1 224 1 is_stmt 0 view .LVU318
 962 0092 2800     		movs	r0, r5
 963              		@ sp needed
 964              	.LVL62:
ARM GAS  /tmp/ccIXlM3Z.s 			page 25


 965              	.LVL63:
 966              		.loc 1 224 1 view .LVU319
 967 0094 70BD     		pop	{r4, r5, r6, pc}
 968              	.LVL64:
 969              	.L54:
 970              	.LBB116:
 971              	.LBB113:
 972              	.LBB110:
 973              	.LBB109:
  95:Component/ringbuffer/ringbuffer.c ****         else
 974              		.loc 1 95 13 is_stmt 1 view .LVU320
  95:Component/ringbuffer/ringbuffer.c ****         else
 975              		.loc 1 95 23 is_stmt 0 view .LVU321
 976 0096 5D1B     		subs	r5, r3, r5
 977              	.LVL65:
  95:Component/ringbuffer/ringbuffer.c ****         else
 978              		.loc 1 95 23 view .LVU322
 979              	.LBE109:
 980              	.LBE110:
 981              	.LBE113:
 982              	.LBE116:
 195:Component/ringbuffer/ringbuffer.c ****         return 0;
 983              		.loc 1 195 5 is_stmt 1 view .LVU323
 984 0098 C6E7     		b	.L45
 985              	.LVL66:
 986              	.L53:
 987              	.LBB117:
 988              	.LBB114:
 989              	.LBB111:
 990              	.LBB105:
 991              	.LBB102:
 992              	.LBI102:
  17:Component/ringbuffer/ringbuffer.c **** {
 993              		.loc 1 17 30 view .LVU324
 994              	.LBB103:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 995              		.loc 1 21 9 view .LVU325
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 996              		.loc 1 21 17 is_stmt 0 view .LVU326
 997 009a 4368     		ldr	r3, [r0, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 998              		.loc 1 21 38 view .LVU327
 999 009c 8168     		ldr	r1, [r0, #8]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1000              		.loc 1 21 17 view .LVU328
 1001 009e DB07     		lsls	r3, r3, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1002              		.loc 1 21 38 view .LVU329
 1003 00a0 C907     		lsls	r1, r1, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1004              		.loc 1 21 12 view .LVU330
 1005 00a2 9942     		cmp	r1, r3
 1006 00a4 12D0     		beq	.L49
  24:Component/ringbuffer/ringbuffer.c ****     }
 1007              		.loc 1 24 13 is_stmt 1 view .LVU331
 1008              	.LVL67:
  24:Component/ringbuffer/ringbuffer.c ****     }
ARM GAS  /tmp/ccIXlM3Z.s 			page 26


 1009              		.loc 1 24 13 is_stmt 0 view .LVU332
 1010              	.LBE103:
 1011              	.LBE102:
 1012              	.LBE105:
 1013              	.LBE111:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1014              		.loc 1 88 9 is_stmt 1 view .LVU333
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1015              		.loc 1 88 20 is_stmt 0 view .LVU334
 1016 00a6 C568     		ldr	r5, [r0, #12]
 1017 00a8 BCE7     		b	.L43
 1018              	.LVL68:
 1019              	.L55:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1020              		.loc 1 88 20 view .LVU335
 1021              	.LBE114:
 1022              	.LBE117:
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1023              		.loc 1 205 9 is_stmt 1 view .LVU336
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1024              		.loc 1 205 41 is_stmt 0 view .LVU337
 1025 00aa 6368     		ldr	r3, [r4, #4]
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1026              		.loc 1 205 9 view .LVU338
 1027 00ac 2A00     		movs	r2, r5
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1028              		.loc 1 205 41 view .LVU339
 1029 00ae 5B08     		lsrs	r3, r3, #1
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1030              		.loc 1 205 19 view .LVU340
 1031 00b0 C918     		adds	r1, r1, r3
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1032              		.loc 1 205 9 view .LVU341
 1033 00b2 3000     		movs	r0, r6
 1034              	.LVL69:
 205:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1035              		.loc 1 205 9 view .LVU342
 1036 00b4 FFF7FEFF 		bl	memcpy
 1037              	.LVL70:
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1038              		.loc 1 208 9 is_stmt 1 view .LVU343
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1039              		.loc 1 208 26 is_stmt 0 view .LVU344
 1040 00b8 0122     		movs	r2, #1
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1041              		.loc 1 208 13 view .LVU345
 1042 00ba 6368     		ldr	r3, [r4, #4]
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1043              		.loc 1 208 26 view .LVU346
 1044 00bc 6168     		ldr	r1, [r4, #4]
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1045              		.loc 1 208 13 view .LVU347
 1046 00be 5B08     		lsrs	r3, r3, #1
 208:Component/ringbuffer/ringbuffer.c ****         return length;
 1047              		.loc 1 208 26 view .LVU348
 1048 00c0 5B19     		adds	r3, r3, r5
 1049 00c2 5B00     		lsls	r3, r3, #1
ARM GAS  /tmp/ccIXlM3Z.s 			page 27


 1050 00c4 0A40     		ands	r2, r1
 1051 00c6 1343     		orrs	r3, r2
 1052 00c8 6360     		str	r3, [r4, #4]
 209:Component/ringbuffer/ringbuffer.c ****     }
 1053              		.loc 1 209 9 is_stmt 1 view .LVU349
 209:Component/ringbuffer/ringbuffer.c ****     }
 1054              		.loc 1 209 16 is_stmt 0 view .LVU350
 1055 00ca E2E7     		b	.L40
 1056              	.LVL71:
 1057              	.L49:
 196:Component/ringbuffer/ringbuffer.c **** 
 1058              		.loc 1 196 16 view .LVU351
 1059 00cc 0025     		movs	r5, #0
 1060              	.LVL72:
 196:Component/ringbuffer/ringbuffer.c **** 
 1061              		.loc 1 196 16 view .LVU352
 1062 00ce E0E7     		b	.L40
 1063              		.cfi_endproc
 1064              	.LFE6:
 1066              		.section	.text.ringbuffer_put,"ax",%progbits
 1067              		.align	1
 1068              		.p2align 2,,3
 1069              		.global	ringbuffer_put
 1070              		.syntax unified
 1071              		.code	16
 1072              		.thumb_func
 1074              	ringbuffer_put:
 1075              	.LVL73:
 1076              	.LFB7:
 225:Component/ringbuffer/ringbuffer.c **** 
 226:Component/ringbuffer/ringbuffer.c **** uint32_t ringbuffer_put(ringbuffer_t self, const void *data, uint32_t length)
 227:Component/ringbuffer/ringbuffer.c **** {
 1077              		.loc 1 227 1 is_stmt 1 view -0
 1078              		.cfi_startproc
 1079              		@ args = 0, pretend = 0, frame = 0
 1080              		@ frame_needed = 0, uses_anonymous_args = 0
 228:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 1081              		.loc 1 228 5 view .LVU354
 229:Component/ringbuffer/ringbuffer.c ****     uint8_t *ptr = (uint8_t *)data;
 1082              		.loc 1 229 5 view .LVU355
 227:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 1083              		.loc 1 227 1 is_stmt 0 view .LVU356
 1084 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
 1085              	.LCFI4:
 1086              		.cfi_def_cfa_offset 24
 1087              		.cfi_offset 3, -24
 1088              		.cfi_offset 4, -20
 1089              		.cfi_offset 5, -16
 1090              		.cfi_offset 6, -12
 1091              		.cfi_offset 7, -8
 1092              		.cfi_offset 14, -4
 230:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != RT_NULL);
 231:Component/ringbuffer/ringbuffer.c **** 
 232:Component/ringbuffer/ringbuffer.c ****     /* whether has enough space */
 233:Component/ringbuffer/ringbuffer.c ****     size = ringbuffer_space_len(self);
 1093              		.loc 1 233 12 view .LVU357
 1094 0002 C568     		ldr	r5, [r0, #12]
ARM GAS  /tmp/ccIXlM3Z.s 			page 28


 227:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 1095              		.loc 1 227 1 view .LVU358
 1096 0004 0E00     		movs	r6, r1
 1097              	.LVL74:
 230:Component/ringbuffer/ringbuffer.c ****     RINGBUFFER_ASSERT(self != RT_NULL);
 1098              		.loc 1 230 39 is_stmt 1 view .LVU359
 1099              		.loc 1 233 5 view .LVU360
 1100              	.LBB129:
 1101              	.LBI129:
  79:Component/ringbuffer/ringbuffer.c **** {
 1102              		.loc 1 79 17 view .LVU361
 1103              	.LBB130:
  81:Component/ringbuffer/ringbuffer.c **** 
 1104              		.loc 1 81 28 view .LVU362
  83:Component/ringbuffer/ringbuffer.c ****     {
 1105              		.loc 1 83 5 view .LVU363
 1106              	.LBB131:
 1107              	.LBI131:
  17:Component/ringbuffer/ringbuffer.c **** {
 1108              		.loc 1 17 30 view .LVU364
 1109              	.LBB132:
  19:Component/ringbuffer/ringbuffer.c ****     {
 1110              		.loc 1 19 5 view .LVU365
  19:Component/ringbuffer/ringbuffer.c ****     {
 1111              		.loc 1 19 13 is_stmt 0 view .LVU366
 1112 0006 4168     		ldr	r1, [r0, #4]
 1113              	.LVL75:
  19:Component/ringbuffer/ringbuffer.c ****     {
 1114              		.loc 1 19 33 view .LVU367
 1115 0008 8368     		ldr	r3, [r0, #8]
 1116              	.LBE132:
 1117              	.LBE131:
 1118              	.LBE130:
 1119              	.LBE129:
 227:Component/ringbuffer/ringbuffer.c ****     uint32_t size;
 1120              		.loc 1 227 1 view .LVU368
 1121 000a 0400     		movs	r4, r0
 1122              	.LBB149:
 1123              	.LBB145:
 1124              	.LBB137:
 1125              	.LBB135:
  19:Component/ringbuffer/ringbuffer.c ****     {
 1126              		.loc 1 19 13 view .LVU369
 1127 000c 4908     		lsrs	r1, r1, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 1128              		.loc 1 19 33 view .LVU370
 1129 000e 5B08     		lsrs	r3, r3, #1
  19:Component/ringbuffer/ringbuffer.c ****     {
 1130              		.loc 1 19 8 view .LVU371
 1131 0010 9942     		cmp	r1, r3
 1132 0012 45D0     		beq	.L67
 1133              	.LVL76:
  19:Component/ringbuffer/ringbuffer.c ****     {
 1134              		.loc 1 19 8 view .LVU372
 1135              	.LBE135:
 1136              	.LBE137:
 1137              	.LBB138:
ARM GAS  /tmp/ccIXlM3Z.s 			page 29


 1138              	.LBI138:
  79:Component/ringbuffer/ringbuffer.c **** {
 1139              		.loc 1 79 17 is_stmt 1 view .LVU373
 1140              	.LBB139:
  92:Component/ringbuffer/ringbuffer.c **** 
 1141              		.loc 1 92 9 view .LVU374
  92:Component/ringbuffer/ringbuffer.c **** 
 1142              		.loc 1 92 27 is_stmt 0 view .LVU375
 1143 0014 8168     		ldr	r1, [r0, #8]
  92:Component/ringbuffer/ringbuffer.c **** 
 1144              		.loc 1 92 51 view .LVU376
 1145 0016 4368     		ldr	r3, [r0, #4]
  92:Component/ringbuffer/ringbuffer.c **** 
 1146              		.loc 1 92 27 view .LVU377
 1147 0018 4908     		lsrs	r1, r1, #1
 1148              	.LVL77:
  92:Component/ringbuffer/ringbuffer.c **** 
 1149              		.loc 1 92 51 view .LVU378
 1150 001a 5B08     		lsrs	r3, r3, #1
 1151              	.LVL78:
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 1152              		.loc 1 94 9 is_stmt 1 view .LVU379
  94:Component/ringbuffer/ringbuffer.c ****             return wi - ri;
 1153              		.loc 1 94 12 is_stmt 0 view .LVU380
 1154 001c 9942     		cmp	r1, r3
 1155 001e 3CD8     		bhi	.L68
  97:Component/ringbuffer/ringbuffer.c ****     }
 1156              		.loc 1 97 13 is_stmt 1 view .LVU381
  97:Component/ringbuffer/ringbuffer.c ****     }
 1157              		.loc 1 97 24 is_stmt 0 view .LVU382
 1158 0020 C068     		ldr	r0, [r0, #12]
 1159              	.LVL79:
  97:Component/ringbuffer/ringbuffer.c ****     }
 1160              		.loc 1 97 24 view .LVU383
 1161              	.LBE139:
 1162              	.LBE138:
 1163              	.LBE145:
 1164              	.LBE149:
 1165              		.loc 1 233 10 discriminator 1 view .LVU384
 1166 0022 4118     		adds	r1, r0, r1
 1167              	.LVL80:
 1168              		.loc 1 233 10 discriminator 1 view .LVU385
 1169 0024 6D1A     		subs	r5, r5, r1
 1170 0026 ED18     		adds	r5, r5, r3
 1171              	.LVL81:
 1172              	.L58:
 234:Component/ringbuffer/ringbuffer.c **** 
 235:Component/ringbuffer/ringbuffer.c ****     /* no space */
 236:Component/ringbuffer/ringbuffer.c ****     if (size == 0)
 1173              		.loc 1 236 5 is_stmt 1 view .LVU386
 1174              		.loc 1 236 8 is_stmt 0 view .LVU387
 1175 0028 002D     		cmp	r5, #0
 1176 002a 34D0     		beq	.L56
 237:Component/ringbuffer/ringbuffer.c ****         return 0;
 238:Component/ringbuffer/ringbuffer.c **** 
 239:Component/ringbuffer/ringbuffer.c ****     /* drop some data */
 240:Component/ringbuffer/ringbuffer.c ****     if (size < length)
ARM GAS  /tmp/ccIXlM3Z.s 			page 30


 1177              		.loc 1 240 5 is_stmt 1 view .LVU388
 1178              		.loc 1 240 8 is_stmt 0 view .LVU389
 1179 002c 9542     		cmp	r5, r2
 1180 002e 00D9     		bls	.L61
 1181 0030 1500     		movs	r5, r2
 1182              	.L61:
 1183              	.LVL82:
 241:Component/ringbuffer/ringbuffer.c ****         length = size;
 242:Component/ringbuffer/ringbuffer.c **** 
 243:Component/ringbuffer/ringbuffer.c ****     if (self->buffer_size - self->write_index > length)
 1184              		.loc 1 243 5 is_stmt 1 view .LVU390
 1185              		.loc 1 243 13 is_stmt 0 view .LVU391
 1186 0032 E368     		ldr	r3, [r4, #12]
 1187              		.loc 1 243 33 view .LVU392
 1188 0034 A268     		ldr	r2, [r4, #8]
 244:Component/ringbuffer/ringbuffer.c ****     {
 245:Component/ringbuffer/ringbuffer.c ****         /* read_index - write_index = empty space */
 246:Component/ringbuffer/ringbuffer.c ****         memcpy(&self->buffer_ptr[self->write_index], data, length);
 1189              		.loc 1 246 21 view .LVU393
 1190 0036 2068     		ldr	r0, [r4]
 243:Component/ringbuffer/ringbuffer.c ****     {
 1191              		.loc 1 243 33 view .LVU394
 1192 0038 5208     		lsrs	r2, r2, #1
 243:Component/ringbuffer/ringbuffer.c ****     {
 1193              		.loc 1 243 27 view .LVU395
 1194 003a 9B1A     		subs	r3, r3, r2
 243:Component/ringbuffer/ringbuffer.c ****     {
 1195              		.loc 1 243 8 view .LVU396
 1196 003c AB42     		cmp	r3, r5
 1197 003e 38D8     		bhi	.L69
 247:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 248:Component/ringbuffer/ringbuffer.c ****          * length of data in current mirror */
 249:Component/ringbuffer/ringbuffer.c ****         self->write_index += length;
 250:Component/ringbuffer/ringbuffer.c ****         return length;
 251:Component/ringbuffer/ringbuffer.c ****     }
 252:Component/ringbuffer/ringbuffer.c **** 
 253:Component/ringbuffer/ringbuffer.c ****     memcpy(&self->buffer_ptr[self->write_index],
 1198              		.loc 1 253 5 is_stmt 1 view .LVU397
 1199              		.loc 1 253 34 is_stmt 0 view .LVU398
 1200 0040 A168     		ldr	r1, [r4, #8]
 254:Component/ringbuffer/ringbuffer.c ****            &ptr[0],
 255:Component/ringbuffer/ringbuffer.c ****            self->buffer_size - self->write_index);
 1201              		.loc 1 255 16 view .LVU399
 1202 0042 E268     		ldr	r2, [r4, #12]
 1203              		.loc 1 255 36 view .LVU400
 1204 0044 A368     		ldr	r3, [r4, #8]
 253:Component/ringbuffer/ringbuffer.c ****            &ptr[0],
 1205              		.loc 1 253 34 view .LVU401
 1206 0046 4908     		lsrs	r1, r1, #1
 1207              		.loc 1 255 36 view .LVU402
 1208 0048 5B08     		lsrs	r3, r3, #1
 1209              		.loc 1 255 30 view .LVU403
 1210 004a D21A     		subs	r2, r2, r3
 253:Component/ringbuffer/ringbuffer.c ****            &ptr[0],
 1211              		.loc 1 253 12 view .LVU404
 1212 004c 4018     		adds	r0, r0, r1
 253:Component/ringbuffer/ringbuffer.c ****            &ptr[0],
ARM GAS  /tmp/ccIXlM3Z.s 			page 31


 1213              		.loc 1 253 5 view .LVU405
 1214 004e 3100     		movs	r1, r6
 1215 0050 FFF7FEFF 		bl	memcpy
 1216              	.LVL83:
 256:Component/ringbuffer/ringbuffer.c ****     memcpy(&self->buffer_ptr[0],
 1217              		.loc 1 256 5 is_stmt 1 view .LVU406
 257:Component/ringbuffer/ringbuffer.c ****            &ptr[self->buffer_size - self->write_index],
 1218              		.loc 1 257 21 is_stmt 0 view .LVU407
 1219 0054 E368     		ldr	r3, [r4, #12]
 1220              		.loc 1 257 41 view .LVU408
 1221 0056 A168     		ldr	r1, [r4, #8]
 258:Component/ringbuffer/ringbuffer.c ****            length - (self->buffer_size - self->write_index));
 1222              		.loc 1 258 26 view .LVU409
 1223 0058 E268     		ldr	r2, [r4, #12]
 1224              		.loc 1 258 46 view .LVU410
 1225 005a A768     		ldr	r7, [r4, #8]
 257:Component/ringbuffer/ringbuffer.c ****            &ptr[self->buffer_size - self->write_index],
 1226              		.loc 1 257 41 view .LVU411
 1227 005c 4908     		lsrs	r1, r1, #1
 1228              		.loc 1 258 46 view .LVU412
 1229 005e 7F08     		lsrs	r7, r7, #1
 257:Component/ringbuffer/ringbuffer.c ****            &ptr[self->buffer_size - self->write_index],
 1230              		.loc 1 257 35 view .LVU413
 1231 0060 591A     		subs	r1, r3, r1
 1232              		.loc 1 258 40 view .LVU414
 1233 0062 D21B     		subs	r2, r2, r7
 1234              		.loc 1 258 19 view .LVU415
 1235 0064 AA1A     		subs	r2, r5, r2
 257:Component/ringbuffer/ringbuffer.c ****            &ptr[self->buffer_size - self->write_index],
 1236              		.loc 1 257 12 view .LVU416
 1237 0066 7118     		adds	r1, r6, r1
 256:Component/ringbuffer/ringbuffer.c ****     memcpy(&self->buffer_ptr[0],
 1238              		.loc 1 256 5 view .LVU417
 1239 0068 2068     		ldr	r0, [r4]
 1240 006a FFF7FEFF 		bl	memcpy
 1241              	.LVL84:
 259:Component/ringbuffer/ringbuffer.c **** 
 260:Component/ringbuffer/ringbuffer.c ****     /* we are going into the other side of the mirror */
 261:Component/ringbuffer/ringbuffer.c ****     self->write_mirror = ~self->write_mirror;
 1242              		.loc 1 261 5 is_stmt 1 view .LVU418
 1243              		.loc 1 261 26 is_stmt 0 view .LVU419
 1244 006e 0123     		movs	r3, #1
 1245              		.loc 1 261 24 view .LVU420
 1246 0070 1800     		movs	r0, r3
 1247              		.loc 1 261 31 view .LVU421
 1248 0072 A168     		ldr	r1, [r4, #8]
 1249              		.loc 1 261 24 view .LVU422
 1250 0074 A268     		ldr	r2, [r4, #8]
 1251              		.loc 1 261 31 view .LVU423
 1252 0076 C907     		lsls	r1, r1, #31
 1253 0078 C90F     		lsrs	r1, r1, #31
 1254              		.loc 1 261 24 view .LVU424
 1255 007a 8843     		bics	r0, r1
 1256 007c 9A43     		bics	r2, r3
 1257 007e 0243     		orrs	r2, r0
 1258 0080 A260     		str	r2, [r4, #8]
 262:Component/ringbuffer/ringbuffer.c ****     self->write_index = length - (self->buffer_size - self->write_index);
ARM GAS  /tmp/ccIXlM3Z.s 			page 32


 1259              		.loc 1 262 5 is_stmt 1 view .LVU425
 1260              		.loc 1 262 39 is_stmt 0 view .LVU426
 1261 0082 E268     		ldr	r2, [r4, #12]
 1262              		.loc 1 262 59 view .LVU427
 1263 0084 A168     		ldr	r1, [r4, #8]
 1264 0086 4908     		lsrs	r1, r1, #1
 1265              		.loc 1 262 53 view .LVU428
 1266 0088 521A     		subs	r2, r2, r1
 1267              		.loc 1 262 23 view .LVU429
 1268 008a A168     		ldr	r1, [r4, #8]
 1269              		.loc 1 262 32 view .LVU430
 1270 008c AA1A     		subs	r2, r5, r2
 1271              		.loc 1 262 23 view .LVU431
 1272 008e 5200     		lsls	r2, r2, #1
 1273 0090 0B40     		ands	r3, r1
 1274 0092 1343     		orrs	r3, r2
 1275 0094 A360     		str	r3, [r4, #8]
 263:Component/ringbuffer/ringbuffer.c **** 
 264:Component/ringbuffer/ringbuffer.c ****     return length;
 1276              		.loc 1 264 5 is_stmt 1 view .LVU432
 1277              	.LVL85:
 1278              	.L56:
 265:Component/ringbuffer/ringbuffer.c **** }
 1279              		.loc 1 265 1 is_stmt 0 view .LVU433
 1280 0096 2800     		movs	r0, r5
 1281              		@ sp needed
 1282              	.LVL86:
 1283              	.LVL87:
 1284              		.loc 1 265 1 view .LVU434
 1285 0098 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 1286              	.LVL88:
 1287              	.L68:
 1288              	.LBB150:
 1289              	.LBB146:
 1290              	.LBB142:
 1291              	.LBB140:
  95:Component/ringbuffer/ringbuffer.c ****         else
 1292              		.loc 1 95 13 is_stmt 1 view .LVU435
 1293              	.LBE140:
 1294              	.LBE142:
 1295              	.LBE146:
 1296              	.LBE150:
 233:Component/ringbuffer/ringbuffer.c **** 
 1297              		.loc 1 233 10 is_stmt 0 discriminator 1 view .LVU436
 1298 009a 5B1A     		subs	r3, r3, r1
 1299              	.LVL89:
 233:Component/ringbuffer/ringbuffer.c **** 
 1300              		.loc 1 233 10 discriminator 1 view .LVU437
 1301 009c ED18     		adds	r5, r5, r3
 1302              	.LBB151:
 1303              	.LBB147:
 1304              	.LBB143:
 1305              	.LBB141:
  95:Component/ringbuffer/ringbuffer.c ****         else
 1306              		.loc 1 95 23 view .LVU438
 1307 009e C3E7     		b	.L58
 1308              	.LVL90:
ARM GAS  /tmp/ccIXlM3Z.s 			page 33


 1309              	.L67:
  95:Component/ringbuffer/ringbuffer.c ****         else
 1310              		.loc 1 95 23 view .LVU439
 1311              	.LBE141:
 1312              	.LBE143:
 1313              	.LBB144:
 1314              	.LBB136:
 1315              	.LBB133:
 1316              	.LBI133:
  17:Component/ringbuffer/ringbuffer.c **** {
 1317              		.loc 1 17 30 is_stmt 1 view .LVU440
 1318              	.LBB134:
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1319              		.loc 1 21 9 view .LVU441
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1320              		.loc 1 21 17 is_stmt 0 view .LVU442
 1321 00a0 4368     		ldr	r3, [r0, #4]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1322              		.loc 1 21 38 view .LVU443
 1323 00a2 8168     		ldr	r1, [r0, #8]
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1324              		.loc 1 21 17 view .LVU444
 1325 00a4 DB07     		lsls	r3, r3, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1326              		.loc 1 21 38 view .LVU445
 1327 00a6 C907     		lsls	r1, r1, #31
  21:Component/ringbuffer/ringbuffer.c ****             return RINGBUFFER_EMPTY;
 1328              		.loc 1 21 12 view .LVU446
 1329 00a8 9942     		cmp	r1, r3
 1330 00aa BDD0     		beq	.L58
  24:Component/ringbuffer/ringbuffer.c ****     }
 1331              		.loc 1 24 13 is_stmt 1 view .LVU447
 1332              	.LVL91:
  24:Component/ringbuffer/ringbuffer.c ****     }
 1333              		.loc 1 24 13 is_stmt 0 view .LVU448
 1334              	.LBE134:
 1335              	.LBE133:
 1336              	.LBE136:
 1337              	.LBE144:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1338              		.loc 1 88 9 is_stmt 1 view .LVU449
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1339              		.loc 1 88 20 is_stmt 0 view .LVU450
 1340 00ac C368     		ldr	r3, [r0, #12]
 1341              	.LBE147:
 1342              	.LBE151:
 233:Component/ringbuffer/ringbuffer.c **** 
 1343              		.loc 1 233 10 discriminator 1 view .LVU451
 1344 00ae ED1A     		subs	r5, r5, r3
 1345              	.LBB152:
 1346              	.LBB148:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
 1347              		.loc 1 88 20 view .LVU452
 1348 00b0 BAE7     		b	.L58
 1349              	.LVL92:
 1350              	.L69:
  88:Component/ringbuffer/ringbuffer.c ****     case RINGBUFFER_HALFFULL:
ARM GAS  /tmp/ccIXlM3Z.s 			page 34


 1351              		.loc 1 88 20 view .LVU453
 1352              	.LBE148:
 1353              	.LBE152:
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1354              		.loc 1 246 9 is_stmt 1 view .LVU454
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1355              		.loc 1 246 38 is_stmt 0 view .LVU455
 1356 00b2 A368     		ldr	r3, [r4, #8]
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1357              		.loc 1 246 9 view .LVU456
 1358 00b4 2A00     		movs	r2, r5
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1359              		.loc 1 246 38 view .LVU457
 1360 00b6 5B08     		lsrs	r3, r3, #1
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1361              		.loc 1 246 9 view .LVU458
 1362 00b8 3100     		movs	r1, r6
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1363              		.loc 1 246 16 view .LVU459
 1364 00ba C018     		adds	r0, r0, r3
 246:Component/ringbuffer/ringbuffer.c ****         /* this should not cause overflow because there is enough space for
 1365              		.loc 1 246 9 view .LVU460
 1366 00bc FFF7FEFF 		bl	memcpy
 1367              	.LVL93:
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1368              		.loc 1 249 9 is_stmt 1 view .LVU461
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1369              		.loc 1 249 27 is_stmt 0 view .LVU462
 1370 00c0 0122     		movs	r2, #1
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1371              		.loc 1 249 13 view .LVU463
 1372 00c2 A368     		ldr	r3, [r4, #8]
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1373              		.loc 1 249 27 view .LVU464
 1374 00c4 A168     		ldr	r1, [r4, #8]
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1375              		.loc 1 249 13 view .LVU465
 1376 00c6 5B08     		lsrs	r3, r3, #1
 249:Component/ringbuffer/ringbuffer.c ****         return length;
 1377              		.loc 1 249 27 view .LVU466
 1378 00c8 5B19     		adds	r3, r3, r5
 1379 00ca 5B00     		lsls	r3, r3, #1
 1380 00cc 0A40     		ands	r2, r1
 1381 00ce 1343     		orrs	r3, r2
 1382 00d0 A360     		str	r3, [r4, #8]
 250:Component/ringbuffer/ringbuffer.c ****     }
 1383              		.loc 1 250 9 is_stmt 1 view .LVU467
 250:Component/ringbuffer/ringbuffer.c ****     }
 1384              		.loc 1 250 16 is_stmt 0 view .LVU468
 1385 00d2 E0E7     		b	.L56
 1386              		.cfi_endproc
 1387              	.LFE7:
 1389              		.text
 1390              	.Letext0:
 1391              		.file 2 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/machine/_default_types.h"
 1392              		.file 3 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/sys/_stdint.h"
 1393              		.file 4 "Component/ringbuffer/ringbuffer_define.h"
ARM GAS  /tmp/ccIXlM3Z.s 			page 35


 1394              		.file 5 "/home/ha/toolchain/arm-gnu-toolchain-14.3/arm-none-eabi/include/string.h"
 1395              		.file 6 "<built-in>"
ARM GAS  /tmp/ccIXlM3Z.s 			page 36


DEFINED SYMBOLS
                            *ABS*:00000000 ringbuffer.c
     /tmp/ccIXlM3Z.s:17     .text._ringbuffer_status:00000000 $t
     /tmp/ccIXlM3Z.s:24     .text._ringbuffer_status:00000000 _ringbuffer_status
     /tmp/ccIXlM3Z.s:75     .text.ringbuffer_init:00000000 $t
     /tmp/ccIXlM3Z.s:82     .text.ringbuffer_init:00000000 ringbuffer_init
     /tmp/ccIXlM3Z.s:138    .text.ringbuffer_reset:00000000 $t
     /tmp/ccIXlM3Z.s:145    .text.ringbuffer_reset:00000000 ringbuffer_reset
     /tmp/ccIXlM3Z.s:184    .text.ringbuffer_data_len:00000000 $t
     /tmp/ccIXlM3Z.s:191    .text.ringbuffer_data_len:00000000 ringbuffer_data_len
     /tmp/ccIXlM3Z.s:311    .text.ringbuffer_putchar:00000000 $t
     /tmp/ccIXlM3Z.s:318    .text.ringbuffer_putchar:00000000 ringbuffer_putchar
     /tmp/ccIXlM3Z.s:541    .text.ringbuffer_getchar:00000000 $t
     /tmp/ccIXlM3Z.s:548    .text.ringbuffer_getchar:00000000 ringbuffer_getchar
     /tmp/ccIXlM3Z.s:752    .text.ringbuffer_get:00000000 $t
     /tmp/ccIXlM3Z.s:759    .text.ringbuffer_get:00000000 ringbuffer_get
     /tmp/ccIXlM3Z.s:1067   .text.ringbuffer_put:00000000 $t
     /tmp/ccIXlM3Z.s:1074   .text.ringbuffer_put:00000000 ringbuffer_put

UNDEFINED SYMBOLS
memcpy
