1 .cpu arm7tdmi 2 .fpu softvfp 3 .eabi_attribute 20, 1 4 .eabi_attribute 21, 1 5 .eabi_attribute 23, 3 6 .eabi_attribute 24, 1 7 .eabi_attribute 25, 1 8 .eabi_attribute 26, 1 9 .eabi_attribute 30, 4 10 .eabi_attribute 18, 4 11 .file "vsprintf.c" 19 .Ltext0: 20 .cfi_sections .debug_frame 21 .align 2 23 __toupper: 24 .LFB1: 25 .file 1 "include/asm/ctype.h" 1:include/asm/ctype.h **** #ifndef _LINUX_CTYPE_H 2:include/asm/ctype.h **** #define _LINUX_CTYPE_H 3:include/asm/ctype.h **** 4:include/asm/ctype.h **** /* 5:include/asm/ctype.h **** * NOTE! This ctype does not handle EOF like the standard C 6:include/asm/ctype.h **** * library is required to. 7:include/asm/ctype.h **** */ 8:include/asm/ctype.h **** 9:include/asm/ctype.h **** #define _U 0x01 /* upper */ 10:include/asm/ctype.h **** #define _L 0x02 /* lower */ 11:include/asm/ctype.h **** #define _D 0x04 /* digit */ 12:include/asm/ctype.h **** #define _C 0x08 /* cntrl */ 13:include/asm/ctype.h **** #define _P 0x10 /* punct */ 14:include/asm/ctype.h **** #define _S 0x20 /* white space (space/lf/tab) */ 15:include/asm/ctype.h **** #define _X 0x40 /* hex digit */ 16:include/asm/ctype.h **** #define _SP 0x80 /* hard space (0x20) */ 17:include/asm/ctype.h **** 18:include/asm/ctype.h **** extern unsigned char _ctype[]; 19:include/asm/ctype.h **** 20:include/asm/ctype.h **** #define __ismask(x) (_ctype[(int)(unsigned char)(x)]) 21:include/asm/ctype.h **** 22:include/asm/ctype.h **** #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) 23:include/asm/ctype.h **** #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) 24:include/asm/ctype.h **** #define iscntrl(c) ((__ismask(c)&(_C)) != 0) 25:include/asm/ctype.h **** #define isdigit(c) ((__ismask(c)&(_D)) != 0) 26:include/asm/ctype.h **** #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) 27:include/asm/ctype.h **** #define islower(c) ((__ismask(c)&(_L)) != 0) 28:include/asm/ctype.h **** #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) 29:include/asm/ctype.h **** #define ispunct(c) ((__ismask(c)&(_P)) != 0) 30:include/asm/ctype.h **** #define isspace(c) ((__ismask(c)&(_S)) != 0) 31:include/asm/ctype.h **** #define isupper(c) ((__ismask(c)&(_U)) != 0) 32:include/asm/ctype.h **** #define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0) 33:include/asm/ctype.h **** 34:include/asm/ctype.h **** #define isascii(c) (((unsigned char)(c))<=0x7f) 35:include/asm/ctype.h **** #define toascii(c) (((unsigned char)(c))&0x7f) 36:include/asm/ctype.h **** 37:include/asm/ctype.h **** static inline unsigned char __tolower(unsigned char c) 38:include/asm/ctype.h **** { 39:include/asm/ctype.h **** if (isupper(c)) 40:include/asm/ctype.h **** c -= 'A'-'a'; 41:include/asm/ctype.h **** return c; 42:include/asm/ctype.h **** } 43:include/asm/ctype.h **** 44:include/asm/ctype.h **** static inline unsigned char __toupper(unsigned char c) 45:include/asm/ctype.h **** { 26 .loc 1 45 0 27 .cfi_startproc 28 @ Function supports interworking. 29 @ args = 0, pretend = 0, frame = 0 30 @ frame_needed = 0, uses_anonymous_args = 0 31 @ link register save eliminated. 32 .LVL0: 46:include/asm/ctype.h **** if (islower(c)) 33 .loc 1 46 0 34 0000 10309FE5 ldr r3, .L3 35 0004 0030D3E7 ldrb r3, [r3, r0] @ zero_extendqisi2 36 0008 020013E3 tst r3, #2 47:include/asm/ctype.h **** c -= 'a'-'A'; 37 .loc 1 47 0 38 000c 20004012 subne r0, r0, #32 39 .LVL1: 40 0010 FF000012 andne r0, r0, #255 41 .LVL2: 48:include/asm/ctype.h **** return c; 49:include/asm/ctype.h **** } 42 .loc 1 49 0 43 0014 1EFF2FE1 bx lr 44 .L4: 45 .align 2 46 .L3: 47 0018 00000000 .word _ctype 48 .cfi_endproc 49 .LFE1: 51 .align 2 53 skip_atoi: 54 .LFB6: 55 .file 2 "lib/vsprintf.c" 1:lib/vsprintf.c **** /* 2:lib/vsprintf.c **** * linux/lib/vsprintf.c 3:lib/vsprintf.c **** * 4:lib/vsprintf.c **** * Copyright (C) 1991, 1992 Linus Torvalds 5:lib/vsprintf.c **** */ 6:lib/vsprintf.c **** 7:lib/vsprintf.c **** /* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */ 8:lib/vsprintf.c **** /* 9:lib/vsprintf.c **** * Wirzenius wrote this portably, Torvalds fucked it up :-) 10:lib/vsprintf.c **** */ 11:lib/vsprintf.c **** 12:lib/vsprintf.c **** /* 13:lib/vsprintf.c **** * Fri Jul 13 2001 Crutcher Dunnavant 14:lib/vsprintf.c **** * - changed to provide snprintf and vsnprintf functions 15:lib/vsprintf.c **** * So Feb 1 16:51:32 CET 2004 Juergen Quade 16:lib/vsprintf.c **** * - scnprintf and vscnprintf 17:lib/vsprintf.c **** */ 18:lib/vsprintf.c **** 19:lib/vsprintf.c **** #include 20:lib/vsprintf.c **** #include 21:lib/vsprintf.c **** #include 22:lib/vsprintf.c **** #include 23:lib/vsprintf.c **** 24:lib/vsprintf.c **** #include 25:lib/vsprintf.c **** #include 26:lib/vsprintf.c **** 27:lib/vsprintf.c **** /** 28:lib/vsprintf.c **** * simple_strtoul - convert a string to an unsigned long 29:lib/vsprintf.c **** * @cp: The start of the string 30:lib/vsprintf.c **** * @endp: A pointer to the end of the parsed string will be placed here 31:lib/vsprintf.c **** * @base: The number base to use 32:lib/vsprintf.c **** */ 33:lib/vsprintf.c **** unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base) 34:lib/vsprintf.c **** { 35:lib/vsprintf.c **** unsigned long result = 0,value; 36:lib/vsprintf.c **** 37:lib/vsprintf.c **** if (!base) { 38:lib/vsprintf.c **** base = 10; 39:lib/vsprintf.c **** if (*cp == '0') { 40:lib/vsprintf.c **** base = 8; 41:lib/vsprintf.c **** cp++; 42:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 43:lib/vsprintf.c **** cp++; 44:lib/vsprintf.c **** base = 16; 45:lib/vsprintf.c **** } 46:lib/vsprintf.c **** } 47:lib/vsprintf.c **** } else if (base == 16) { 48:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 49:lib/vsprintf.c **** cp += 2; 50:lib/vsprintf.c **** } 51:lib/vsprintf.c **** while (isxdigit(*cp) && 52:lib/vsprintf.c **** (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { 53:lib/vsprintf.c **** result = result*base + value; 54:lib/vsprintf.c **** cp++; 55:lib/vsprintf.c **** } 56:lib/vsprintf.c **** if (endp) 57:lib/vsprintf.c **** *endp = (char *)cp; 58:lib/vsprintf.c **** return result; 59:lib/vsprintf.c **** } 60:lib/vsprintf.c **** 61:lib/vsprintf.c **** 62:lib/vsprintf.c **** /** 63:lib/vsprintf.c **** * simple_strtol - convert a string to a signed long 64:lib/vsprintf.c **** * @cp: The start of the string 65:lib/vsprintf.c **** * @endp: A pointer to the end of the parsed string will be placed here 66:lib/vsprintf.c **** * @base: The number base to use 67:lib/vsprintf.c **** */ 68:lib/vsprintf.c **** long simple_strtol(const char *cp,char **endp,unsigned int base) 69:lib/vsprintf.c **** { 70:lib/vsprintf.c **** if(*cp=='-') 71:lib/vsprintf.c **** return -simple_strtoul(cp+1,endp,base); 72:lib/vsprintf.c **** return simple_strtoul(cp,endp,base); 73:lib/vsprintf.c **** } 74:lib/vsprintf.c **** 75:lib/vsprintf.c **** 76:lib/vsprintf.c **** /** 77:lib/vsprintf.c **** * simple_strtoull - convert a string to an unsigned long long 78:lib/vsprintf.c **** * @cp: The start of the string 79:lib/vsprintf.c **** * @endp: A pointer to the end of the parsed string will be placed here 80:lib/vsprintf.c **** * @base: The number base to use 81:lib/vsprintf.c **** */ 82:lib/vsprintf.c **** unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base) 83:lib/vsprintf.c **** { 84:lib/vsprintf.c **** unsigned long long result = 0,value; 85:lib/vsprintf.c **** 86:lib/vsprintf.c **** if (!base) { 87:lib/vsprintf.c **** base = 10; 88:lib/vsprintf.c **** if (*cp == '0') { 89:lib/vsprintf.c **** base = 8; 90:lib/vsprintf.c **** cp++; 91:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 92:lib/vsprintf.c **** cp++; 93:lib/vsprintf.c **** base = 16; 94:lib/vsprintf.c **** } 95:lib/vsprintf.c **** } 96:lib/vsprintf.c **** } else if (base == 16) { 97:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 98:lib/vsprintf.c **** cp += 2; 99:lib/vsprintf.c **** } 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 101:lib/vsprintf.c **** ? toupper(*cp) : *cp)-'A'+10) < base) { 102:lib/vsprintf.c **** result = result*base + value; 103:lib/vsprintf.c **** cp++; 104:lib/vsprintf.c **** } 105:lib/vsprintf.c **** if (endp) 106:lib/vsprintf.c **** *endp = (char *)cp; 107:lib/vsprintf.c **** return result; 108:lib/vsprintf.c **** } 109:lib/vsprintf.c **** 110:lib/vsprintf.c **** 111:lib/vsprintf.c **** /** 112:lib/vsprintf.c **** * simple_strtoll - convert a string to a signed long long 113:lib/vsprintf.c **** * @cp: The start of the string 114:lib/vsprintf.c **** * @endp: A pointer to the end of the parsed string will be placed here 115:lib/vsprintf.c **** * @base: The number base to use 116:lib/vsprintf.c **** */ 117:lib/vsprintf.c **** long long simple_strtoll(const char *cp,char **endp,unsigned int base) 118:lib/vsprintf.c **** { 119:lib/vsprintf.c **** if(*cp=='-') 120:lib/vsprintf.c **** return -simple_strtoull(cp+1,endp,base); 121:lib/vsprintf.c **** return simple_strtoull(cp,endp,base); 122:lib/vsprintf.c **** } 123:lib/vsprintf.c **** 124:lib/vsprintf.c **** static int skip_atoi(const char **s) 125:lib/vsprintf.c **** { 56 .loc 2 125 0 57 .cfi_startproc 58 @ Function supports interworking. 59 @ args = 0, pretend = 0, frame = 0 60 @ frame_needed = 0, uses_anonymous_args = 0 61 @ link register save eliminated. 62 .LVL3: 126:lib/vsprintf.c **** int i=0; 63 .loc 2 126 0 64 001c 0030A0E3 mov r3, #0 127:lib/vsprintf.c **** 128:lib/vsprintf.c **** while (isdigit(**s)) 65 .loc 2 128 0 66 0020 040000EA b .L6 67 .LVL4: 68 .L7: 129:lib/vsprintf.c **** i = i*10 + *((*s)++) - '0'; 69 .loc 2 129 0 70 0024 302042E2 sub r2, r2, #48 71 0028 0AC0A0E3 mov ip, #10 72 002c 9C2323E0 mla r3, ip, r3, r2 73 .LVL5: 74 0030 011081E2 add r1, r1, #1 75 0034 001080E5 str r1, [r0, #0] 76 .LVL6: 77 .L6: 128:lib/vsprintf.c **** while (isdigit(**s)) 78 .loc 2 128 0 discriminator 1 79 0038 001090E5 ldr r1, [r0, #0] 80 003c 14C09FE5 ldr ip, .L8 81 0040 0020D1E5 ldrb r2, [r1, #0] @ zero_extendqisi2 82 0044 02C0DCE7 ldrb ip, [ip, r2] @ zero_extendqisi2 83 0048 04001CE3 tst ip, #4 84 004c F4FFFF1A bne .L7 130:lib/vsprintf.c **** return i; 131:lib/vsprintf.c **** } 85 .loc 2 131 0 86 0050 0300A0E1 mov r0, r3 87 .LVL7: 88 0054 1EFF2FE1 bx lr 89 .L9: 90 .align 2 91 .L8: 92 0058 00000000 .word _ctype 93 .cfi_endproc 94 .LFE6: 96 .align 2 98 number: 99 .LFB7: 132:lib/vsprintf.c **** 133:lib/vsprintf.c **** #define ZEROPAD 1 /* pad with zero */ 134:lib/vsprintf.c **** #define SIGN 2 /* unsigned/signed long */ 135:lib/vsprintf.c **** #define PLUS 4 /* show plus */ 136:lib/vsprintf.c **** #define SPACE 8 /* space if plus */ 137:lib/vsprintf.c **** #define LEFT 16 /* left justified */ 138:lib/vsprintf.c **** #define SPECIAL 32 /* 0x */ 139:lib/vsprintf.c **** #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ 140:lib/vsprintf.c **** 141:lib/vsprintf.c **** static char * number(char * buf, char * end, unsigned long long num, int base, int size, int precis 142:lib/vsprintf.c **** { 100 .loc 2 142 0 101 .cfi_startproc 102 @ Function supports interworking. 103 @ args = 16, pretend = 0, frame = 88 104 @ frame_needed = 0, uses_anonymous_args = 0 105 .LVL8: 106 005c F04F2DE9 stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 107 .LCFI0: 108 .cfi_def_cfa_offset 36 109 0060 5CD04DE2 sub sp, sp, #92 110 .LCFI1: 111 .cfi_def_cfa_offset 128 112 .loc 2 142 0 113 0064 8C709DE5 ldr r7, [sp, #140] 114 .cfi_offset 14, -4 115 .cfi_offset 11, -8 116 .cfi_offset 10, -12 117 .cfi_offset 9, -16 118 .cfi_offset 8, -20 119 .cfi_offset 7, -24 120 .cfi_offset 6, -28 121 .cfi_offset 5, -32 122 .cfi_offset 4, -36 123 0068 01A0A0E1 mov sl, r1 143:lib/vsprintf.c **** char c,sign,tmp[66]; 144:lib/vsprintf.c **** const char *digits; 145:lib/vsprintf.c **** static const char small_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; 146:lib/vsprintf.c **** static const char large_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 147:lib/vsprintf.c **** int i; 148:lib/vsprintf.c **** 149:lib/vsprintf.c **** digits = (type & LARGE) ? large_digits : small_digits; 124 .loc 2 149 0 125 006c 30129FE5 ldr r1, .L51 126 .LVL9: 127 0070 400017E3 tst r7, #64 142:lib/vsprintf.c **** { 128 .loc 2 142 0 129 0074 0050A0E1 mov r5, r0 130 0078 80B09DE5 ldr fp, [sp, #128] 131 .loc 2 149 0 132 007c 250081E2 add r0, r1, #37 133 .LVL10: 134 0080 0010A001 moveq r1, r0 135 0084 04108DE5 str r1, [sp, #4] 136 .LVL11: 150:lib/vsprintf.c **** if (type & LEFT) 137 .loc 2 150 0 138 0088 100017E3 tst r7, #16 151:lib/vsprintf.c **** type &= ~ZEROPAD; 152:lib/vsprintf.c **** if (base < 2 || base > 36) 139 .loc 2 152 0 140 008c 02104BE2 sub r1, fp, #2 141 .LVL12: 151:lib/vsprintf.c **** type &= ~ZEROPAD; 142 .loc 2 151 0 143 0090 0170C713 bicne r7, r7, #1 144 .LVL13: 145 .loc 2 152 0 146 0094 220051E3 cmp r1, #34 142:lib/vsprintf.c **** { 147 .loc 2 142 0 148 0098 84609DE5 ldr r6, [sp, #132] 149 .loc 2 152 0 150 009c 7B00008A bhi .L47 153:lib/vsprintf.c **** return NULL; 154:lib/vsprintf.c **** c = (type & ZEROPAD) ? '0' : ' '; 151 .loc 2 154 0 152 00a0 010017E3 tst r7, #1 153 00a4 2000A003 moveq r0, #32 154 00a8 3000A013 movne r0, #48 155:lib/vsprintf.c **** sign = 0; 156:lib/vsprintf.c **** if (type & SIGN) { 155 .loc 2 156 0 156 00ac 029017E2 ands r9, r7, #2 154:lib/vsprintf.c **** c = (type & ZEROPAD) ? '0' : ' '; 157 .loc 2 154 0 158 00b0 08008DE5 str r0, [sp, #8] 159 .LVL14: 160 .loc 2 156 0 161 00b4 0E00000A beq .L15 157:lib/vsprintf.c **** if ((signed long long) num < 0) { 162 .loc 2 157 0 163 00b8 000052E3 cmp r2, #0 164 00bc 0010D3E2 sbcs r1, r3, #0 165 00c0 040000AA bge .L16 166 .LVL15: 158:lib/vsprintf.c **** sign = '-'; 159:lib/vsprintf.c **** num = - (signed long long) num; 167 .loc 2 159 0 168 00c4 002072E2 rsbs r2, r2, #0 169 00c8 0030E3E2 rsc r3, r3, #0 170 .LVL16: 160:lib/vsprintf.c **** size--; 171 .loc 2 160 0 172 00cc 016046E2 sub r6, r6, #1 173 .LVL17: 158:lib/vsprintf.c **** sign = '-'; 174 .loc 2 158 0 175 00d0 2D90A0E3 mov r9, #45 176 00d4 060000EA b .L15 177 .LVL18: 178 .L16: 161:lib/vsprintf.c **** } else if (type & PLUS) { 179 .loc 2 161 0 180 00d8 040017E3 tst r7, #4 162:lib/vsprintf.c **** sign = '+'; 163:lib/vsprintf.c **** size--; 181 .loc 2 163 0 182 00dc 01604612 subne r6, r6, #1 183 .LVL19: 162:lib/vsprintf.c **** sign = '+'; 184 .loc 2 162 0 185 00e0 2B90A013 movne r9, #43 161:lib/vsprintf.c **** } else if (type & PLUS) { 186 .loc 2 161 0 187 00e4 0200001A bne .L15 164:lib/vsprintf.c **** } else if (type & SPACE) { 188 .loc 2 164 0 189 00e8 089017E2 ands r9, r7, #8 190 .LVL20: 165:lib/vsprintf.c **** sign = ' '; 166:lib/vsprintf.c **** size--; 191 .loc 2 166 0 192 00ec 01604612 subne r6, r6, #1 193 .LVL21: 165:lib/vsprintf.c **** sign = ' '; 194 .loc 2 165 0 195 00f0 2090A013 movne r9, #32 196 .LVL22: 197 .L15: 167:lib/vsprintf.c **** } 168:lib/vsprintf.c **** } 169:lib/vsprintf.c **** if (type & SPECIAL) { 198 .loc 2 169 0 199 00f4 20C017E2 ands ip, r7, #32 200 00f8 0CC08DE5 str ip, [sp, #12] 201 00fc 0400000A beq .L18 170:lib/vsprintf.c **** if (base == 16) 202 .loc 2 170 0 203 0100 10005BE3 cmp fp, #16 171:lib/vsprintf.c **** size -= 2; 204 .loc 2 171 0 205 0104 02604602 subeq r6, r6, #2 206 .LVL23: 170:lib/vsprintf.c **** if (base == 16) 207 .loc 2 170 0 208 0108 0100000A beq .L18 172:lib/vsprintf.c **** else if (base == 8) 209 .loc 2 172 0 210 010c 08005BE3 cmp fp, #8 173:lib/vsprintf.c **** size--; 211 .loc 2 173 0 212 0110 01604602 subeq r6, r6, #1 213 .LVL24: 214 .L18: 174:lib/vsprintf.c **** } 175:lib/vsprintf.c **** i = 0; 176:lib/vsprintf.c **** if (num == 0) 215 .loc 2 176 0 216 0114 030092E1 orrs r0, r2, r3 177:lib/vsprintf.c **** tmp[i++]='0'; 217 .loc 2 177 0 218 0118 3030A003 moveq r3, #48 219 011c 1430CD05 streqb r3, [sp, #20] 220 .LVL25: 221 0120 0180A003 moveq r8, #1 176:lib/vsprintf.c **** if (num == 0) 222 .loc 2 176 0 223 0124 0B00000A beq .L21 224 0128 0080A0E3 mov r8, #0 225 .LVL26: 226 .L22: 227 .LBB2: 178:lib/vsprintf.c **** else while (num != 0) 179:lib/vsprintf.c **** tmp[i++] = digits[do_div(num,base)]; 228 .loc 2 179 0 229 012c 0200A0E1 mov r0, r2 230 .LVL27: 231 0130 0B40A0E1 mov r4, fp 232 .LVL28: 233 0134 0310A0E1 mov r1, r3 234 @ 179 "lib/vsprintf.c" 1 235 .ifnc r1,r1 ; .err ; .endif 236 .ifnc r2,r2 ; .err ; .endif 237 .ifnc r0,r0 ; .err ; .endif 238 .ifnc r4,r4 ; .err ; .endif 239 0138 FEFFFFEB bl __do_div64 240 @ 0 "" 2 241 .LVL29: 242 .LBE2: 243 013c 04C09DE5 ldr ip, [sp, #4] 244 0140 0100DCE7 ldrb r0, [ip, r1] @ zero_extendqisi2 245 .LVL30: 246 0144 14108DE2 add r1, sp, #20 247 .LVL31: 248 0148 0800C1E7 strb r0, [r1, r8] 178:lib/vsprintf.c **** else while (num != 0) 249 .loc 2 178 0 250 014c 030092E1 orrs r0, r2, r3 251 .loc 2 179 0 252 0150 018088E2 add r8, r8, #1 253 .LVL32: 178:lib/vsprintf.c **** else while (num != 0) 254 .loc 2 178 0 255 0154 F4FFFF1A bne .L22 256 .LVL33: 257 .L21: 258 0158 88309DE5 ldr r3, [sp, #136] 259 015c 030058E1 cmp r8, r3 260 0160 0830A0A1 movge r3, r8 261 0164 0330A0B1 movlt r3, r3 262 .LVL34: 180:lib/vsprintf.c **** if (i > precision) 181:lib/vsprintf.c **** precision = i; 182:lib/vsprintf.c **** size -= precision; 183:lib/vsprintf.c **** if (!(type&(ZEROPAD+LEFT))) { 263 .loc 2 183 0 264 0168 110017E3 tst r7, #17 182:lib/vsprintf.c **** size -= precision; 265 .loc 2 182 0 266 016c 066063E0 rsb r6, r3, r6 267 .LVL35: 268 .loc 2 183 0 269 0170 0800001A bne .L23 270 0174 030000EA b .L24 271 .LVL36: 272 .L26: 184:lib/vsprintf.c **** while(size-->0) { 185:lib/vsprintf.c **** if (buf <= end) 273 .loc 2 185 0 274 0178 0A0055E1 cmp r5, sl 186:lib/vsprintf.c **** *buf = ' '; 275 .loc 2 186 0 276 017c 2020A093 movls r2, #32 277 0180 0020C595 strlsb r2, [r5, #0] 187:lib/vsprintf.c **** ++buf; 278 .loc 2 187 0 279 0184 015085E2 add r5, r5, #1 280 .LVL37: 281 .L24: 184:lib/vsprintf.c **** while(size-->0) { 282 .loc 2 184 0 discriminator 1 283 0188 016046E2 sub r6, r6, #1 284 .LVL38: 141:lib/vsprintf.c **** static char * number(char * buf, char * end, unsigned long long num, int base, int size, int precis 285 .loc 2 141 0 discriminator 1 286 018c 012086E2 add r2, r6, #1 184:lib/vsprintf.c **** while(size-->0) { 287 .loc 2 184 0 discriminator 1 288 0190 000052E3 cmp r2, #0 289 0194 F7FFFFCA bgt .L26 290 .L23: 188:lib/vsprintf.c **** } 189:lib/vsprintf.c **** } 190:lib/vsprintf.c **** if (sign) { 291 .loc 2 190 0 292 0198 000059E3 cmp r9, #0 293 019c 0200000A beq .L27 191:lib/vsprintf.c **** if (buf <= end) 294 .loc 2 191 0 295 01a0 0A0055E1 cmp r5, sl 192:lib/vsprintf.c **** *buf = sign; 296 .loc 2 192 0 297 01a4 0090C595 strlsb r9, [r5, #0] 193:lib/vsprintf.c **** ++buf; 298 .loc 2 193 0 299 01a8 015085E2 add r5, r5, #1 300 .LVL39: 301 .L27: 194:lib/vsprintf.c **** } 195:lib/vsprintf.c **** if (type & SPECIAL) { 302 .loc 2 195 0 303 01ac 0C109DE5 ldr r1, [sp, #12] 304 01b0 000051E3 cmp r1, #0 305 01b4 1100000A beq .L29 196:lib/vsprintf.c **** if (base==8) { 306 .loc 2 196 0 307 01b8 08005BE3 cmp fp, #8 308 01bc 0400001A bne .L30 197:lib/vsprintf.c **** if (buf <= end) 309 .loc 2 197 0 310 01c0 0A0055E1 cmp r5, sl 198:lib/vsprintf.c **** *buf = '0'; 311 .loc 2 198 0 312 01c4 3020A093 movls r2, #48 313 01c8 0020C595 strlsb r2, [r5, #0] 199:lib/vsprintf.c **** ++buf; 314 .loc 2 199 0 315 01cc 015085E2 add r5, r5, #1 316 .LVL40: 317 01d0 0A0000EA b .L29 318 .L30: 200:lib/vsprintf.c **** } else if (base==16) { 319 .loc 2 200 0 320 01d4 10005BE3 cmp fp, #16 321 01d8 0800001A bne .L29 201:lib/vsprintf.c **** if (buf <= end) 322 .loc 2 201 0 323 01dc 0A0055E1 cmp r5, sl 202:lib/vsprintf.c **** *buf = '0'; 324 .loc 2 202 0 325 01e0 3020A093 movls r2, #48 326 01e4 0020C595 strlsb r2, [r5, #0] 203:lib/vsprintf.c **** ++buf; 327 .loc 2 203 0 328 01e8 012085E2 add r2, r5, #1 329 .LVL41: 204:lib/vsprintf.c **** if (buf <= end) 330 .loc 2 204 0 331 01ec 0A0052E1 cmp r2, sl 205:lib/vsprintf.c **** *buf = digits[33]; 332 .loc 2 205 0 333 01f0 04C09D95 ldrls ip, [sp, #4] 334 01f4 2110DC95 ldrlsb r1, [ip, #33] @ zero_extendqisi2 335 01f8 0110C595 strlsb r1, [r5, #1] 206:lib/vsprintf.c **** ++buf; 336 .loc 2 206 0 337 01fc 015082E2 add r5, r2, #1 338 .LVL42: 339 .L29: 207:lib/vsprintf.c **** } 208:lib/vsprintf.c **** } 209:lib/vsprintf.c **** if (!(type & LEFT)) { 340 .loc 2 209 0 341 0200 100017E3 tst r7, #16 342 0204 0E00001A bne .L38 343 0208 030000EA b .L35 344 .L37: 210:lib/vsprintf.c **** while (size-- > 0) { 211:lib/vsprintf.c **** if (buf <= end) 345 .loc 2 211 0 346 020c 0A0055E1 cmp r5, sl 212:lib/vsprintf.c **** *buf = c; 347 .loc 2 212 0 348 0210 08009D95 ldrls r0, [sp, #8] 349 0214 0000C595 strlsb r0, [r5, #0] 213:lib/vsprintf.c **** ++buf; 350 .loc 2 213 0 351 0218 015085E2 add r5, r5, #1 352 .LVL43: 353 .L35: 210:lib/vsprintf.c **** while (size-- > 0) { 354 .loc 2 210 0 discriminator 1 355 021c 016046E2 sub r6, r6, #1 356 .LVL44: 141:lib/vsprintf.c **** static char * number(char * buf, char * end, unsigned long long num, int base, int size, int precis 357 .loc 2 141 0 discriminator 1 358 0220 012086E2 add r2, r6, #1 210:lib/vsprintf.c **** while (size-- > 0) { 359 .loc 2 210 0 discriminator 1 360 0224 000052E3 cmp r2, #0 361 0228 F7FFFFCA bgt .L37 362 022c 040000EA b .L38 363 .LVL45: 364 .L40: 214:lib/vsprintf.c **** } 215:lib/vsprintf.c **** } 216:lib/vsprintf.c **** while (i < precision--) { 217:lib/vsprintf.c **** if (buf <= end) 365 .loc 2 217 0 366 0230 0A0055E1 cmp r5, sl 218:lib/vsprintf.c **** *buf = '0'; 367 .loc 2 218 0 368 0234 3020A093 movls r2, #48 369 0238 0020C595 strlsb r2, [r5, #0] 219:lib/vsprintf.c **** ++buf; 370 .loc 2 219 0 371 023c 013043E2 sub r3, r3, #1 372 0240 015085E2 add r5, r5, #1 373 .LVL46: 374 .L38: 216:lib/vsprintf.c **** while (i < precision--) { 375 .loc 2 216 0 discriminator 1 376 0244 030058E1 cmp r8, r3 377 0248 F8FFFFBA blt .L40 378 .LVL47: 379 .L42: 220:lib/vsprintf.c **** } 221:lib/vsprintf.c **** while (i-- > 0) { 222:lib/vsprintf.c **** if (buf <= end) 380 .loc 2 222 0 381 024c 0A0055E1 cmp r5, sl 223:lib/vsprintf.c **** *buf = tmp[i]; 382 .loc 2 223 0 383 0250 14308D92 addls r3, sp, #20 221:lib/vsprintf.c **** while (i-- > 0) { 384 .loc 2 221 0 385 0254 018048E2 sub r8, r8, #1 386 .loc 2 223 0 387 0258 0830D397 ldrlsb r3, [r3, r8] @ zero_extendqisi2 388 025c 0030C595 strlsb r3, [r5, #0] 221:lib/vsprintf.c **** while (i-- > 0) { 389 .loc 2 221 0 390 0260 000058E3 cmp r8, #0 224:lib/vsprintf.c **** ++buf; 391 .loc 2 224 0 392 0264 015085E2 add r5, r5, #1 393 .LVL48: 221:lib/vsprintf.c **** while (i-- > 0) { 394 .loc 2 221 0 395 0268 F7FFFFCA bgt .L42 396 026c 040000EA b .L43 397 .LVL49: 398 .L45: 225:lib/vsprintf.c **** } 226:lib/vsprintf.c **** while (size-- > 0) { 227:lib/vsprintf.c **** if (buf <= end) 399 .loc 2 227 0 400 0270 0A0055E1 cmp r5, sl 228:lib/vsprintf.c **** *buf = ' '; 401 .loc 2 228 0 402 0274 2030A093 movls r3, #32 403 0278 0030C595 strlsb r3, [r5, #0] 229:lib/vsprintf.c **** ++buf; 404 .loc 2 229 0 405 027c 016046E2 sub r6, r6, #1 406 0280 015085E2 add r5, r5, #1 407 .LVL50: 408 .L43: 226:lib/vsprintf.c **** while (size-- > 0) { 409 .loc 2 226 0 discriminator 1 410 0284 000056E3 cmp r6, #0 411 0288 F8FFFFCA bgt .L45 412 028c 000000EA b .L13 413 .LVL51: 414 .L47: 153:lib/vsprintf.c **** return NULL; 415 .loc 2 153 0 416 0290 0050A0E3 mov r5, #0 417 .LVL52: 418 .L13: 230:lib/vsprintf.c **** } 231:lib/vsprintf.c **** return buf; 232:lib/vsprintf.c **** } 419 .loc 2 232 0 420 0294 0500A0E1 mov r0, r5 421 0298 5CD08DE2 add sp, sp, #92 422 029c F04FBDE8 ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 423 02a0 1EFF2FE1 bx lr 424 .L52: 425 .align 2 426 .L51: 427 02a4 00000000 .word .LANCHOR0 428 .cfi_endproc 429 .LFE7: 431 .align 2 432 .global simple_strtoul 434 simple_strtoul: 435 .LFB2: 34:lib/vsprintf.c **** { 436 .loc 2 34 0 437 .cfi_startproc 438 @ Function supports interworking. 439 @ args = 0, pretend = 0, frame = 0 440 @ frame_needed = 0, uses_anonymous_args = 0 441 .LVL53: 442 02a8 F0412DE9 stmfd sp!, {r4, r5, r6, r7, r8, lr} 443 .LCFI2: 444 .cfi_def_cfa_offset 24 37:lib/vsprintf.c **** if (!base) { 445 .loc 2 37 0 446 02ac 006052E2 subs r6, r2, #0 447 .cfi_offset 14, -4 448 .cfi_offset 8, -8 449 .cfi_offset 7, -12 450 .cfi_offset 6, -16 451 .cfi_offset 5, -20 452 .cfi_offset 4, -24 34:lib/vsprintf.c **** { 453 .loc 2 34 0 454 02b0 0040A0E1 mov r4, r0 455 02b4 0150A0E1 mov r5, r1 37:lib/vsprintf.c **** if (!base) { 456 .loc 2 37 0 457 02b8 1100001A bne .L54 458 .LVL54: 39:lib/vsprintf.c **** if (*cp == '0') { 459 .loc 2 39 0 460 02bc 0030D0E5 ldrb r3, [r0, #0] @ zero_extendqisi2 461 02c0 300053E3 cmp r3, #48 38:lib/vsprintf.c **** base = 10; 462 .loc 2 38 0 463 02c4 0A60A013 movne r6, #10 39:lib/vsprintf.c **** if (*cp == '0') { 464 .loc 2 39 0 465 02c8 1600001A bne .L55 466 .LVL55: 42:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 467 .loc 2 42 0 468 02cc 0100F4E5 ldrb r0, [r4, #1]! @ zero_extendqisi2 469 .LVL56: 470 02d0 4AFFFFEB bl __toupper 471 .LVL57: 472 02d4 580050E3 cmp r0, #88 40:lib/vsprintf.c **** base = 8; 473 .loc 2 40 0 474 02d8 0860A013 movne r6, #8 42:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 475 .loc 2 42 0 476 02dc 1100001A bne .L55 42:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 477 .loc 2 42 0 is_stmt 0 discriminator 1 478 02e0 0130D4E5 ldrb r3, [r4, #1] @ zero_extendqisi2 479 02e4 90209FE5 ldr r2, .L65 480 02e8 0330D2E7 ldrb r3, [r2, r3] @ zero_extendqisi2 481 02ec 443003E2 and r3, r3, #68 482 02f0 000053E3 cmp r3, #0 40:lib/vsprintf.c **** base = 8; 483 .loc 2 40 0 is_stmt 1 discriminator 1 484 02f4 1060A013 movne r6, #16 485 02f8 0860A003 moveq r6, #8 486 02fc 01408412 addne r4, r4, #1 487 .LVL58: 488 0300 080000EA b .L55 489 .LVL59: 490 .L54: 47:lib/vsprintf.c **** } else if (base == 16) { 491 .loc 2 47 0 492 0304 100056E3 cmp r6, #16 493 0308 0600001A bne .L55 48:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 494 .loc 2 48 0 495 030c 0030D0E5 ldrb r3, [r0, #0] @ zero_extendqisi2 496 0310 300053E3 cmp r3, #48 497 0314 0300001A bne .L55 48:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 498 .loc 2 48 0 is_stmt 0 discriminator 1 499 0318 0100D0E5 ldrb r0, [r0, #1] @ zero_extendqisi2 500 .LVL60: 501 031c 37FFFFEB bl __toupper 502 .LVL61: 503 0320 580050E3 cmp r0, #88 49:lib/vsprintf.c **** cp += 2; 504 .loc 2 49 0 is_stmt 1 discriminator 1 505 0324 02408402 addeq r4, r4, #2 506 .LVL62: 507 .L55: 38:lib/vsprintf.c **** base = 10; 508 .loc 2 38 0 discriminator 1 509 0328 0070A0E3 mov r7, #0 510 032c 000000EA b .L56 511 .LVL63: 512 .L60: 53:lib/vsprintf.c **** result = result*base + value; 513 .loc 2 53 0 514 0330 960727E0 mla r7, r6, r7, r0 515 .LVL64: 516 .L56: 53:lib/vsprintf.c **** result = result*base + value; 517 .loc 2 53 0 is_stmt 0 discriminator 1 518 0334 0480A0E1 mov r8, r4 519 .LVL65: 51:lib/vsprintf.c **** while (isxdigit(*cp) && 520 .loc 2 51 0 is_stmt 1 discriminator 1 521 0338 3C309FE5 ldr r3, .L65 522 033c 0100D4E4 ldrb r0, [r4], #1 @ zero_extendqisi2 523 .LVL66: 524 0340 0030D3E7 ldrb r3, [r3, r0] @ zero_extendqisi2 525 0344 440013E3 tst r3, #68 526 0348 0600000A beq .L57 52:lib/vsprintf.c **** (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { 527 .loc 2 52 0 528 034c 040013E3 tst r3, #4 529 0350 30004012 subne r0, r0, #48 530 0354 0100001A bne .L59 52:lib/vsprintf.c **** (value = isdigit(*cp) ? *cp-'0' : toupper(*cp)-'A'+10) < base) { 531 .loc 2 52 0 is_stmt 0 discriminator 2 532 0358 28FFFFEB bl __toupper 533 035c 370040E2 sub r0, r0, #55 534 .L59: 535 .LVL67: 51:lib/vsprintf.c **** while (isxdigit(*cp) && 536 .loc 2 51 0 is_stmt 1 discriminator 3 537 0360 060050E1 cmp r0, r6 538 0364 F1FFFF3A bcc .L60 539 .LVL68: 540 .L57: 56:lib/vsprintf.c **** if (endp) 541 .loc 2 56 0 542 0368 000055E3 cmp r5, #0 57:lib/vsprintf.c **** *endp = (char *)cp; 543 .loc 2 57 0 544 036c 00808515 strne r8, [r5, #0] 59:lib/vsprintf.c **** } 545 .loc 2 59 0 546 0370 0700A0E1 mov r0, r7 547 0374 F041BDE8 ldmfd sp!, {r4, r5, r6, r7, r8, lr} 548 0378 1EFF2FE1 bx lr 549 .L66: 550 .align 2 551 .L65: 552 037c 00000000 .word _ctype 553 .cfi_endproc 554 .LFE2: 556 .align 2 557 .global simple_strtol 559 simple_strtol: 560 .LFB3: 69:lib/vsprintf.c **** { 561 .loc 2 69 0 562 .cfi_startproc 563 @ Function supports interworking. 564 @ args = 0, pretend = 0, frame = 0 565 @ frame_needed = 0, uses_anonymous_args = 0 566 .LVL69: 567 0380 10402DE9 stmfd sp!, {r4, lr} 568 .LCFI3: 569 .cfi_def_cfa_offset 8 70:lib/vsprintf.c **** if(*cp=='-') 570 .loc 2 70 0 571 0384 00C0D0E5 ldrb ip, [r0, #0] @ zero_extendqisi2 572 0388 2D005CE3 cmp ip, #45 573 038c 0400001A bne .L68 574 .cfi_offset 14, -4 575 .cfi_offset 4, -8 71:lib/vsprintf.c **** return -simple_strtoul(cp+1,endp,base); 576 .loc 2 71 0 577 0390 010080E2 add r0, r0, #1 578 .LVL70: 579 0394 FEFFFFEB bl simple_strtoul 580 .LVL71: 73:lib/vsprintf.c **** } 581 .loc 2 73 0 582 0398 000060E2 rsb r0, r0, #0 583 039c 1040BDE8 ldmfd sp!, {r4, lr} 584 03a0 1EFF2FE1 bx lr 585 .LVL72: 586 .L68: 587 03a4 1040BDE8 ldmfd sp!, {r4, lr} 72:lib/vsprintf.c **** return simple_strtoul(cp,endp,base); 588 .loc 2 72 0 589 03a8 FEFFFFEA b simple_strtoul 590 .cfi_endproc 591 .LFE3: 593 .align 2 594 .global simple_strtoull 596 simple_strtoull: 597 .LFB4: 83:lib/vsprintf.c **** { 598 .loc 2 83 0 599 .cfi_startproc 600 @ Function supports interworking. 601 @ args = 0, pretend = 0, frame = 0 602 @ frame_needed = 0, uses_anonymous_args = 0 603 .LVL73: 604 03ac F8452DE9 stmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr} 605 .LCFI4: 606 .cfi_def_cfa_offset 32 86:lib/vsprintf.c **** if (!base) { 607 .loc 2 86 0 608 03b0 006052E2 subs r6, r2, #0 609 .cfi_offset 14, -4 610 .cfi_offset 10, -8 611 .cfi_offset 8, -12 612 .cfi_offset 7, -16 613 .cfi_offset 6, -20 614 .cfi_offset 5, -24 615 .cfi_offset 4, -28 616 .cfi_offset 3, -32 83:lib/vsprintf.c **** { 617 .loc 2 83 0 618 03b4 0040A0E1 mov r4, r0 619 03b8 0150A0E1 mov r5, r1 86:lib/vsprintf.c **** if (!base) { 620 .loc 2 86 0 621 03bc 1100001A bne .L71 622 .LVL74: 88:lib/vsprintf.c **** if (*cp == '0') { 623 .loc 2 88 0 624 03c0 0030D0E5 ldrb r3, [r0, #0] @ zero_extendqisi2 625 03c4 300053E3 cmp r3, #48 87:lib/vsprintf.c **** base = 10; 626 .loc 2 87 0 627 03c8 0A60A013 movne r6, #10 88:lib/vsprintf.c **** if (*cp == '0') { 628 .loc 2 88 0 629 03cc 1600001A bne .L72 630 .LVL75: 91:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 631 .loc 2 91 0 632 03d0 0100F4E5 ldrb r0, [r4, #1]! @ zero_extendqisi2 633 .LVL76: 634 03d4 09FFFFEB bl __toupper 635 .LVL77: 636 03d8 580050E3 cmp r0, #88 89:lib/vsprintf.c **** base = 8; 637 .loc 2 89 0 638 03dc 0860A013 movne r6, #8 91:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 639 .loc 2 91 0 640 03e0 1100001A bne .L72 91:lib/vsprintf.c **** if ((toupper(*cp) == 'X') && isxdigit(cp[1])) { 641 .loc 2 91 0 is_stmt 0 discriminator 1 642 03e4 0130D4E5 ldrb r3, [r4, #1] @ zero_extendqisi2 643 03e8 B8209FE5 ldr r2, .L83 644 03ec 0330D2E7 ldrb r3, [r2, r3] @ zero_extendqisi2 645 03f0 443003E2 and r3, r3, #68 646 03f4 000053E3 cmp r3, #0 89:lib/vsprintf.c **** base = 8; 647 .loc 2 89 0 is_stmt 1 discriminator 1 648 03f8 1060A013 movne r6, #16 649 03fc 0860A003 moveq r6, #8 650 0400 01408412 addne r4, r4, #1 651 .LVL78: 652 0404 080000EA b .L72 653 .LVL79: 654 .L71: 96:lib/vsprintf.c **** } else if (base == 16) { 655 .loc 2 96 0 656 0408 100056E3 cmp r6, #16 657 040c 0600001A bne .L72 97:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 658 .loc 2 97 0 659 0410 0030D0E5 ldrb r3, [r0, #0] @ zero_extendqisi2 660 0414 300053E3 cmp r3, #48 661 0418 0300001A bne .L72 97:lib/vsprintf.c **** if (cp[0] == '0' && toupper(cp[1]) == 'X') 662 .loc 2 97 0 is_stmt 0 discriminator 1 663 041c 0100D0E5 ldrb r0, [r0, #1] @ zero_extendqisi2 664 .LVL80: 665 0420 F6FEFFEB bl __toupper 666 .LVL81: 667 0424 580050E3 cmp r0, #88 98:lib/vsprintf.c **** cp += 2; 668 .loc 2 98 0 is_stmt 1 discriminator 1 669 0428 02408402 addeq r4, r4, #2 670 .LVL82: 671 .L72: 87:lib/vsprintf.c **** base = 10; 672 .loc 2 87 0 discriminator 1 673 042c 0070A0E3 mov r7, #0 674 0430 0080A0E3 mov r8, #0 675 0434 030000EA b .L73 676 .LVL83: 677 .L78: 102:lib/vsprintf.c **** result = result*base + value; 678 .loc 2 102 0 679 0438 972683E0 umull r2, r3, r7, r6 680 043c 963823E0 mla r3, r6, r8, r3 681 0440 027090E0 adds r7, r0, r2 682 .LVL84: 683 0444 0380A1E0 adc r8, r1, r3 684 .LVL85: 685 .L73: 102:lib/vsprintf.c **** result = result*base + value; 686 .loc 2 102 0 is_stmt 0 discriminator 1 687 0448 04A0A0E1 mov sl, r4 688 .LVL86: 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 689 .loc 2 100 0 is_stmt 1 discriminator 1 690 044c 54309FE5 ldr r3, .L83 691 0450 0100D4E4 ldrb r0, [r4], #1 @ zero_extendqisi2 692 .LVL87: 693 0454 0030D3E7 ldrb r3, [r3, r0] @ zero_extendqisi2 694 0458 440013E3 tst r3, #68 695 045c 0B00000A beq .L74 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 696 .loc 2 100 0 is_stmt 0 discriminator 2 697 0460 040013E3 tst r3, #4 698 0464 30004012 subne r0, r0, #48 699 0468 0200001A bne .L76 700 046c 020013E3 tst r3, #2 101:lib/vsprintf.c **** ? toupper(*cp) : *cp)-'A'+10) < base) { 701 .loc 2 101 0 is_stmt 1 702 0470 E2FEFF1B blne __toupper 703 .L77: 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 704 .loc 2 100 0 discriminator 3 705 0474 370040E2 sub r0, r0, #55 706 .L76: 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 707 .loc 2 100 0 is_stmt 0 discriminator 5 708 0478 C01FA0E1 mov r1, r0, asr #31 709 .LVL88: 101:lib/vsprintf.c **** ? toupper(*cp) : *cp)-'A'+10) < base) { 710 .loc 2 101 0 is_stmt 1 discriminator 5 711 047c 0620A0E1 mov r2, r6 712 0480 0030A0E3 mov r3, #0 100:lib/vsprintf.c **** while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) 713 .loc 2 100 0 discriminator 5 714 0484 030051E1 cmp r1, r3 715 0488 02005001 cmpeq r0, r2 716 048c E9FFFF3A bcc .L78 717 .LVL89: 718 .L74: 105:lib/vsprintf.c **** if (endp) 719 .loc 2 105 0 720 0490 000055E3 cmp r5, #0 106:lib/vsprintf.c **** *endp = (char *)cp; 721 .loc 2 106 0 722 0494 00A08515 strne sl, [r5, #0] 108:lib/vsprintf.c **** } 723 .loc 2 108 0 724 0498 0700A0E1 mov r0, r7 725 049c 0810A0E1 mov r1, r8 726 04a0 F845BDE8 ldmfd sp!, {r3, r4, r5, r6, r7, r8, sl, lr} 727 04a4 1EFF2FE1 bx lr 728 .L84: 729 .align 2 730 .L83: 731 04a8 00000000 .word _ctype 732 .cfi_endproc 733 .LFE4: 735 .align 2 736 .global simple_strtoll 738 simple_strtoll: 739 .LFB5: 118:lib/vsprintf.c **** { 740 .loc 2 118 0 741 .cfi_startproc 742 @ Function supports interworking. 743 @ args = 0, pretend = 0, frame = 0 744 @ frame_needed = 0, uses_anonymous_args = 0 745 .LVL90: 746 04ac 10402DE9 stmfd sp!, {r4, lr} 747 .LCFI5: 748 .cfi_def_cfa_offset 8 119:lib/vsprintf.c **** if(*cp=='-') 749 .loc 2 119 0 750 04b0 00C0D0E5 ldrb ip, [r0, #0] @ zero_extendqisi2 751 04b4 2D005CE3 cmp ip, #45 752 04b8 0700001A bne .L86 753 .cfi_offset 14, -4 754 .cfi_offset 4, -8 120:lib/vsprintf.c **** return -simple_strtoull(cp+1,endp,base); 755 .loc 2 120 0 756 04bc 010080E2 add r0, r0, #1 757 .LVL91: 758 04c0 FEFFFFEB bl simple_strtoull 759 .LVL92: 760 04c4 003070E2 rsbs r3, r0, #0 761 04c8 0040E1E2 rsc r4, r1, #0 122:lib/vsprintf.c **** } 762 .loc 2 122 0 763 04cc 0300A0E1 mov r0, r3 764 04d0 0410A0E1 mov r1, r4 765 04d4 1040BDE8 ldmfd sp!, {r4, lr} 766 04d8 1EFF2FE1 bx lr 767 .LVL93: 768 .L86: 769 04dc 1040BDE8 ldmfd sp!, {r4, lr} 121:lib/vsprintf.c **** return simple_strtoull(cp,endp,base); 770 .loc 2 121 0 771 04e0 FEFFFFEA b simple_strtoull 772 .cfi_endproc 773 .LFE5: 775 .align 2 776 .global vsnprintf 778 vsnprintf: 779 .LFB8: 233:lib/vsprintf.c **** 234:lib/vsprintf.c **** /** 235:lib/vsprintf.c **** * vsnprintf - Format a string and place it in a buffer 236:lib/vsprintf.c **** * @buf: The buffer to place the result into 237:lib/vsprintf.c **** * @size: The size of the buffer, including the trailing null space 238:lib/vsprintf.c **** * @fmt: The format string to use 239:lib/vsprintf.c **** * @args: Arguments for the format string 240:lib/vsprintf.c **** * 241:lib/vsprintf.c **** * The return value is the number of characters which would 242:lib/vsprintf.c **** * be generated for the given input, excluding the trailing 243:lib/vsprintf.c **** * '\0', as per ISO C99. If you want to have the exact 244:lib/vsprintf.c **** * number of characters written into @buf as return value 245:lib/vsprintf.c **** * (not including the trailing '\0'), use vscnprintf. If the 246:lib/vsprintf.c **** * return is greater than or equal to @size, the resulting 247:lib/vsprintf.c **** * string is truncated. 248:lib/vsprintf.c **** * 249:lib/vsprintf.c **** * Call this function if you are already dealing with a va_list. 250:lib/vsprintf.c **** * You probably want snprintf instead. 251:lib/vsprintf.c **** */ 252:lib/vsprintf.c **** int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) 253:lib/vsprintf.c **** { 780 .loc 2 253 0 781 .cfi_startproc 782 @ Function supports interworking. 783 @ args = 0, pretend = 0, frame = 8 784 @ frame_needed = 0, uses_anonymous_args = 0 785 .LVL94: 786 04e4 F04F2DE9 stmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 787 .LCFI6: 788 .cfi_def_cfa_offset 36 254:lib/vsprintf.c **** int len; 255:lib/vsprintf.c **** unsigned long long num; 256:lib/vsprintf.c **** int i, base; 257:lib/vsprintf.c **** char *str, *end, c; 258:lib/vsprintf.c **** const char *s; 259:lib/vsprintf.c **** 260:lib/vsprintf.c **** int flags; /* flags to number() */ 261:lib/vsprintf.c **** 262:lib/vsprintf.c **** int field_width; /* width of output field */ 263:lib/vsprintf.c **** int precision; /* min. # of digits for integers; max 264:lib/vsprintf.c **** number of chars for from string */ 265:lib/vsprintf.c **** int qualifier; /* 'h', 'l', or 'L' for integer fields */ 266:lib/vsprintf.c **** /* 'z' support added 23/7/1999 S.H. */ 267:lib/vsprintf.c **** /* 'z' changed to 'Z' --davidm 1/25/99 */ 268:lib/vsprintf.c **** /* 't' added for ptrdiff_t */ 269:lib/vsprintf.c **** 270:lib/vsprintf.c **** /* Reject out-of-range values early */ 271:lib/vsprintf.c **** if ((int) size < 0) { 789 .loc 2 271 0 790 04e8 007051E2 subs r7, r1, #0 791 .cfi_offset 14, -4 792 .cfi_offset 11, -8 793 .cfi_offset 10, -12 794 .cfi_offset 9, -16 795 .cfi_offset 8, -20 796 .cfi_offset 7, -24 797 .cfi_offset 6, -28 798 .cfi_offset 5, -32 799 .cfi_offset 4, -36 253:lib/vsprintf.c **** { 800 .loc 2 253 0 801 04ec 1CD04DE2 sub sp, sp, #28 802 .LCFI7: 803 .cfi_def_cfa_offset 64 253:lib/vsprintf.c **** { 804 .loc 2 253 0 805 04f0 0050A0E1 mov r5, r0 806 04f4 14208DE5 str r2, [sp, #20] 807 04f8 0360A0E1 mov r6, r3 272:lib/vsprintf.c **** return 0; 808 .loc 2 272 0 809 04fc 0000A0B3 movlt r0, #0 810 .LVL95: 271:lib/vsprintf.c **** if ((int) size < 0) { 811 .loc 2 271 0 812 0500 350100BA blt .L89 813 .LVL96: 273:lib/vsprintf.c **** } 274:lib/vsprintf.c **** 275:lib/vsprintf.c **** str = buf; 276:lib/vsprintf.c **** end = buf + size - 1; 814 .loc 2 276 0 815 0504 014047E2 sub r4, r7, #1 816 0508 044080E0 add r4, r0, r4 817 .LVL97: 277:lib/vsprintf.c **** 278:lib/vsprintf.c **** if (end < buf - 1) { 818 .loc 2 278 0 819 050c 013040E2 sub r3, r0, #1 820 .LVL98: 821 0510 030054E1 cmp r4, r3 822 .LVL99: 279:lib/vsprintf.c **** end = ((void *) -1); 280:lib/vsprintf.c **** size = end - buf + 1; 823 .loc 2 280 0 824 0514 00706032 rsbcc r7, r0, #0 825 .LVL100: 279:lib/vsprintf.c **** end = ((void *) -1); 826 .loc 2 279 0 827 0518 0040E033 mvncc r4, #0 828 .LBB3: 281:lib/vsprintf.c **** } 282:lib/vsprintf.c **** 283:lib/vsprintf.c **** for (; *fmt ; ++fmt) { 284:lib/vsprintf.c **** if (*fmt != '%') { 285:lib/vsprintf.c **** if (str <= end) 286:lib/vsprintf.c **** *str = *fmt; 287:lib/vsprintf.c **** ++str; 288:lib/vsprintf.c **** continue; 289:lib/vsprintf.c **** } 290:lib/vsprintf.c **** 291:lib/vsprintf.c **** /* process flags */ 292:lib/vsprintf.c **** flags = 0; 293:lib/vsprintf.c **** repeat: 294:lib/vsprintf.c **** ++fmt; /* this also skips first '%' */ 295:lib/vsprintf.c **** switch (*fmt) { 296:lib/vsprintf.c **** case '-': flags |= LEFT; goto repeat; 297:lib/vsprintf.c **** case '+': flags |= PLUS; goto repeat; 298:lib/vsprintf.c **** case ' ': flags |= SPACE; goto repeat; 299:lib/vsprintf.c **** case '#': flags |= SPECIAL; goto repeat; 300:lib/vsprintf.c **** case '0': flags |= ZEROPAD; goto repeat; 301:lib/vsprintf.c **** } 302:lib/vsprintf.c **** 303:lib/vsprintf.c **** /* get field width */ 304:lib/vsprintf.c **** field_width = -1; 305:lib/vsprintf.c **** if (isdigit(*fmt)) 306:lib/vsprintf.c **** field_width = skip_atoi(&fmt); 307:lib/vsprintf.c **** else if (*fmt == '*') { 308:lib/vsprintf.c **** ++fmt; 309:lib/vsprintf.c **** /* it's the next argument */ 310:lib/vsprintf.c **** field_width = va_arg(args, int); 311:lib/vsprintf.c **** if (field_width < 0) { 312:lib/vsprintf.c **** field_width = -field_width; 313:lib/vsprintf.c **** flags |= LEFT; 314:lib/vsprintf.c **** } 315:lib/vsprintf.c **** } 316:lib/vsprintf.c **** 317:lib/vsprintf.c **** /* get the precision */ 318:lib/vsprintf.c **** precision = -1; 319:lib/vsprintf.c **** if (*fmt == '.') { 320:lib/vsprintf.c **** ++fmt; 321:lib/vsprintf.c **** if (isdigit(*fmt)) 322:lib/vsprintf.c **** precision = skip_atoi(&fmt); 323:lib/vsprintf.c **** else if (*fmt == '*') { 324:lib/vsprintf.c **** ++fmt; 325:lib/vsprintf.c **** /* it's the next argument */ 326:lib/vsprintf.c **** precision = va_arg(args, int); 327:lib/vsprintf.c **** } 328:lib/vsprintf.c **** if (precision < 0) 329:lib/vsprintf.c **** precision = 0; 330:lib/vsprintf.c **** } 331:lib/vsprintf.c **** 332:lib/vsprintf.c **** /* get the conversion qualifier */ 333:lib/vsprintf.c **** qualifier = -1; 334:lib/vsprintf.c **** if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 335:lib/vsprintf.c **** *fmt =='Z' || *fmt == 'z' || *fmt == 't') { 336:lib/vsprintf.c **** qualifier = *fmt; 337:lib/vsprintf.c **** ++fmt; 338:lib/vsprintf.c **** if (qualifier == 'l' && *fmt == 'l') { 339:lib/vsprintf.c **** qualifier = 'L'; 340:lib/vsprintf.c **** ++fmt; 341:lib/vsprintf.c **** } 342:lib/vsprintf.c **** } 343:lib/vsprintf.c **** 344:lib/vsprintf.c **** /* default base */ 345:lib/vsprintf.c **** base = 10; 346:lib/vsprintf.c **** 347:lib/vsprintf.c **** switch (*fmt) { 348:lib/vsprintf.c **** case 'c': 349:lib/vsprintf.c **** if (!(flags & LEFT)) { 350:lib/vsprintf.c **** while (--field_width > 0) { 351:lib/vsprintf.c **** if (str <= end) 352:lib/vsprintf.c **** *str = ' '; 353:lib/vsprintf.c **** ++str; 354:lib/vsprintf.c **** } 355:lib/vsprintf.c **** } 356:lib/vsprintf.c **** c = (unsigned char) va_arg(args, int); 357:lib/vsprintf.c **** if (str <= end) 358:lib/vsprintf.c **** *str = c; 359:lib/vsprintf.c **** ++str; 360:lib/vsprintf.c **** while (--field_width > 0) { 361:lib/vsprintf.c **** if (str <= end) 362:lib/vsprintf.c **** *str = ' '; 363:lib/vsprintf.c **** ++str; 364:lib/vsprintf.c **** } 365:lib/vsprintf.c **** continue; 366:lib/vsprintf.c **** 367:lib/vsprintf.c **** case 's': 368:lib/vsprintf.c **** s = va_arg(args, char *); 369:lib/vsprintf.c **** 370:lib/vsprintf.c **** len = strnlen(s, precision); 371:lib/vsprintf.c **** 372:lib/vsprintf.c **** if (!(flags & LEFT)) { 373:lib/vsprintf.c **** while (len < field_width--) { 374:lib/vsprintf.c **** if (str <= end) 375:lib/vsprintf.c **** *str = ' '; 376:lib/vsprintf.c **** ++str; 377:lib/vsprintf.c **** } 378:lib/vsprintf.c **** } 379:lib/vsprintf.c **** for (i = 0; i < len; ++i) { 380:lib/vsprintf.c **** if (str <= end) 381:lib/vsprintf.c **** *str = *s; 382:lib/vsprintf.c **** ++str; ++s; 383:lib/vsprintf.c **** } 384:lib/vsprintf.c **** while (len < field_width--) { 385:lib/vsprintf.c **** if (str <= end) 386:lib/vsprintf.c **** *str = ' '; 387:lib/vsprintf.c **** ++str; 388:lib/vsprintf.c **** } 389:lib/vsprintf.c **** continue; 390:lib/vsprintf.c **** 391:lib/vsprintf.c **** case 'p': 392:lib/vsprintf.c **** if (field_width == -1) { 393:lib/vsprintf.c **** field_width = 2*sizeof(void *); 394:lib/vsprintf.c **** flags |= ZEROPAD; 395:lib/vsprintf.c **** } 396:lib/vsprintf.c **** str = number(str, end, 397:lib/vsprintf.c **** (unsigned long) va_arg(args, void *), 398:lib/vsprintf.c **** 16, field_width, precision, flags); 399:lib/vsprintf.c **** continue; 400:lib/vsprintf.c **** 401:lib/vsprintf.c **** 402:lib/vsprintf.c **** case 'n': 403:lib/vsprintf.c **** /* FIXME: 404:lib/vsprintf.c **** * What does C99 say about the overflow case here? */ 405:lib/vsprintf.c **** if (qualifier == 'l') { 406:lib/vsprintf.c **** long * ip = va_arg(args, long *); 407:lib/vsprintf.c **** *ip = (str - buf); 408:lib/vsprintf.c **** } else if (qualifier == 'Z' || qualifier == 'z') { 409:lib/vsprintf.c **** size_t * ip = va_arg(args, size_t *); 410:lib/vsprintf.c **** *ip = (str - buf); 411:lib/vsprintf.c **** } else { 412:lib/vsprintf.c **** int * ip = va_arg(args, int *); 829 .loc 2 412 0 830 051c 0580A0E1 mov r8, r5 831 0520 230100EA b .L91 832 .LVL101: 833 .L157: 834 .LBE3: 284:lib/vsprintf.c **** if (*fmt != '%') { 835 .loc 2 284 0 836 0524 250053E3 cmp r3, #37 837 0528 00A0A003 moveq sl, #0 838 052c 0300000A beq .L167 285:lib/vsprintf.c **** if (str <= end) 839 .loc 2 285 0 840 0530 040058E1 cmp r8, r4 286:lib/vsprintf.c **** *str = *fmt; 841 .loc 2 286 0 842 0534 0030C895 strlsb r3, [r8, #0] 287:lib/vsprintf.c **** ++str; 843 .loc 2 287 0 844 0538 018088E2 add r8, r8, #1 845 .LVL102: 846 053c 170100EA b .L172 847 .L167: 848 .LVL103: 294:lib/vsprintf.c **** ++fmt; /* this also skips first '%' */ 849 .loc 2 294 0 850 0540 14309DE5 ldr r3, [sp, #20] 851 0544 012083E2 add r2, r3, #1 852 .LVL104: 853 0548 14208DE5 str r2, [sp, #20] 295:lib/vsprintf.c **** switch (*fmt) { 854 .loc 2 295 0 855 054c 0130D3E5 ldrb r3, [r3, #1] @ zero_extendqisi2 856 0550 2B0053E3 cmp r3, #43 857 0554 0C00000A beq .L99 858 0558 0400008A bhi .L102 859 055c 200053E3 cmp r3, #32 860 0560 0B00000A beq .L97 861 0564 230053E3 cmp r3, #35 862 0568 0F00001A bne .L96 863 056c 0A0000EA b .L177 864 .L102: 865 0570 2D0053E3 cmp r3, #45 866 0574 0200000A beq .L100 867 0578 300053E3 cmp r3, #48 868 057c 0A00001A bne .L96 869 0580 070000EA b .L178 870 .L100: 296:lib/vsprintf.c **** case '-': flags |= LEFT; goto repeat; 871 .loc 2 296 0 872 0584 10A08AE3 orr sl, sl, #16 873 .LVL105: 874 0588 ECFFFFEA b .L167 875 .L99: 297:lib/vsprintf.c **** case '+': flags |= PLUS; goto repeat; 876 .loc 2 297 0 877 058c 04A08AE3 orr sl, sl, #4 878 .LVL106: 879 0590 EAFFFFEA b .L167 880 .L97: 298:lib/vsprintf.c **** case ' ': flags |= SPACE; goto repeat; 881 .loc 2 298 0 882 0594 08A08AE3 orr sl, sl, #8 883 .LVL107: 884 0598 E8FFFFEA b .L167 885 .L177: 299:lib/vsprintf.c **** case '#': flags |= SPECIAL; goto repeat; 886 .loc 2 299 0 887 059c 20A08AE3 orr sl, sl, #32 888 .LVL108: 889 05a0 E6FFFFEA b .L167 890 .L178: 300:lib/vsprintf.c **** case '0': flags |= ZEROPAD; goto repeat; 891 .loc 2 300 0 892 05a4 01A08AE3 orr sl, sl, #1 893 .LVL109: 894 05a8 E4FFFFEA b .L167 895 .L96: 896 .LVL110: 305:lib/vsprintf.c **** if (isdigit(*fmt)) 897 .loc 2 305 0 898 05ac 34149FE5 ldr r1, .L181 899 05b0 0310D1E7 ldrb r1, [r1, r3] @ zero_extendqisi2 900 05b4 040011E3 tst r1, #4 901 05b8 0400000A beq .L104 306:lib/vsprintf.c **** field_width = skip_atoi(&fmt); 902 .loc 2 306 0 903 05bc 14008DE2 add r0, sp, #20 904 05c0 95FEFFEB bl skip_atoi 905 05c4 0620A0E1 mov r2, r6 906 05c8 0090A0E1 mov r9, r0 907 .LVL111: 908 05cc 0A0000EA b .L105 909 .LVL112: 910 .L104: 307:lib/vsprintf.c **** else if (*fmt == '*') { 911 .loc 2 307 0 912 05d0 2A0053E3 cmp r3, #42 913 05d4 0620A011 movne r2, r6 304:lib/vsprintf.c **** field_width = -1; 914 .loc 2 304 0 915 05d8 0090E013 mvnne r9, #0 307:lib/vsprintf.c **** else if (*fmt == '*') { 916 .loc 2 307 0 917 05dc 0600001A bne .L105 310:lib/vsprintf.c **** field_width = va_arg(args, int); 918 .loc 2 310 0 919 05e0 009096E5 ldr r9, [r6, #0] 308:lib/vsprintf.c **** ++fmt; 920 .loc 2 308 0 921 05e4 012082E2 add r2, r2, #1 311:lib/vsprintf.c **** if (field_width < 0) { 922 .loc 2 311 0 923 05e8 000059E3 cmp r9, #0 308:lib/vsprintf.c **** ++fmt; 924 .loc 2 308 0 925 05ec 14208DE5 str r2, [sp, #20] 312:lib/vsprintf.c **** field_width = -field_width; 926 .loc 2 312 0 927 05f0 009069B2 rsblt r9, r9, #0 310:lib/vsprintf.c **** field_width = va_arg(args, int); 928 .loc 2 310 0 929 05f4 042086E2 add r2, r6, #4 930 .LVL113: 313:lib/vsprintf.c **** flags |= LEFT; 931 .loc 2 313 0 932 05f8 10A08AB3 orrlt sl, sl, #16 933 .LVL114: 934 .L105: 319:lib/vsprintf.c **** if (*fmt == '.') { 935 .loc 2 319 0 936 05fc 14309DE5 ldr r3, [sp, #20] 937 0600 0010D3E5 ldrb r1, [r3, #0] @ zero_extendqisi2 938 0604 2E0051E3 cmp r1, #46 318:lib/vsprintf.c **** precision = -1; 939 .loc 2 318 0 940 0608 0010E013 mvnne r1, #0 319:lib/vsprintf.c **** if (*fmt == '.') { 941 .loc 2 319 0 942 060c 1300001A bne .L106 320:lib/vsprintf.c **** ++fmt; 943 .loc 2 320 0 944 0610 010083E2 add r0, r3, #1 945 0614 14008DE5 str r0, [sp, #20] 321:lib/vsprintf.c **** if (isdigit(*fmt)) 946 .loc 2 321 0 947 0618 C8139FE5 ldr r1, .L181 948 061c 0130D3E5 ldrb r3, [r3, #1] @ zero_extendqisi2 949 0620 0310D1E7 ldrb r1, [r1, r3] @ zero_extendqisi2 950 0624 041011E2 ands r1, r1, #4 951 0628 0500000A beq .L107 322:lib/vsprintf.c **** precision = skip_atoi(&fmt); 952 .loc 2 322 0 953 062c 14008DE2 add r0, sp, #20 954 0630 10208DE5 str r2, [sp, #16] 955 0634 78FEFFEB bl skip_atoi 956 0638 10209DE5 ldr r2, [sp, #16] 957 063c 0010A0E1 mov r1, r0 958 .LVL115: 959 0640 050000EA b .L108 960 .LVL116: 961 .L107: 323:lib/vsprintf.c **** else if (*fmt == '*') { 962 .loc 2 323 0 963 0644 2A0053E3 cmp r3, #42 964 0648 0400001A bne .L106 324:lib/vsprintf.c **** ++fmt; 965 .loc 2 324 0 966 064c 010080E2 add r0, r0, #1 967 0650 14008DE5 str r0, [sp, #20] 326:lib/vsprintf.c **** precision = va_arg(args, int); 968 .loc 2 326 0 969 0654 001092E5 ldr r1, [r2, #0] 970 .LVL117: 971 0658 042082E2 add r2, r2, #4 972 .LVL118: 973 .L108: 329:lib/vsprintf.c **** precision = 0; 974 .loc 2 329 0 975 065c C11FC1E1 bic r1, r1, r1, asr #31 976 .LVL119: 977 .L106: 334:lib/vsprintf.c **** if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 978 .loc 2 334 0 979 0660 14009DE5 ldr r0, [sp, #20] 980 0664 0030D0E5 ldrb r3, [r0, #0] @ zero_extendqisi2 981 0668 680053E3 cmp r3, #104 982 066c 6C005313 cmpne r3, #108 983 0670 0900000A beq .L109 334:lib/vsprintf.c **** if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 984 .loc 2 334 0 is_stmt 0 discriminator 1 985 0674 5A0053E3 cmp r3, #90 986 0678 0700000A beq .L109 987 067c 0100008A bhi .L111 988 0680 4C0053E3 cmp r3, #76 989 0684 020000EA b .L169 990 .L111: 991 0688 740053E3 cmp r3, #116 992 068c 0200000A beq .L109 993 0690 7A0053E3 cmp r3, #122 994 .L169: 333:lib/vsprintf.c **** qualifier = -1; 995 .loc 2 333 0 is_stmt 1 discriminator 1 996 0694 0030E013 mvnne r3, #0 334:lib/vsprintf.c **** if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 997 .loc 2 334 0 discriminator 1 998 0698 0800001A bne .L110 999 .L109: 1000 .LVL120: 337:lib/vsprintf.c **** ++fmt; 1001 .loc 2 337 0 1002 069c 01C080E2 add ip, r0, #1 338:lib/vsprintf.c **** if (qualifier == 'l' && *fmt == 'l') { 1003 .loc 2 338 0 1004 06a0 6C0053E3 cmp r3, #108 337:lib/vsprintf.c **** ++fmt; 1005 .loc 2 337 0 1006 06a4 14C08DE5 str ip, [sp, #20] 338:lib/vsprintf.c **** if (qualifier == 'l' && *fmt == 'l') { 1007 .loc 2 338 0 1008 06a8 0400001A bne .L110 338:lib/vsprintf.c **** if (qualifier == 'l' && *fmt == 'l') { 1009 .loc 2 338 0 is_stmt 0 discriminator 1 1010 06ac 0100D0E5 ldrb r0, [r0, #1] @ zero_extendqisi2 1011 06b0 6C0050E3 cmp r0, #108 1012 .LVL121: 340:lib/vsprintf.c **** ++fmt; 1013 .loc 2 340 0 is_stmt 1 discriminator 1 1014 06b4 01C08C02 addeq ip, ip, #1 1015 06b8 14C08D05 streq ip, [sp, #20] 339:lib/vsprintf.c **** qualifier = 'L'; 1016 .loc 2 339 0 discriminator 1 1017 06bc 4C30A003 moveq r3, #76 1018 .LVL122: 1019 .L110: 347:lib/vsprintf.c **** switch (*fmt) { 1020 .loc 2 347 0 1021 06c0 14009DE5 ldr r0, [sp, #20] 1022 06c4 0000D0E5 ldrb r0, [r0, #0] @ zero_extendqisi2 1023 06c8 6E0050E3 cmp r0, #110 1024 06cc 6400000A beq .L117 1025 06d0 0C00008A bhi .L123 1026 06d4 630050E3 cmp r0, #99 1027 06d8 1700000A beq .L115 1028 06dc 0400008A bhi .L124 1029 06e0 250050E3 cmp r0, #37 1030 06e4 6A00000A beq .L113 1031 06e8 580050E3 cmp r0, #88 1032 06ec 7100001A bne .L112 1033 06f0 6C0000EA b .L179 1034 .L124: 1035 06f4 640050E3 cmp r0, #100 1036 06f8 6C00000A beq .L116 1037 06fc 690050E3 cmp r0, #105 1038 0700 6C00001A bne .L112 1039 0704 690000EA b .L116 1040 .L123: 1041 0708 730050E3 cmp r0, #115 1042 070c 2200000A beq .L120 1043 0710 0400008A bhi .L125 1044 0714 6F0050E3 cmp r0, #111 1045 0718 6000000A beq .L118 1046 071c 700050E3 cmp r0, #112 1047 0720 6400001A bne .L112 1048 0724 400000EA b .L180 1049 .L125: 1050 0728 750050E3 cmp r0, #117 1051 072c 6F00000A beq .L121 1052 0730 780050E3 cmp r0, #120 1053 0734 5F00001A bne .L112 1054 0738 6E0000EA b .L166 1055 .L115: 349:lib/vsprintf.c **** if (!(flags & LEFT)) { 1056 .loc 2 349 0 1057 073c 10001AE3 tst sl, #16 1058 0740 0700001A bne .L126 1059 0744 030000EA b .L127 1060 .LVL123: 1061 .L129: 351:lib/vsprintf.c **** if (str <= end) 1062 .loc 2 351 0 1063 0748 040058E1 cmp r8, r4 352:lib/vsprintf.c **** *str = ' '; 1064 .loc 2 352 0 1065 074c 2030A093 movls r3, #32 1066 0750 0030C895 strlsb r3, [r8, #0] 353:lib/vsprintf.c **** ++str; 1067 .loc 2 353 0 1068 0754 018088E2 add r8, r8, #1 1069 .LVL124: 1070 .L127: 350:lib/vsprintf.c **** while (--field_width > 0) { 1071 .loc 2 350 0 discriminator 1 1072 0758 019049E2 sub r9, r9, #1 1073 .LVL125: 1074 075c 000059E3 cmp r9, #0 1075 0760 F8FFFFCA bgt .L129 1076 .L126: 357:lib/vsprintf.c **** if (str <= end) 1077 .loc 2 357 0 1078 0764 040058E1 cmp r8, r4 356:lib/vsprintf.c **** c = (unsigned char) va_arg(args, int); 1079 .loc 2 356 0 1080 0768 043082E2 add r3, r2, #4 1081 076c 002092E5 ldr r2, [r2, #0] 1082 .LVL126: 357:lib/vsprintf.c **** if (str <= end) 1083 .loc 2 357 0 1084 0770 0400008A bhi .L132 1085 0774 020000EA b .L173 1086 .L133: 361:lib/vsprintf.c **** if (str <= end) 1087 .loc 2 361 0 1088 0778 040058E1 cmp r8, r4 1089 077c 0100008A bhi .L132 362:lib/vsprintf.c **** *str = ' '; 1090 .loc 2 362 0 1091 0780 2020A0E3 mov r2, #32 1092 .L173: 1093 0784 0020C8E5 strb r2, [r8, #0] 1094 .L132: 360:lib/vsprintf.c **** while (--field_width > 0) { 1095 .loc 2 360 0 1096 0788 019049E2 sub r9, r9, #1 1097 .LVL127: 1098 078c 000059E3 cmp r9, #0 363:lib/vsprintf.c **** ++str; 1099 .loc 2 363 0 1100 0790 018088E2 add r8, r8, #1 1101 .LVL128: 360:lib/vsprintf.c **** while (--field_width > 0) { 1102 .loc 2 360 0 1103 0794 F7FFFFCA bgt .L133 1104 0798 3B0000EA b .L171 1105 .LVL129: 1106 .L120: 368:lib/vsprintf.c **** s = va_arg(args, char *); 1107 .loc 2 368 0 1108 079c 006092E5 ldr r6, [r2, #0] 370:lib/vsprintf.c **** len = strnlen(s, precision); 1109 .loc 2 370 0 1110 07a0 0600A0E1 mov r0, r6 368:lib/vsprintf.c **** s = va_arg(args, char *); 1111 .loc 2 368 0 1112 07a4 04B082E2 add fp, r2, #4 1113 .LVL130: 370:lib/vsprintf.c **** len = strnlen(s, precision); 1114 .loc 2 370 0 1115 07a8 FEFFFFEB bl strnlen 1116 .LVL131: 372:lib/vsprintf.c **** if (!(flags & LEFT)) { 1117 .loc 2 372 0 1118 07ac 10001AE3 tst sl, #16 1119 07b0 0800001A bne .L134 1120 07b4 030000EA b .L135 1121 .L137: 374:lib/vsprintf.c **** if (str <= end) 1122 .loc 2 374 0 1123 07b8 040058E1 cmp r8, r4 375:lib/vsprintf.c **** *str = ' '; 1124 .loc 2 375 0 1125 07bc 2030A093 movls r3, #32 1126 07c0 0030C895 strlsb r3, [r8, #0] 376:lib/vsprintf.c **** ++str; 1127 .loc 2 376 0 1128 07c4 018088E2 add r8, r8, #1 1129 .LVL132: 1130 .L135: 373:lib/vsprintf.c **** while (len < field_width--) { 1131 .loc 2 373 0 discriminator 1 1132 07c8 019049E2 sub r9, r9, #1 1133 .LVL133: 252:lib/vsprintf.c **** int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) 1134 .loc 2 252 0 discriminator 1 1135 07cc 013089E2 add r3, r9, #1 373:lib/vsprintf.c **** while (len < field_width--) { 1136 .loc 2 373 0 discriminator 1 1137 07d0 030050E1 cmp r0, r3 1138 07d4 F7FFFFBA blt .L137 1139 .L134: 1140 .LVL134: 379:lib/vsprintf.c **** for (i = 0; i < len; ++i) { 1141 .loc 2 379 0 1142 07d8 0820A0E1 mov r2, r8 1143 07dc 0030A0E3 mov r3, #0 1144 07e0 040000EA b .L138 1145 .LVL135: 1146 .L140: 380:lib/vsprintf.c **** if (str <= end) 1147 .loc 2 380 0 1148 07e4 040052E1 cmp r2, r4 381:lib/vsprintf.c **** *str = *s; 1149 .loc 2 381 0 1150 07e8 0310D697 ldrlsb r1, [r6, r3] @ zero_extendqisi2 382:lib/vsprintf.c **** ++str; ++s; 1151 .loc 2 382 0 1152 07ec 012082E2 add r2, r2, #1 1153 .LVL136: 381:lib/vsprintf.c **** *str = *s; 1154 .loc 2 381 0 1155 07f0 0310C897 strlsb r1, [r8, r3] 379:lib/vsprintf.c **** for (i = 0; i < len; ++i) { 1156 .loc 2 379 0 1157 07f4 013083E2 add r3, r3, #1 1158 .LVL137: 1159 .L138: 379:lib/vsprintf.c **** for (i = 0; i < len; ++i) { 1160 .loc 2 379 0 is_stmt 0 discriminator 1 1161 07f8 000053E1 cmp r3, r0 1162 07fc F8FFFFBA blt .L140 379:lib/vsprintf.c **** for (i = 0; i < len; ++i) { 1163 .loc 2 379 0 1164 0800 0280A0E1 mov r8, r2 1165 0804 040000EA b .L141 1166 .LVL138: 1167 .L143: 385:lib/vsprintf.c **** if (str <= end) 1168 .loc 2 385 0 is_stmt 1 1169 0808 040058E1 cmp r8, r4 386:lib/vsprintf.c **** *str = ' '; 1170 .loc 2 386 0 1171 080c 2030A093 movls r3, #32 1172 0810 0030C895 strlsb r3, [r8, #0] 387:lib/vsprintf.c **** ++str; 1173 .loc 2 387 0 1174 0814 019049E2 sub r9, r9, #1 1175 0818 018088E2 add r8, r8, #1 1176 .LVL139: 1177 .L141: 384:lib/vsprintf.c **** while (len < field_width--) { 1178 .loc 2 384 0 discriminator 1 1179 081c 090050E1 cmp r0, r9 1180 0820 F8FFFFBA blt .L143 368:lib/vsprintf.c **** s = va_arg(args, char *); 1181 .loc 2 368 0 1182 0824 0B20A0E1 mov r2, fp 1183 0828 5D0000EA b .L95 1184 .LVL140: 1185 .L180: 392:lib/vsprintf.c **** if (field_width == -1) { 1186 .loc 2 392 0 1187 082c 010079E3 cmn r9, #1 1188 .LVL141: 396:lib/vsprintf.c **** str = number(str, end, 1189 .loc 2 396 0 1190 0830 1030A0E3 mov r3, #16 1191 .LVL142: 394:lib/vsprintf.c **** flags |= ZEROPAD; 1192 .loc 2 394 0 1193 0834 01A08A03 orreq sl, sl, #1 1194 .LVL143: 393:lib/vsprintf.c **** field_width = 2*sizeof(void *); 1195 .loc 2 393 0 1196 0838 09908902 addeq r9, r9, #9 1197 .LVL144: 397:lib/vsprintf.c **** (unsigned long) va_arg(args, void *), 1198 .loc 2 397 0 1199 083c 046082E2 add r6, r2, #4 396:lib/vsprintf.c **** str = number(str, end, 1200 .loc 2 396 0 1201 0840 0800A0E1 mov r0, r8 1202 0844 002092E5 ldr r2, [r2, #0] 1203 0848 00308DE5 str r3, [sp, #0] 1204 084c 08108DE5 str r1, [sp, #8] 1205 0850 04908DE5 str r9, [sp, #4] 1206 0854 0CA08DE5 str sl, [sp, #12] 1207 0858 0410A0E1 mov r1, r4 1208 .LVL145: 1209 085c 0030A0E3 mov r3, #0 1210 0860 4C0000EA b .L176 1211 .LVL146: 1212 .L117: 405:lib/vsprintf.c **** if (qualifier == 'l') { 1213 .loc 2 405 0 1214 0864 6C0053E3 cmp r3, #108 1215 .LVL147: 1216 .LBB4: 407:lib/vsprintf.c **** *ip = (str - buf); 1217 .loc 2 407 0 1218 0868 00309205 ldreq r3, [r2, #0] 1219 .LVL148: 1220 086c 08106500 rsbeq r1, r5, r8 1221 .LVL149: 1222 0870 00108305 streq r1, [r3, #0] 406:lib/vsprintf.c **** long * ip = va_arg(args, long *); 1223 .loc 2 406 0 1224 0874 04208202 addeq r2, r2, #4 1225 .LVL150: 1226 0878 4900000A beq .L95 1227 .LVL151: 1228 .L145: 1229 087c 043082E2 add r3, r2, #4 1230 .LVL152: 1231 .LBE4: 1232 .LBB5: 410:lib/vsprintf.c **** *ip = (str - buf); 1233 .loc 2 410 0 1234 0880 002092E5 ldr r2, [r2, #0] 1235 0884 081065E0 rsb r1, r5, r8 1236 .LVL153: 1237 0888 001082E5 str r1, [r2, #0] 1238 .L171: 409:lib/vsprintf.c **** size_t * ip = va_arg(args, size_t *); 1239 .loc 2 409 0 1240 088c 0320A0E1 mov r2, r3 1241 0890 430000EA b .L95 1242 .LVL154: 1243 .L113: 1244 .LBE5: 413:lib/vsprintf.c **** *ip = (str - buf); 414:lib/vsprintf.c **** } 415:lib/vsprintf.c **** continue; 416:lib/vsprintf.c **** 417:lib/vsprintf.c **** case '%': 418:lib/vsprintf.c **** if (str <= end) 1245 .loc 2 418 0 1246 0894 040058E1 cmp r8, r4 419:lib/vsprintf.c **** *str = '%'; 1247 .loc 2 419 0 1248 0898 0000C895 strlsb r0, [r8, #0] 1249 089c 110000EA b .L150 1250 .L118: 1251 .LVL155: 420:lib/vsprintf.c **** ++str; 421:lib/vsprintf.c **** continue; 422:lib/vsprintf.c **** 423:lib/vsprintf.c **** /* integer number formats - set up the flags and "break" */ 424:lib/vsprintf.c **** case 'o': 425:lib/vsprintf.c **** base = 8; 1252 .loc 2 425 0 1253 08a0 0800A0E3 mov r0, #8 426:lib/vsprintf.c **** break; 1254 .loc 2 426 0 1255 08a4 140000EA b .L122 1256 .LVL156: 1257 .L179: 427:lib/vsprintf.c **** 428:lib/vsprintf.c **** case 'X': 429:lib/vsprintf.c **** flags |= LARGE; 1258 .loc 2 429 0 1259 08a8 40A08AE3 orr sl, sl, #64 1260 .LVL157: 1261 08ac 110000EA b .L166 1262 .L116: 430:lib/vsprintf.c **** case 'x': 431:lib/vsprintf.c **** base = 16; 432:lib/vsprintf.c **** break; 433:lib/vsprintf.c **** 434:lib/vsprintf.c **** case 'd': 435:lib/vsprintf.c **** case 'i': 436:lib/vsprintf.c **** flags |= SIGN; 1263 .loc 2 436 0 1264 08b0 02A08AE3 orr sl, sl, #2 1265 .LVL158: 1266 08b4 0D0000EA b .L121 1267 .L112: 437:lib/vsprintf.c **** case 'u': 438:lib/vsprintf.c **** break; 439:lib/vsprintf.c **** 440:lib/vsprintf.c **** default: 441:lib/vsprintf.c **** if (str <= end) 1268 .loc 2 441 0 1269 08b8 040058E1 cmp r8, r4 442:lib/vsprintf.c **** *str = '%'; 1270 .loc 2 442 0 1271 08bc 2530A093 movls r3, #37 1272 .LVL159: 1273 08c0 0030C895 strlsb r3, [r8, #0] 443:lib/vsprintf.c **** ++str; 444:lib/vsprintf.c **** if (*fmt) { 1274 .loc 2 444 0 1275 08c4 14309DE5 ldr r3, [sp, #20] 1276 08c8 0010D3E5 ldrb r1, [r3, #0] @ zero_extendqisi2 1277 .LVL160: 1278 08cc 000051E3 cmp r1, #0 445:lib/vsprintf.c **** if (str <= end) 446:lib/vsprintf.c **** *str = *fmt; 447:lib/vsprintf.c **** ++str; 448:lib/vsprintf.c **** } else { 449:lib/vsprintf.c **** --fmt; 1279 .loc 2 449 0 1280 08d0 01304302 subeq r3, r3, #1 443:lib/vsprintf.c **** ++str; 1281 .loc 2 443 0 1282 08d4 018088E2 add r8, r8, #1 1283 .LVL161: 1284 .loc 2 449 0 1285 08d8 14308D05 streq r3, [sp, #20] 444:lib/vsprintf.c **** if (*fmt) { 1286 .loc 2 444 0 1287 08dc 3000000A beq .L95 445:lib/vsprintf.c **** if (str <= end) 1288 .loc 2 445 0 1289 08e0 040058E1 cmp r8, r4 446:lib/vsprintf.c **** *str = *fmt; 1290 .loc 2 446 0 1291 08e4 0010C895 strlsb r1, [r8, #0] 1292 .L150: 447:lib/vsprintf.c **** ++str; 1293 .loc 2 447 0 1294 08e8 018088E2 add r8, r8, #1 1295 .LVL162: 1296 08ec 2C0000EA b .L95 1297 .LVL163: 1298 .L121: 345:lib/vsprintf.c **** base = 10; 1299 .loc 2 345 0 1300 08f0 0A00A0E3 mov r0, #10 1301 08f4 000000EA b .L122 1302 .L166: 431:lib/vsprintf.c **** base = 16; 1303 .loc 2 431 0 1304 08f8 1000A0E3 mov r0, #16 1305 .LVL164: 1306 .L122: 450:lib/vsprintf.c **** } 451:lib/vsprintf.c **** continue; 452:lib/vsprintf.c **** } 453:lib/vsprintf.c **** if (qualifier == 'L') 1307 .loc 2 453 0 1308 08fc 4C0053E3 cmp r3, #76 454:lib/vsprintf.c **** num = va_arg(args, long long); 1309 .loc 2 454 0 1310 0900 07208202 addeq r2, r2, #7 1311 0904 0720C203 biceq r2, r2, #7 1312 0908 08608202 addeq r6, r2, #8 1313 090c 0C009208 ldmeqia r2, {r2-r3} 1314 .LVL165: 1315 0910 1A00000A beq .L152 1316 .LVL166: 1317 .L151: 455:lib/vsprintf.c **** else if (qualifier == 'l') { 1318 .loc 2 455 0 1319 0914 6C0053E3 cmp r3, #108 456:lib/vsprintf.c **** num = va_arg(args, unsigned long); 1320 .loc 2 456 0 1321 0918 04608202 addeq r6, r2, #4 1322 091c 00209205 ldreq r2, [r2, #0] 455:lib/vsprintf.c **** else if (qualifier == 'l') { 1323 .loc 2 455 0 1324 0920 1200000A beq .L156 1325 0924 046082E2 add r6, r2, #4 1326 0928 002092E5 ldr r2, [r2, #0] 457:lib/vsprintf.c **** if (flags & SIGN) 458:lib/vsprintf.c **** num = (signed long) num; 459:lib/vsprintf.c **** } else if (qualifier == 'Z' || qualifier == 'z') { 1327 .loc 2 459 0 1328 092c 5A0053E3 cmp r3, #90 1329 0930 7A005313 cmpne r3, #122 460:lib/vsprintf.c **** num = va_arg(args, size_t); 1330 .loc 2 460 0 1331 0934 0030A003 moveq r3, #0 459:lib/vsprintf.c **** } else if (qualifier == 'Z' || qualifier == 'z') { 1332 .loc 2 459 0 1333 0938 1000000A beq .L152 461:lib/vsprintf.c **** } else if (qualifier == 't') { 1334 .loc 2 461 0 1335 093c 740053E3 cmp r3, #116 1336 0940 0D00000A beq .L170 1337 .L155: 462:lib/vsprintf.c **** num = va_arg(args, ptrdiff_t); 463:lib/vsprintf.c **** } else if (qualifier == 'h') { 1338 .loc 2 463 0 1339 0944 680053E3 cmp r3, #104 1340 0948 0800001A bne .L156 464:lib/vsprintf.c **** num = (unsigned short) va_arg(args, int); 1341 .loc 2 464 0 1342 094c 0228A0E1 mov r2, r2, asl #16 1343 0950 22C8A0E1 mov ip, r2, lsr #16 465:lib/vsprintf.c **** if (flags & SIGN) 1344 .loc 2 465 0 1345 0954 02001AE3 tst sl, #2 464:lib/vsprintf.c **** num = (unsigned short) va_arg(args, int); 1346 .loc 2 464 0 1347 0958 0C20A0E1 mov r2, ip 1348 095c 0030A0E3 mov r3, #0 1349 .LVL167: 466:lib/vsprintf.c **** num = (signed short) num; 1350 .loc 2 466 0 1351 0960 0C28A011 movne r2, ip, asl #16 1352 .LVL168: 1353 0964 4228A011 movne r2, r2, asr #16 465:lib/vsprintf.c **** if (flags & SIGN) 1354 .loc 2 465 0 1355 0968 0300001A bne .L170 1356 096c 030000EA b .L152 1357 .LVL169: 1358 .L156: 467:lib/vsprintf.c **** } else { 468:lib/vsprintf.c **** num = va_arg(args, unsigned int); 469:lib/vsprintf.c **** if (flags & SIGN) 1359 .loc 2 469 0 1360 0970 02001AE3 tst sl, #2 468:lib/vsprintf.c **** num = va_arg(args, unsigned int); 1361 .loc 2 468 0 1362 0974 0030A0E3 mov r3, #0 1363 .LVL170: 1364 .loc 2 469 0 1365 0978 0000000A beq .L152 1366 .LVL171: 1367 .L170: 470:lib/vsprintf.c **** num = (signed int) num; 1368 .loc 2 470 0 1369 097c C23FA0E1 mov r3, r2, asr #31 1370 .LVL172: 1371 .L152: 471:lib/vsprintf.c **** } 472:lib/vsprintf.c **** str = number(str, end, num, base, 1372 .loc 2 472 0 1373 0980 04908DE5 str r9, [sp, #4] 1374 0984 0CA08DE5 str sl, [sp, #12] 1375 0988 00008DE5 str r0, [sp, #0] 1376 098c 08108DE5 str r1, [sp, #8] 1377 0990 0800A0E1 mov r0, r8 1378 .LVL173: 1379 0994 0410A0E1 mov r1, r4 1380 .LVL174: 1381 .L176: 1382 0998 AFFDFFEB bl number 1383 .LVL175: 1384 099c 0080A0E1 mov r8, r0 1385 .LVL176: 1386 .L172: 1387 09a0 0620A0E1 mov r2, r6 1388 .L95: 283:lib/vsprintf.c **** for (; *fmt ; ++fmt) { 1389 .loc 2 283 0 1390 09a4 14309DE5 ldr r3, [sp, #20] 1391 09a8 013083E2 add r3, r3, #1 1392 09ac 14308DE5 str r3, [sp, #20] 1393 09b0 0260A0E1 mov r6, r2 1394 .LVL177: 1395 .L91: 283:lib/vsprintf.c **** for (; *fmt ; ++fmt) { 1396 .loc 2 283 0 is_stmt 0 discriminator 1 1397 09b4 14309DE5 ldr r3, [sp, #20] 1398 09b8 0030D3E5 ldrb r3, [r3, #0] @ zero_extendqisi2 1399 09bc 000053E3 cmp r3, #0 1400 09c0 D7FEFF1A bne .L157 473:lib/vsprintf.c **** field_width, precision, flags); 474:lib/vsprintf.c **** } 475:lib/vsprintf.c **** if (str <= end) 1401 .loc 2 475 0 is_stmt 1 1402 09c4 040058E1 cmp r8, r4 476:lib/vsprintf.c **** *str = '\0'; 1403 .loc 2 476 0 1404 09c8 0030C895 strlsb r3, [r8, #0] 475:lib/vsprintf.c **** if (str <= end) 1405 .loc 2 475 0 1406 09cc 0100009A bls .L159 477:lib/vsprintf.c **** else if (size > 0) 1407 .loc 2 477 0 1408 09d0 000057E3 cmp r7, #0 478:lib/vsprintf.c **** /* don't write out a null byte if the buf size is zero */ 479:lib/vsprintf.c **** *end = '\0'; 1409 .loc 2 479 0 1410 09d4 0030C415 strneb r3, [r4, #0] 1411 .L159: 480:lib/vsprintf.c **** /* the trailing null byte doesn't count towards the total 481:lib/vsprintf.c **** * ++str; 482:lib/vsprintf.c **** */ 483:lib/vsprintf.c **** return str-buf; 1412 .loc 2 483 0 1413 09d8 080065E0 rsb r0, r5, r8 1414 .LVL178: 1415 .L89: 484:lib/vsprintf.c **** } 1416 .loc 2 484 0 1417 09dc 1CD08DE2 add sp, sp, #28 1418 09e0 F04FBDE8 ldmfd sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1419 09e4 1EFF2FE1 bx lr 1420 .L182: 1421 .align 2 1422 .L181: 1423 09e8 00000000 .word _ctype 1424 .cfi_endproc 1425 .LFE8: 1427 .align 2 1428 .global vscnprintf 1430 vscnprintf: 1431 .LFB9: 485:lib/vsprintf.c **** 486:lib/vsprintf.c **** 487:lib/vsprintf.c **** /** 488:lib/vsprintf.c **** * vscnprintf - Format a string and place it in a buffer 489:lib/vsprintf.c **** * @buf: The buffer to place the result into 490:lib/vsprintf.c **** * @size: The size of the buffer, including the trailing null space 491:lib/vsprintf.c **** * @fmt: The format string to use 492:lib/vsprintf.c **** * @args: Arguments for the format string 493:lib/vsprintf.c **** * 494:lib/vsprintf.c **** * The return value is the number of characters which have been written into 495:lib/vsprintf.c **** * the @buf not including the trailing '\0'. If @size is <= 0 the function 496:lib/vsprintf.c **** * returns 0. 497:lib/vsprintf.c **** * 498:lib/vsprintf.c **** * Call this function if you are already dealing with a va_list. 499:lib/vsprintf.c **** * You probably want scnprintf instead. 500:lib/vsprintf.c **** */ 501:lib/vsprintf.c **** int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) 502:lib/vsprintf.c **** { 1432 .loc 2 502 0 1433 .cfi_startproc 1434 @ Function supports interworking. 1435 @ args = 0, pretend = 0, frame = 0 1436 @ frame_needed = 0, uses_anonymous_args = 0 1437 .LVL179: 1438 09ec 10402DE9 stmfd sp!, {r4, lr} 1439 .LCFI8: 1440 .cfi_def_cfa_offset 8 1441 .loc 2 502 0 1442 09f0 0140A0E1 mov r4, r1 1443 .cfi_offset 14, -4 1444 .cfi_offset 4, -8 503:lib/vsprintf.c **** unsigned int i; 504:lib/vsprintf.c **** 505:lib/vsprintf.c **** i=vsnprintf(buf,size,fmt,args); 1445 .loc 2 505 0 1446 09f4 FEFFFFEB bl vsnprintf 1447 .LVL180: 506:lib/vsprintf.c **** return (i >= size) ? (size - 1) : i; 1448 .loc 2 506 0 1449 09f8 040050E1 cmp r0, r4 1450 09fc 01004422 subcs r0, r4, #1 1451 .LVL181: 507:lib/vsprintf.c **** } 1452 .loc 2 507 0 1453 0a00 1040BDE8 ldmfd sp!, {r4, lr} 1454 0a04 1EFF2FE1 bx lr 1455 .cfi_endproc 1456 .LFE9: 1458 .align 2 1459 .global snprintf 1461 snprintf: 1462 .LFB10: 508:lib/vsprintf.c **** 509:lib/vsprintf.c **** 510:lib/vsprintf.c **** /** 511:lib/vsprintf.c **** * snprintf - Format a string and place it in a buffer 512:lib/vsprintf.c **** * @buf: The buffer to place the result into 513:lib/vsprintf.c **** * @size: The size of the buffer, including the trailing null space 514:lib/vsprintf.c **** * @fmt: The format string to use 515:lib/vsprintf.c **** * @...: Arguments for the format string 516:lib/vsprintf.c **** * 517:lib/vsprintf.c **** * The return value is the number of characters which would be 518:lib/vsprintf.c **** * generated for the given input, excluding the trailing null, 519:lib/vsprintf.c **** * as per ISO C99. If the return is greater than or equal to 520:lib/vsprintf.c **** * @size, the resulting string is truncated. 521:lib/vsprintf.c **** */ 522:lib/vsprintf.c **** int snprintf(char * buf, size_t size, const char *fmt, ...) 523:lib/vsprintf.c **** { 1463 .loc 2 523 0 1464 .cfi_startproc 1465 @ Function supports interworking. 1466 @ args = 4, pretend = 8, frame = 8 1467 @ frame_needed = 0, uses_anonymous_args = 1 1468 .LVL182: 1469 0a08 0C002DE9 stmfd sp!, {r2, r3} 1470 .LCFI9: 1471 .cfi_def_cfa_offset 8 1472 0a0c 07402DE9 stmfd sp!, {r0, r1, r2, lr} 1473 .LCFI10: 1474 .cfi_def_cfa_offset 24 524:lib/vsprintf.c **** va_list args; 525:lib/vsprintf.c **** int i; 526:lib/vsprintf.c **** 527:lib/vsprintf.c **** va_start(args, fmt); 528:lib/vsprintf.c **** i=vsnprintf(buf,size,fmt,args); 1475 .loc 2 528 0 1476 0a10 10209DE5 ldr r2, [sp, #16] 1477 .cfi_offset 14, -12 1478 .cfi_offset 1, -20 1479 .cfi_offset 0, -24 1480 .cfi_offset 3, -4 1481 .cfi_offset 2, -16 527:lib/vsprintf.c **** va_start(args, fmt); 1482 .loc 2 527 0 1483 0a14 14308DE2 add r3, sp, #20 1484 0a18 04308DE5 str r3, [sp, #4] 1485 .loc 2 528 0 1486 0a1c FEFFFFEB bl vsnprintf 1487 .LVL183: 529:lib/vsprintf.c **** va_end(args); 530:lib/vsprintf.c **** return i; 531:lib/vsprintf.c **** } 1488 .loc 2 531 0 1489 0a20 0E40BDE8 ldmfd sp!, {r1, r2, r3, lr} 1490 0a24 08D08DE2 add sp, sp, #8 1491 0a28 1EFF2FE1 bx lr 1492 .cfi_endproc 1493 .LFE10: 1495 .align 2 1496 .global scnprintf 1498 scnprintf: 1499 .LFB11: 532:lib/vsprintf.c **** 533:lib/vsprintf.c **** 534:lib/vsprintf.c **** /** 535:lib/vsprintf.c **** * scnprintf - Format a string and place it in a buffer 536:lib/vsprintf.c **** * @buf: The buffer to place the result into 537:lib/vsprintf.c **** * @size: The size of the buffer, including the trailing null space 538:lib/vsprintf.c **** * @fmt: The format string to use 539:lib/vsprintf.c **** * @...: Arguments for the format string 540:lib/vsprintf.c **** * 541:lib/vsprintf.c **** * The return value is the number of characters written into @buf not including 542:lib/vsprintf.c **** * the trailing '\0'. If @size is <= 0 the function returns 0. If the return is 543:lib/vsprintf.c **** * greater than or equal to @size, the resulting string is truncated. 544:lib/vsprintf.c **** */ 545:lib/vsprintf.c **** 546:lib/vsprintf.c **** int scnprintf(char * buf, size_t size, const char *fmt, ...) 547:lib/vsprintf.c **** { 1500 .loc 2 547 0 1501 .cfi_startproc 1502 @ Function supports interworking. 1503 @ args = 4, pretend = 8, frame = 8 1504 @ frame_needed = 0, uses_anonymous_args = 1 1505 .LVL184: 1506 0a2c 0C002DE9 stmfd sp!, {r2, r3} 1507 .LCFI11: 1508 .cfi_def_cfa_offset 8 1509 0a30 13402DE9 stmfd sp!, {r0, r1, r4, lr} 1510 .LCFI12: 1511 .cfi_def_cfa_offset 24 548:lib/vsprintf.c **** va_list args; 549:lib/vsprintf.c **** unsigned int i; 550:lib/vsprintf.c **** 551:lib/vsprintf.c **** va_start(args, fmt); 552:lib/vsprintf.c **** i = vsnprintf(buf, size, fmt, args); 1512 .loc 2 552 0 1513 0a34 10209DE5 ldr r2, [sp, #16] 1514 .cfi_offset 14, -12 1515 .cfi_offset 4, -16 1516 .cfi_offset 1, -20 1517 .cfi_offset 0, -24 1518 .cfi_offset 3, -4 1519 .cfi_offset 2, -8 551:lib/vsprintf.c **** va_start(args, fmt); 1520 .loc 2 551 0 1521 0a38 14308DE2 add r3, sp, #20 547:lib/vsprintf.c **** { 1522 .loc 2 547 0 1523 0a3c 0140A0E1 mov r4, r1 551:lib/vsprintf.c **** va_start(args, fmt); 1524 .loc 2 551 0 1525 0a40 04308DE5 str r3, [sp, #4] 1526 .loc 2 552 0 1527 0a44 FEFFFFEB bl vsnprintf 1528 .LVL185: 553:lib/vsprintf.c **** va_end(args); 554:lib/vsprintf.c **** return (i >= size) ? (size - 1) : i; 1529 .loc 2 554 0 1530 0a48 040050E1 cmp r0, r4 1531 0a4c 01004422 subcs r0, r4, #1 1532 .LVL186: 555:lib/vsprintf.c **** } 1533 .loc 2 555 0 1534 0a50 1C40BDE8 ldmfd sp!, {r2, r3, r4, lr} 1535 0a54 08D08DE2 add sp, sp, #8 1536 0a58 1EFF2FE1 bx lr 1537 .cfi_endproc 1538 .LFE11: 1540 .align 2 1541 .global vsprintf 1543 vsprintf: 1544 .LFB12: 556:lib/vsprintf.c **** 557:lib/vsprintf.c **** /** 558:lib/vsprintf.c **** * vsprintf - Format a string and place it in a buffer 559:lib/vsprintf.c **** * @buf: The buffer to place the result into 560:lib/vsprintf.c **** * @fmt: The format string to use 561:lib/vsprintf.c **** * @args: Arguments for the format string 562:lib/vsprintf.c **** * 563:lib/vsprintf.c **** * The function returns the number of characters written 564:lib/vsprintf.c **** * into @buf. Use vsnprintf or vscnprintf in order to avoid 565:lib/vsprintf.c **** * buffer overflows. 566:lib/vsprintf.c **** * 567:lib/vsprintf.c **** * Call this function if you are already dealing with a va_list. 568:lib/vsprintf.c **** * You probably want sprintf instead. 569:lib/vsprintf.c **** */ 570:lib/vsprintf.c **** int vsprintf(char *buf, const char *fmt, va_list args) 571:lib/vsprintf.c **** { 1545 .loc 2 571 0 1546 .cfi_startproc 1547 @ Function supports interworking. 1548 @ args = 0, pretend = 0, frame = 0 1549 @ frame_needed = 0, uses_anonymous_args = 0 1550 @ link register save eliminated. 1551 .LVL187: 1552 .loc 2 571 0 1553 0a5c 01C0A0E1 mov ip, r1 1554 0a60 0230A0E1 mov r3, r2 572:lib/vsprintf.c **** return vsnprintf(buf, INT_MAX, fmt, args); 1555 .loc 2 572 0 1556 0a64 0211E0E3 mvn r1, #-2147483648 1557 .LVL188: 1558 0a68 0C20A0E1 mov r2, ip 1559 .LVL189: 573:lib/vsprintf.c **** } 1560 .loc 2 573 0 572:lib/vsprintf.c **** return vsnprintf(buf, INT_MAX, fmt, args); 1561 .loc 2 572 0 1562 0a6c FEFFFFEA b vsnprintf 1563 .cfi_endproc 1564 .LFE12: 1566 .align 2 1567 .global sprintf 1569 sprintf: 1570 .LFB13: 574:lib/vsprintf.c **** 575:lib/vsprintf.c **** 576:lib/vsprintf.c **** /** 577:lib/vsprintf.c **** * sprintf - Format a string and place it in a buffer 578:lib/vsprintf.c **** * @buf: The buffer to place the result into 579:lib/vsprintf.c **** * @fmt: The format string to use 580:lib/vsprintf.c **** * @...: Arguments for the format string 581:lib/vsprintf.c **** * 582:lib/vsprintf.c **** * The function returns the number of characters written 583:lib/vsprintf.c **** * into @buf. Use snprintf or scnprintf in order to avoid 584:lib/vsprintf.c **** * buffer overflows. 585:lib/vsprintf.c **** */ 586:lib/vsprintf.c **** int sprintf(char * buf, const char *fmt, ...) 587:lib/vsprintf.c **** { 1571 .loc 2 587 0 1572 .cfi_startproc 1573 @ Function supports interworking. 1574 @ args = 4, pretend = 12, frame = 8 1575 @ frame_needed = 0, uses_anonymous_args = 1 1576 .LVL190: 1577 0a70 0E002DE9 stmfd sp!, {r1, r2, r3} 1578 .LCFI13: 1579 .cfi_def_cfa_offset 12 1580 0a74 03402DE9 stmfd sp!, {r0, r1, lr} 1581 .LCFI14: 1582 .cfi_def_cfa_offset 24 588:lib/vsprintf.c **** va_list args; 589:lib/vsprintf.c **** int i; 590:lib/vsprintf.c **** 591:lib/vsprintf.c **** va_start(args, fmt); 592:lib/vsprintf.c **** i=vsnprintf(buf, INT_MAX, fmt, args); 1583 .loc 2 592 0 1584 0a78 0C209DE5 ldr r2, [sp, #12] 1585 .cfi_offset 14, -16 1586 .cfi_offset 0, -24 1587 .cfi_offset 3, -4 1588 .cfi_offset 2, -8 1589 .cfi_offset 1, -20 591:lib/vsprintf.c **** va_start(args, fmt); 1590 .loc 2 591 0 1591 0a7c 10308DE2 add r3, sp, #16 1592 .loc 2 592 0 1593 0a80 0211E0E3 mvn r1, #-2147483648 591:lib/vsprintf.c **** va_start(args, fmt); 1594 .loc 2 591 0 1595 0a84 04308DE5 str r3, [sp, #4] 1596 .loc 2 592 0 1597 0a88 FEFFFFEB bl vsnprintf 1598 .LVL191: 593:lib/vsprintf.c **** va_end(args); 594:lib/vsprintf.c **** return i; 595:lib/vsprintf.c **** } 1599 .loc 2 595 0 1600 0a8c 0C40BDE8 ldmfd sp!, {r2, r3, lr} 1601 0a90 0CD08DE2 add sp, sp, #12 1602 0a94 1EFF2FE1 bx lr 1603 .cfi_endproc 1604 .LFE13: 1606 .align 2 1607 .global vsscanf 1609 vsscanf: 1610 .LFB14: 596:lib/vsprintf.c **** 597:lib/vsprintf.c **** 598:lib/vsprintf.c **** /** 599:lib/vsprintf.c **** * vsscanf - Unformat a buffer into a list of arguments 600:lib/vsprintf.c **** * @buf: input buffer 601:lib/vsprintf.c **** * @fmt: format of buffer 602:lib/vsprintf.c **** * @args: arguments 603:lib/vsprintf.c **** */ 604:lib/vsprintf.c **** int vsscanf(const char * buf, const char * fmt, va_list args) 605:lib/vsprintf.c **** { 1611 .loc 2 605 0 1612 .cfi_startproc 1613 @ Function supports interworking. 1614 @ args = 0, pretend = 0, frame = 16 1615 @ frame_needed = 0, uses_anonymous_args = 0 1616 .LVL192: 1617 0a98 FF412DE9 stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 1618 .LCFI15: 1619 .cfi_def_cfa_offset 40 1620 .LVL193: 1621 .loc 2 605 0 1622 0a9c 0050A0E1 mov r5, r0 1623 .cfi_offset 14, -4 1624 .cfi_offset 8, -8 1625 .cfi_offset 7, -12 1626 .cfi_offset 6, -16 1627 .cfi_offset 5, -20 1628 .cfi_offset 4, -24 1629 .cfi_offset 3, -28 1630 .cfi_offset 2, -32 1631 .cfi_offset 1, -36 1632 .cfi_offset 0, -40 1633 .LVL194: 1634 0aa0 04108DE5 str r1, [sp, #4] 1635 .LVL195: 1636 0aa4 0270A0E1 mov r7, r2 1637 .LVL196: 606:lib/vsprintf.c **** const char *str = buf; 1638 .loc 2 606 0 1639 0aa8 0060A0E1 mov r6, r0 607:lib/vsprintf.c **** char *next; 608:lib/vsprintf.c **** char digit; 609:lib/vsprintf.c **** int num = 0; 1640 .loc 2 609 0 1641 0aac 0040A0E3 mov r4, #0 610:lib/vsprintf.c **** int qualifier; 611:lib/vsprintf.c **** int base; 612:lib/vsprintf.c **** int field_width; 613:lib/vsprintf.c **** int is_sign = 0; 614:lib/vsprintf.c **** 615:lib/vsprintf.c **** while(*fmt && *str) { 1642 .loc 2 615 0 1643 0ab0 300100EA b .L255 1644 .LVL197: 1645 .L248: 616:lib/vsprintf.c **** /* skip any white space in format */ 617:lib/vsprintf.c **** /* white space in format matchs any amount of 618:lib/vsprintf.c **** * white space, including none, in the input. 619:lib/vsprintf.c **** */ 620:lib/vsprintf.c **** if (isspace(*fmt)) { 1646 .loc 2 620 0 1647 0ab4 E8249FE5 ldr r2, .L278 1648 0ab8 0330D2E7 ldrb r3, [r2, r3] @ zero_extendqisi2 1649 0abc 200013E3 tst r3, #32 1650 0ac0 0200001A bne .L192 1651 0ac4 0E0000EA b .L193 1652 .LVL198: 1653 .L194: 621:lib/vsprintf.c **** while (isspace(*fmt)) 622:lib/vsprintf.c **** ++fmt; 1654 .loc 2 622 0 1655 0ac8 013083E2 add r3, r3, #1 1656 0acc 04308DE5 str r3, [sp, #4] 1657 .L192: 621:lib/vsprintf.c **** while (isspace(*fmt)) 1658 .loc 2 621 0 discriminator 1 1659 0ad0 04309DE5 ldr r3, [sp, #4] 1660 0ad4 C8149FE5 ldr r1, .L278 1661 0ad8 0020D3E5 ldrb r2, [r3, #0] @ zero_extendqisi2 1662 0adc 0220D1E7 ldrb r2, [r1, r2] @ zero_extendqisi2 1663 0ae0 200012E3 tst r2, #32 1664 0ae4 F7FFFF1A bne .L194 621:lib/vsprintf.c **** while (isspace(*fmt)) 1665 .loc 2 621 0 is_stmt 0 1666 0ae8 0630A0E1 mov r3, r6 1667 .L195: 621:lib/vsprintf.c **** while (isspace(*fmt)) 1668 .loc 2 621 0 discriminator 1 1669 0aec 0360A0E1 mov r6, r3 1670 .LVL199: 623:lib/vsprintf.c **** while (isspace(*str)) 1671 .loc 2 623 0 is_stmt 1 discriminator 1 1672 0af0 AC149FE5 ldr r1, .L278 1673 0af4 0120D3E4 ldrb r2, [r3], #1 @ zero_extendqisi2 1674 .LVL200: 1675 0af8 0220D1E7 ldrb r2, [r1, r2] @ zero_extendqisi2 1676 0afc 200012E3 tst r2, #32 1677 0b00 F9FFFF1A bne .L195 1678 .L193: 624:lib/vsprintf.c **** ++str; 625:lib/vsprintf.c **** } 626:lib/vsprintf.c **** 627:lib/vsprintf.c **** /* anything that is not a conversion must match exactly */ 628:lib/vsprintf.c **** if (*fmt != '%' && *fmt) { 1679 .loc 2 628 0 1680 0b04 04309DE5 ldr r3, [sp, #4] 1681 0b08 0020D3E5 ldrb r2, [r3, #0] @ zero_extendqisi2 1682 0b0c 000052E3 cmp r2, #0 1683 0b10 25005213 cmpne r2, #37 1684 0b14 0400000A beq .L196 629:lib/vsprintf.c **** if (*fmt++ != *str++) 1685 .loc 2 629 0 1686 0b18 0010D6E5 ldrb r1, [r6, #0] @ zero_extendqisi2 1687 0b1c 013083E2 add r3, r3, #1 1688 0b20 04308DE5 str r3, [sp, #4] 1689 .LVL201: 1690 0b24 010052E1 cmp r2, r1 1691 0b28 A10000EA b .L266 1692 .LVL202: 1693 .L196: 630:lib/vsprintf.c **** break; 631:lib/vsprintf.c **** continue; 632:lib/vsprintf.c **** } 633:lib/vsprintf.c **** 634:lib/vsprintf.c **** if (!*fmt) 1694 .loc 2 634 0 1695 0b2c 000052E3 cmp r2, #0 1696 0b30 1701000A beq .L197 635:lib/vsprintf.c **** break; 636:lib/vsprintf.c **** ++fmt; 1697 .loc 2 636 0 1698 0b34 012083E2 add r2, r3, #1 1699 0b38 04208DE5 str r2, [sp, #4] 637:lib/vsprintf.c **** 638:lib/vsprintf.c **** /* skip this conversion. 639:lib/vsprintf.c **** * advance both strings to next white space 640:lib/vsprintf.c **** */ 641:lib/vsprintf.c **** if (*fmt == '*') { 1700 .loc 2 641 0 1701 0b3c 0130D3E5 ldrb r3, [r3, #1] @ zero_extendqisi2 1702 0b40 2A0053E3 cmp r3, #42 1703 0b44 1600001A bne .L256 1704 0b48 010000EA b .L199 1705 .L203: 642:lib/vsprintf.c **** while (!isspace(*fmt) && *fmt) 643:lib/vsprintf.c **** fmt++; 1706 .loc 2 643 0 1707 0b4c 012082E2 add r2, r2, #1 1708 0b50 04208DE5 str r2, [sp, #4] 1709 .L199: 642:lib/vsprintf.c **** while (!isspace(*fmt) && *fmt) 1710 .loc 2 642 0 discriminator 1 1711 0b54 04209DE5 ldr r2, [sp, #4] 1712 0b58 44149FE5 ldr r1, .L278 1713 0b5c 0030D2E5 ldrb r3, [r2, #0] @ zero_extendqisi2 1714 0b60 0310D1E7 ldrb r1, [r1, r3] @ zero_extendqisi2 1715 0b64 200011E3 tst r1, #32 1716 0b68 0100000A beq .L201 1717 .L204: 1718 0b6c 0630A0E1 mov r3, r6 1719 0b70 020000EA b .L202 1720 .L201: 642:lib/vsprintf.c **** while (!isspace(*fmt) && *fmt) 1721 .loc 2 642 0 is_stmt 0 discriminator 2 1722 0b74 000053E3 cmp r3, #0 1723 0b78 F3FFFF1A bne .L203 1724 0b7c FAFFFFEA b .L204 1725 .L202: 642:lib/vsprintf.c **** while (!isspace(*fmt) && *fmt) 1726 .loc 2 642 0 discriminator 1 1727 0b80 0360A0E1 mov r6, r3 1728 .LVL203: 644:lib/vsprintf.c **** while (!isspace(*str) && *str) 1729 .loc 2 644 0 is_stmt 1 discriminator 1 1730 0b84 18149FE5 ldr r1, .L278 1731 0b88 0120D3E4 ldrb r2, [r3], #1 @ zero_extendqisi2 1732 .LVL204: 1733 0b8c 0210D1E7 ldrb r1, [r1, r2] @ zero_extendqisi2 1734 0b90 200011E3 tst r1, #32 1735 0b94 F700001A bne .L255 1736 .loc 2 644 0 is_stmt 0 discriminator 2 1737 0b98 000052E3 cmp r2, #0 1738 0b9c F7FFFF1A bne .L202 1739 0ba0 F40000EA b .L255 1740 .L256: 1741 .LVL205: 645:lib/vsprintf.c **** str++; 646:lib/vsprintf.c **** continue; 647:lib/vsprintf.c **** } 648:lib/vsprintf.c **** 649:lib/vsprintf.c **** /* get field width */ 650:lib/vsprintf.c **** field_width = -1; 651:lib/vsprintf.c **** if (isdigit(*fmt)) 1742 .loc 2 651 0 is_stmt 1 1743 0ba4 F8239FE5 ldr r2, .L278 1744 0ba8 0330D2E7 ldrb r3, [r2, r3] @ zero_extendqisi2 1745 0bac 040013E3 tst r3, #4 650:lib/vsprintf.c **** field_width = -1; 1746 .loc 2 650 0 1747 0bb0 0000E003 mvneq r0, #0 1748 .loc 2 651 0 652:lib/vsprintf.c **** field_width = skip_atoi(&fmt); 1749 .loc 2 652 0 1750 0bb4 04008D12 addne r0, sp, #4 1751 0bb8 17FDFF1B blne skip_atoi 1752 .LVL206: 1753 .L205: 653:lib/vsprintf.c **** 654:lib/vsprintf.c **** /* get conversion qualifier */ 655:lib/vsprintf.c **** qualifier = -1; 656:lib/vsprintf.c **** if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || 1754 .loc 2 656 0 1755 0bbc 04109DE5 ldr r1, [sp, #4] 1756 0bc0 0030D1E5 ldrb r3, [r1, #0] @ zero_extendqisi2 1757 0bc4 680053E3 cmp r3, #104 1758 0bc8 6C005313 cmpne r3, #108 1759 0bcc 0600000A beq .L206 1760 .loc 2 656 0 is_stmt 0 discriminator 1 1761 0bd0 5A0053E3 cmp r3, #90 1762 0bd4 0400000A beq .L206 1763 0bd8 7A0053E3 cmp r3, #122 1764 0bdc 0200000A beq .L206 1765 0be0 4C0053E3 cmp r3, #76 655:lib/vsprintf.c **** qualifier = -1; 1766 .loc 2 655 0 is_stmt 1 discriminator 1 1767 0be4 0030E013 mvnne r3, #0 1768 .loc 2 656 0 discriminator 1 1769 0be8 0D00001A bne .L207 1770 .L206: 1771 .LVL207: 657:lib/vsprintf.c **** *fmt == 'Z' || *fmt == 'z') { 658:lib/vsprintf.c **** qualifier = *fmt++; 1772 .loc 2 658 0 1773 0bec 012081E2 add r2, r1, #1 1774 0bf0 04208DE5 str r2, [sp, #4] 659:lib/vsprintf.c **** if (qualifier == *fmt) { 1775 .loc 2 659 0 1776 0bf4 0110D1E5 ldrb r1, [r1, #1] @ zero_extendqisi2 1777 0bf8 010053E1 cmp r3, r1 1778 0bfc 0800001A bne .L207 660:lib/vsprintf.c **** if (qualifier == 'h') { 1779 .loc 2 660 0 1780 0c00 680053E3 cmp r3, #104 661:lib/vsprintf.c **** qualifier = 'H'; 662:lib/vsprintf.c **** fmt++; 1781 .loc 2 662 0 1782 0c04 01208202 addeq r2, r2, #1 1783 0c08 04208D05 streq r2, [sp, #4] 661:lib/vsprintf.c **** qualifier = 'H'; 1784 .loc 2 661 0 1785 0c0c 4830A003 moveq r3, #72 1786 .LVL208: 660:lib/vsprintf.c **** if (qualifier == 'h') { 1787 .loc 2 660 0 1788 0c10 0300000A beq .L207 663:lib/vsprintf.c **** } else if (qualifier == 'l') { 1789 .loc 2 663 0 1790 0c14 6C0053E3 cmp r3, #108 1791 .LVL209: 664:lib/vsprintf.c **** qualifier = 'L'; 665:lib/vsprintf.c **** fmt++; 1792 .loc 2 665 0 1793 0c18 01208202 addeq r2, r2, #1 1794 0c1c 04208D05 streq r2, [sp, #4] 664:lib/vsprintf.c **** qualifier = 'L'; 1795 .loc 2 664 0 1796 0c20 4C30A003 moveq r3, #76 1797 .LVL210: 1798 .L207: 666:lib/vsprintf.c **** } 667:lib/vsprintf.c **** } 668:lib/vsprintf.c **** } 669:lib/vsprintf.c **** base = 10; 670:lib/vsprintf.c **** is_sign = 0; 671:lib/vsprintf.c **** 672:lib/vsprintf.c **** if (!*fmt || !*str) 1799 .loc 2 672 0 1800 0c24 04109DE5 ldr r1, [sp, #4] 1801 0c28 0020D1E5 ldrb r2, [r1, #0] @ zero_extendqisi2 1802 0c2c 000052E3 cmp r2, #0 1803 0c30 D700000A beq .L197 1804 .loc 2 672 0 is_stmt 0 discriminator 1 1805 0c34 00C0D6E5 ldrb ip, [r6, #0] @ zero_extendqisi2 1806 0c38 00005CE3 cmp ip, #0 1807 0c3c D400000A beq .L197 673:lib/vsprintf.c **** break; 674:lib/vsprintf.c **** 675:lib/vsprintf.c **** switch(*fmt++) { 1808 .loc 2 675 0 is_stmt 1 1809 0c40 011081E2 add r1, r1, #1 1810 0c44 6E0052E3 cmp r2, #110 1811 0c48 04108DE5 str r1, [sp, #4] 1812 0c4c 4800000A beq .L214 1813 0c50 0B00008A bhi .L218 1814 0c54 630052E3 cmp r2, #99 1815 0c58 1900000A beq .L211 1816 0c5c 0300008A bhi .L219 1817 0c60 250052E3 cmp r2, #37 1818 0c64 5000000A beq .L209 1819 0c68 580052E3 cmp r2, #88 1820 0c6c 0D0000EA b .L259 1821 .L219: 1822 0c70 640052E3 cmp r2, #100 1823 0c74 0F00000A beq .L251 1824 0c78 690052E3 cmp r2, #105 1825 0c7c C400001A bne .L197 1826 0c80 460000EA b .L273 1827 .L218: 1828 0c84 730052E3 cmp r2, #115 1829 0c88 1D00000A beq .L216 1830 0c8c 0200008A bhi .L220 1831 0c90 6F0052E3 cmp r2, #111 1832 0c94 BE00001A bne .L197 1833 0c98 3A0000EA b .L274 1834 .L220: 1835 0c9c 750052E3 cmp r2, #117 1836 0ca0 0200000A beq .L217 1837 0ca4 780052E3 cmp r2, #120 1838 .L259: 1839 0ca8 B900001A bne .L197 1840 0cac 380000EA b .L275 1841 .L217: 670:lib/vsprintf.c **** is_sign = 0; 1842 .loc 2 670 0 1843 0cb0 0010A0E3 mov r1, #0 1844 0cb4 000000EA b .L260 1845 .L251: 676:lib/vsprintf.c **** case 'c': 677:lib/vsprintf.c **** { 678:lib/vsprintf.c **** char *s = (char *) va_arg(args,char*); 679:lib/vsprintf.c **** if (field_width == -1) 680:lib/vsprintf.c **** field_width = 1; 681:lib/vsprintf.c **** do { 682:lib/vsprintf.c **** *s++ = *str++; 683:lib/vsprintf.c **** } while (--field_width > 0 && *str); 684:lib/vsprintf.c **** num++; 685:lib/vsprintf.c **** } 686:lib/vsprintf.c **** continue; 687:lib/vsprintf.c **** case 's': 688:lib/vsprintf.c **** { 689:lib/vsprintf.c **** char *s = (char *) va_arg(args, char *); 690:lib/vsprintf.c **** if(field_width == -1) 691:lib/vsprintf.c **** field_width = INT_MAX; 692:lib/vsprintf.c **** /* first, skip leading white space in buffer */ 693:lib/vsprintf.c **** while (isspace(*str)) 694:lib/vsprintf.c **** str++; 695:lib/vsprintf.c **** 696:lib/vsprintf.c **** /* now copy until next white space */ 697:lib/vsprintf.c **** while (*str && !isspace(*str) && field_width--) { 698:lib/vsprintf.c **** *s++ = *str++; 699:lib/vsprintf.c **** } 700:lib/vsprintf.c **** *s = '\0'; 701:lib/vsprintf.c **** num++; 702:lib/vsprintf.c **** } 703:lib/vsprintf.c **** continue; 704:lib/vsprintf.c **** case 'n': 705:lib/vsprintf.c **** /* return number of characters read so far */ 706:lib/vsprintf.c **** { 707:lib/vsprintf.c **** int *i = (int *)va_arg(args,int*); 708:lib/vsprintf.c **** *i = str - buf; 709:lib/vsprintf.c **** } 710:lib/vsprintf.c **** continue; 711:lib/vsprintf.c **** case 'o': 712:lib/vsprintf.c **** base = 8; 713:lib/vsprintf.c **** break; 714:lib/vsprintf.c **** case 'x': 715:lib/vsprintf.c **** case 'X': 716:lib/vsprintf.c **** base = 16; 717:lib/vsprintf.c **** break; 718:lib/vsprintf.c **** case 'i': 719:lib/vsprintf.c **** base = 0; 720:lib/vsprintf.c **** case 'd': 721:lib/vsprintf.c **** is_sign = 1; 1846 .loc 2 721 0 1847 0cb8 0110A0E3 mov r1, #1 1848 .L260: 669:lib/vsprintf.c **** base = 10; 1849 .loc 2 669 0 1850 0cbc 0A20A0E3 mov r2, #10 1851 0cc0 3E0000EA b .L221 1852 .L211: 1853 .LBB6: 680:lib/vsprintf.c **** field_width = 1; 1854 .loc 2 680 0 1855 0cc4 010070E3 cmn r0, #1 678:lib/vsprintf.c **** char *s = (char *) va_arg(args,char*); 1856 .loc 2 678 0 1857 0cc8 001097E5 ldr r1, [r7, #0] 1858 0ccc 04C087E2 add ip, r7, #4 1859 .LVL211: 680:lib/vsprintf.c **** field_width = 1; 1860 .loc 2 680 0 1861 0cd0 0100A003 moveq r0, #1 1862 .LVL212: 679:lib/vsprintf.c **** if (field_width == -1) 1863 .loc 2 679 0 1864 0cd4 0620A0E1 mov r2, r6 680:lib/vsprintf.c **** field_width = 1; 1865 .loc 2 680 0 1866 0cd8 0630A0E1 mov r3, r6 1867 .LVL213: 1868 .L224: 682:lib/vsprintf.c **** *s++ = *str++; 1869 .loc 2 682 0 discriminator 1 1870 0cdc 0160D3E4 ldrb r6, [r3], #1 @ zero_extendqisi2 683:lib/vsprintf.c **** } while (--field_width > 0 && *str); 1871 .loc 2 683 0 discriminator 1 1872 0ce0 010040E2 sub r0, r0, #1 1873 .LVL214: 1874 0ce4 000050E3 cmp r0, #0 682:lib/vsprintf.c **** *s++ = *str++; 1875 .loc 2 682 0 discriminator 1 1876 0ce8 0160C1E4 strb r6, [r1], #1 1877 .LVL215: 1878 0cec 0360A0E1 mov r6, r3 1879 .LVL216: 683:lib/vsprintf.c **** } while (--field_width > 0 && *str); 1880 .loc 2 683 0 discriminator 1 1881 0cf0 1C0000DA ble .L265 1882 0cf4 0170F2E5 ldrb r7, [r2, #1]! @ zero_extendqisi2 1883 0cf8 000057E3 cmp r7, #0 1884 0cfc F6FFFF1A bne .L224 1885 0d00 180000EA b .L265 1886 .LVL217: 1887 .L216: 1888 .LBE6: 1889 .LBB7: 691:lib/vsprintf.c **** field_width = INT_MAX; 1890 .loc 2 691 0 1891 0d04 010070E3 cmn r0, #1 689:lib/vsprintf.c **** char *s = (char *) va_arg(args, char *); 1892 .loc 2 689 0 1893 0d08 003097E5 ldr r3, [r7, #0] 1894 .LVL218: 1895 0d0c 04C087E2 add ip, r7, #4 1896 .LVL219: 691:lib/vsprintf.c **** field_width = INT_MAX; 1897 .loc 2 691 0 1898 0d10 0201E003 mvneq r0, #-2147483648 1899 .LVL220: 1900 .L226: 690:lib/vsprintf.c **** if(field_width == -1) 1901 .loc 2 690 0 discriminator 1 1902 0d14 0620A0E1 mov r2, r6 1903 .LVL221: 693:lib/vsprintf.c **** while (isspace(*str)) 1904 .loc 2 693 0 discriminator 1 1905 0d18 84729FE5 ldr r7, .L278 1906 0d1c 0110D6E4 ldrb r1, [r6], #1 @ zero_extendqisi2 1907 .LVL222: 1908 0d20 0110D7E7 ldrb r1, [r7, r1] @ zero_extendqisi2 1909 0d24 200011E3 tst r1, #32 1910 0d28 F9FFFF1A bne .L226 1911 0d2c 010000EA b .L227 1912 .LVL223: 1913 .L229: 698:lib/vsprintf.c **** *s++ = *str++; 1914 .loc 2 698 0 1915 0d30 0110C3E4 strb r1, [r3], #1 1916 .LVL224: 697:lib/vsprintf.c **** while (*str && !isspace(*str) && field_width--) { 1917 .loc 2 697 0 1918 0d34 010040E2 sub r0, r0, #1 1919 .LVL225: 1920 .L227: 698:lib/vsprintf.c **** *s++ = *str++; 1921 .loc 2 698 0 discriminator 1 1922 0d38 0260A0E1 mov r6, r2 1923 .LVL226: 697:lib/vsprintf.c **** while (*str && !isspace(*str) && field_width--) { 1924 .loc 2 697 0 discriminator 1 1925 0d3c 0110D2E4 ldrb r1, [r2], #1 @ zero_extendqisi2 1926 .LVL227: 1927 0d40 000051E3 cmp r1, #0 1928 0d44 0500000A beq .L228 697:lib/vsprintf.c **** while (*str && !isspace(*str) && field_width--) { 1929 .loc 2 697 0 is_stmt 0 discriminator 2 1930 0d48 54729FE5 ldr r7, .L278 1931 0d4c 0170D7E7 ldrb r7, [r7, r1] @ zero_extendqisi2 1932 0d50 200017E3 tst r7, #32 1933 0d54 0100001A bne .L228 1934 .LVL228: 697:lib/vsprintf.c **** while (*str && !isspace(*str) && field_width--) { 1935 .loc 2 697 0 discriminator 1 1936 0d58 000050E3 cmp r0, #0 1937 0d5c F3FFFF1A bne .L229 1938 .LVL229: 1939 .L228: 700:lib/vsprintf.c **** *s = '\0'; 1940 .loc 2 700 0 is_stmt 1 1941 0d60 0020A0E3 mov r2, #0 1942 0d64 0020C3E5 strb r2, [r3, #0] 1943 .LVL230: 1944 .L265: 701:lib/vsprintf.c **** num++; 1945 .loc 2 701 0 1946 0d68 014084E2 add r4, r4, #1 1947 .LVL231: 1948 .LBE7: 689:lib/vsprintf.c **** char *s = (char *) va_arg(args, char *); 1949 .loc 2 689 0 1950 0d6c 0C70A0E1 mov r7, ip 703:lib/vsprintf.c **** continue; 1951 .loc 2 703 0 1952 0d70 800000EA b .L255 1953 .LVL232: 1954 .L214: 1955 .LBB8: 708:lib/vsprintf.c **** *i = str - buf; 1956 .loc 2 708 0 1957 0d74 003097E5 ldr r3, [r7, #0] 1958 .LVL233: 1959 0d78 062065E0 rsb r2, r5, r6 1960 0d7c 002083E5 str r2, [r3, #0] 1961 .LBE8: 707:lib/vsprintf.c **** int *i = (int *)va_arg(args,int*); 1962 .loc 2 707 0 1963 0d80 047087E2 add r7, r7, #4 1964 .LVL234: 710:lib/vsprintf.c **** continue; 1965 .loc 2 710 0 1966 0d84 7B0000EA b .L255 1967 .LVL235: 1968 .L274: 670:lib/vsprintf.c **** is_sign = 0; 1969 .loc 2 670 0 1970 0d88 0010A0E3 mov r1, #0 712:lib/vsprintf.c **** base = 8; 1971 .loc 2 712 0 1972 0d8c 0820A0E3 mov r2, #8 713:lib/vsprintf.c **** break; 1973 .loc 2 713 0 1974 0d90 0A0000EA b .L221 1975 .LVL236: 1976 .L275: 670:lib/vsprintf.c **** is_sign = 0; 1977 .loc 2 670 0 1978 0d94 0010A0E3 mov r1, #0 716:lib/vsprintf.c **** base = 16; 1979 .loc 2 716 0 1980 0d98 1020A0E3 mov r2, #16 717:lib/vsprintf.c **** break; 1981 .loc 2 717 0 1982 0d9c 070000EA b .L221 1983 .LVL237: 1984 .L273: 1985 .loc 2 721 0 1986 0da0 0110A0E3 mov r1, #1 719:lib/vsprintf.c **** base = 0; 1987 .loc 2 719 0 1988 0da4 0020A0E3 mov r2, #0 1989 0da8 040000EA b .L221 1990 .LVL238: 1991 .L209: 722:lib/vsprintf.c **** case 'u': 723:lib/vsprintf.c **** break; 724:lib/vsprintf.c **** case '%': 725:lib/vsprintf.c **** /* looking for '%' in str */ 726:lib/vsprintf.c **** if (*str++ != '%') 1992 .loc 2 726 0 1993 0dac 0030D6E5 ldrb r3, [r6, #0] @ zero_extendqisi2 1994 .LVL239: 1995 0db0 250053E3 cmp r3, #37 1996 .LVL240: 1997 .L266: 1998 0db4 7600001A bne .L197 1999 0db8 016086E2 add r6, r6, #1 2000 0dbc 6D0000EA b .L255 2001 .LVL241: 2002 .L221: 727:lib/vsprintf.c **** return num; 728:lib/vsprintf.c **** continue; 729:lib/vsprintf.c **** default: 730:lib/vsprintf.c **** /* invalid format; stop here */ 731:lib/vsprintf.c **** return num; 732:lib/vsprintf.c **** } 733:lib/vsprintf.c **** 734:lib/vsprintf.c **** /* have some sort of integer conversion. 735:lib/vsprintf.c **** * first, skip white space in buffer. 736:lib/vsprintf.c **** */ 737:lib/vsprintf.c **** while (isspace(*str)) 2003 .loc 2 737 0 discriminator 1 2004 0dc0 00C0D6E5 ldrb ip, [r6, #0] @ zero_extendqisi2 2005 0dc4 D8819FE5 ldr r8, .L278 2006 0dc8 0C80D8E7 ldrb r8, [r8, ip] @ zero_extendqisi2 2007 0dcc 200018E3 tst r8, #32 726:lib/vsprintf.c **** if (*str++ != '%') 2008 .loc 2 726 0 discriminator 1 2009 0dd0 0600A0E1 mov r0, r6 2010 .LVL242: 2011 .loc 2 737 0 discriminator 1 2012 0dd4 016086E2 add r6, r6, #1 2013 .LVL243: 2014 0dd8 F8FFFF1A bne .L221 2015 .LVL244: 738:lib/vsprintf.c **** str++; 739:lib/vsprintf.c **** 740:lib/vsprintf.c **** digit = *str; 741:lib/vsprintf.c **** if (is_sign && digit == '-') 2016 .loc 2 741 0 2017 0ddc 2D005CE3 cmp ip, #45 2018 0de0 0060A013 movne r6, #0 2019 0de4 01600102 andeq r6, r1, #1 2020 0de8 000056E3 cmp r6, #0 742:lib/vsprintf.c **** digit = *(str + 1); 2021 .loc 2 742 0 2022 0dec 01C0D015 ldrneb ip, [r0, #1] @ zero_extendqisi2 2023 .LVL245: 743:lib/vsprintf.c **** 744:lib/vsprintf.c **** if (!digit 2024 .loc 2 744 0 2025 0df0 00005CE3 cmp ip, #0 2026 0df4 6600000A beq .L197 745:lib/vsprintf.c **** || (base == 16 && !isxdigit(digit)) 2027 .loc 2 745 0 2028 0df8 100052E3 cmp r2, #16 2029 0dfc 0300001A bne .L231 2030 .loc 2 745 0 is_stmt 0 discriminator 1 2031 0e00 9C619FE5 ldr r6, .L278 2032 0e04 0CC0D6E7 ldrb ip, [r6, ip] @ zero_extendqisi2 2033 .LVL246: 2034 0e08 44001CE3 tst ip, #68 2035 0e0c 130000EA b .L262 2036 .LVL247: 2037 .L231: 746:lib/vsprintf.c **** || (base == 10 && !isdigit(digit)) 2038 .loc 2 746 0 is_stmt 1 2039 0e10 0A0052E3 cmp r2, #10 2040 0e14 0E00000A beq .L261 2041 .L233: 747:lib/vsprintf.c **** || (base == 8 && (!isdigit(digit) || digit > '7')) 2042 .loc 2 747 0 2043 0e18 080052E3 cmp r2, #8 2044 0e1c 0A00001A bne .L234 2045 .loc 2 747 0 is_stmt 0 discriminator 1 2046 0e20 7C619FE5 ldr r6, .L278 2047 0e24 0C60D6E7 ldrb r6, [r6, ip] @ zero_extendqisi2 2048 0e28 040016E3 tst r6, #4 2049 0e2c 0060A013 movne r6, #0 2050 0e30 0160A003 moveq r6, #1 2051 0e34 37005CE3 cmp ip, #55 2052 0e38 06C0A091 movls ip, r6 2053 0e3c 01C08683 orrhi ip, r6, #1 2054 .LVL248: 2055 0e40 00005CE3 cmp ip, #0 2056 0e44 0600000A beq .L232 2057 0e48 510000EA b .L197 2058 .LVL249: 2059 .L234: 748:lib/vsprintf.c **** || (base == 0 && !isdigit(digit))) 2060 .loc 2 748 0 is_stmt 1 2061 0e4c 000052E3 cmp r2, #0 2062 0e50 0300001A bne .L232 2063 .L261: 2064 .loc 2 748 0 is_stmt 0 discriminator 1 2065 0e54 48619FE5 ldr r6, .L278 2066 0e58 0CC0D6E7 ldrb ip, [r6, ip] @ zero_extendqisi2 2067 .LVL250: 2068 0e5c 04001CE3 tst ip, #4 2069 .L262: 2070 0e60 4B00000A beq .L197 2071 .L232: 749:lib/vsprintf.c **** break; 750:lib/vsprintf.c **** 751:lib/vsprintf.c **** switch(qualifier) { 2072 .loc 2 751 0 is_stmt 1 2073 0e64 5A0053E3 cmp r3, #90 2074 0e68 3000000A beq .L238 2075 0e6c 040000CA bgt .L241 2076 0e70 480053E3 cmp r3, #72 2077 0e74 0900000A beq .L236 2078 0e78 4C0053E3 cmp r3, #76 2079 0e7c 2D00001A bne .L235 2080 0e80 1E0000EA b .L276 2081 .L241: 2082 0e84 6C0053E3 cmp r3, #108 2083 0e88 2A00000A beq .L235 2084 0e8c 7A0053E3 cmp r3, #122 2085 0e90 2600000A beq .L238 2086 0e94 680053E3 cmp r3, #104 2087 0e98 2600001A bne .L235 2088 0e9c 0B0000EA b .L277 2089 .L236: 752:lib/vsprintf.c **** case 'H': /* that's 'hh' in format */ 753:lib/vsprintf.c **** if (is_sign) { 2090 .loc 2 753 0 2091 0ea0 000051E3 cmp r1, #0 2092 0ea4 046087E2 add r6, r7, #4 2093 0ea8 0300000A beq .L242 2094 .LBB9: 754:lib/vsprintf.c **** signed char *s = (signed char *) va_arg(args,signed char *); 755:lib/vsprintf.c **** *s = (signed char) simple_strtol(str,&next,base); 2095 .loc 2 755 0 2096 0eac 0C108DE2 add r1, sp, #12 2097 .LVL251: 754:lib/vsprintf.c **** signed char *s = (signed char *) va_arg(args,signed char *); 2098 .loc 2 754 0 2099 0eb0 007097E5 ldr r7, [r7, #0] 2100 .LVL252: 2101 .loc 2 755 0 2102 0eb4 FEFFFFEB bl simple_strtol 2103 .LVL253: 2104 0eb8 020000EA b .L267 2105 .LVL254: 2106 .L242: 2107 .LBE9: 2108 .LBB10: 756:lib/vsprintf.c **** } else { 757:lib/vsprintf.c **** unsigned char *s = (unsigned char *) va_arg(args, unsigned char *); 758:lib/vsprintf.c **** *s = (unsigned char) simple_strtoul(str, &next, base); 2109 .loc 2 758 0 2110 0ebc 0C108DE2 add r1, sp, #12 2111 .LVL255: 757:lib/vsprintf.c **** unsigned char *s = (unsigned char *) va_arg(args, unsigned char *); 2112 .loc 2 757 0 2113 0ec0 007097E5 ldr r7, [r7, #0] 2114 .LVL256: 2115 .loc 2 758 0 2116 0ec4 FEFFFFEB bl simple_strtoul 2117 .LVL257: 2118 .L267: 2119 0ec8 0000C7E5 strb r0, [r7, #0] 2120 0ecc 240000EA b .L263 2121 .LVL258: 2122 .L277: 2123 .LBE10: 759:lib/vsprintf.c **** } 760:lib/vsprintf.c **** break; 761:lib/vsprintf.c **** case 'h': 762:lib/vsprintf.c **** if (is_sign) { 2124 .loc 2 762 0 2125 0ed0 000051E3 cmp r1, #0 2126 0ed4 046087E2 add r6, r7, #4 2127 0ed8 0300000A beq .L244 2128 .LBB11: 763:lib/vsprintf.c **** short *s = (short *) va_arg(args,short *); 764:lib/vsprintf.c **** *s = (short) simple_strtol(str,&next,base); 2129 .loc 2 764 0 2130 0edc 0C108DE2 add r1, sp, #12 2131 .LVL259: 763:lib/vsprintf.c **** short *s = (short *) va_arg(args,short *); 2132 .loc 2 763 0 2133 0ee0 007097E5 ldr r7, [r7, #0] 2134 .LVL260: 2135 .loc 2 764 0 2136 0ee4 FEFFFFEB bl simple_strtol 2137 .LVL261: 2138 0ee8 020000EA b .L270 2139 .LVL262: 2140 .L244: 2141 .LBE11: 2142 .LBB12: 765:lib/vsprintf.c **** } else { 766:lib/vsprintf.c **** unsigned short *s = (unsigned short *) va_arg(args, unsigned short *); 767:lib/vsprintf.c **** *s = (unsigned short) simple_strtoul(str, &next, base); 2143 .loc 2 767 0 2144 0eec 0C108DE2 add r1, sp, #12 2145 .LVL263: 766:lib/vsprintf.c **** unsigned short *s = (unsigned short *) va_arg(args, unsigned short *); 2146 .loc 2 766 0 2147 0ef0 007097E5 ldr r7, [r7, #0] 2148 .LVL264: 2149 .loc 2 767 0 2150 0ef4 FEFFFFEB bl simple_strtoul 2151 .LVL265: 2152 .L270: 2153 0ef8 B000C7E1 strh r0, [r7, #0] @ movhi 2154 0efc 180000EA b .L263 2155 .LVL266: 2156 .L276: 2157 .LBE12: 768:lib/vsprintf.c **** } 769:lib/vsprintf.c **** break; 770:lib/vsprintf.c **** case 'l': 771:lib/vsprintf.c **** if (is_sign) { 772:lib/vsprintf.c **** long *l = (long *) va_arg(args,long *); 773:lib/vsprintf.c **** *l = simple_strtol(str,&next,base); 774:lib/vsprintf.c **** } else { 775:lib/vsprintf.c **** unsigned long *l = (unsigned long*) va_arg(args,unsigned long*); 776:lib/vsprintf.c **** *l = simple_strtoul(str,&next,base); 777:lib/vsprintf.c **** } 778:lib/vsprintf.c **** break; 779:lib/vsprintf.c **** case 'L': 780:lib/vsprintf.c **** if (is_sign) { 2158 .loc 2 780 0 2159 0f00 000051E3 cmp r1, #0 2160 0f04 046087E2 add r6, r7, #4 2161 0f08 0300000A beq .L246 2162 .LBB13: 781:lib/vsprintf.c **** long long *l = (long long*) va_arg(args,long long *); 782:lib/vsprintf.c **** *l = simple_strtoll(str,&next,base); 2163 .loc 2 782 0 2164 0f0c 0C108DE2 add r1, sp, #12 2165 .LVL267: 781:lib/vsprintf.c **** long long *l = (long long*) va_arg(args,long long *); 2166 .loc 2 781 0 2167 0f10 007097E5 ldr r7, [r7, #0] 2168 .LVL268: 2169 .loc 2 782 0 2170 0f14 FEFFFFEB bl simple_strtoll 2171 .LVL269: 2172 0f18 020000EA b .L269 2173 .LVL270: 2174 .L246: 2175 .LBE13: 2176 .LBB14: 783:lib/vsprintf.c **** } else { 784:lib/vsprintf.c **** unsigned long long *l = (unsigned long long*) va_arg(args,unsigned long long*); 785:lib/vsprintf.c **** *l = simple_strtoull(str,&next,base); 2177 .loc 2 785 0 2178 0f1c 0C108DE2 add r1, sp, #12 2179 .LVL271: 784:lib/vsprintf.c **** unsigned long long *l = (unsigned long long*) va_arg(args,unsigned long long*); 2180 .loc 2 784 0 2181 0f20 007097E5 ldr r7, [r7, #0] 2182 .LVL272: 2183 .loc 2 785 0 2184 0f24 FEFFFFEB bl simple_strtoull 2185 .LVL273: 2186 .L269: 2187 0f28 030087E8 stmia r7, {r0-r1} 2188 0f2c 0C0000EA b .L263 2189 .LVL274: 2190 .L238: 2191 .LBE14: 2192 .LBB15: 786:lib/vsprintf.c **** } 787:lib/vsprintf.c **** break; 788:lib/vsprintf.c **** case 'Z': 789:lib/vsprintf.c **** case 'z': 790:lib/vsprintf.c **** { 791:lib/vsprintf.c **** size_t *s = (size_t*) va_arg(args,size_t*); 2193 .loc 2 791 0 2194 0f30 046087E2 add r6, r7, #4 2195 0f34 060000EA b .L247 2196 .L235: 2197 .LBE15: 792:lib/vsprintf.c **** *s = (size_t) simple_strtoul(str,&next,base); 793:lib/vsprintf.c **** } 794:lib/vsprintf.c **** break; 795:lib/vsprintf.c **** default: 796:lib/vsprintf.c **** if (is_sign) { 2198 .loc 2 796 0 2199 0f38 000051E3 cmp r1, #0 2200 0f3c 046087E2 add r6, r7, #4 2201 0f40 0300000A beq .L247 2202 .LBB16: 797:lib/vsprintf.c **** int *i = (int *) va_arg(args, int*); 798:lib/vsprintf.c **** *i = (int) simple_strtol(str,&next,base); 2203 .loc 2 798 0 2204 0f44 0C108DE2 add r1, sp, #12 2205 .LVL275: 797:lib/vsprintf.c **** int *i = (int *) va_arg(args, int*); 2206 .loc 2 797 0 2207 0f48 007097E5 ldr r7, [r7, #0] 2208 .LVL276: 2209 .loc 2 798 0 2210 0f4c FEFFFFEB bl simple_strtol 2211 .LVL277: 2212 0f50 020000EA b .L268 2213 .LVL278: 2214 .L247: 2215 .LBE16: 2216 .LBB17: 799:lib/vsprintf.c **** } else { 800:lib/vsprintf.c **** unsigned int *i = (unsigned int*) va_arg(args, unsigned int*); 801:lib/vsprintf.c **** *i = (unsigned int) simple_strtoul(str,&next,base); 2217 .loc 2 801 0 2218 0f54 0C108DE2 add r1, sp, #12 2219 .LVL279: 800:lib/vsprintf.c **** unsigned int *i = (unsigned int*) va_arg(args, unsigned int*); 2220 .loc 2 800 0 2221 0f58 007097E5 ldr r7, [r7, #0] 2222 .LVL280: 2223 .loc 2 801 0 2224 0f5c FEFFFFEB bl simple_strtoul 2225 .LVL281: 2226 .L268: 2227 0f60 000087E5 str r0, [r7, #0] 2228 .L263: 800:lib/vsprintf.c **** unsigned int *i = (unsigned int*) va_arg(args, unsigned int*); 2229 .loc 2 800 0 2230 0f64 0670A0E1 mov r7, r6 2231 .LBE17: 802:lib/vsprintf.c **** } 803:lib/vsprintf.c **** break; 804:lib/vsprintf.c **** } 805:lib/vsprintf.c **** num++; 806:lib/vsprintf.c **** 807:lib/vsprintf.c **** if (!next) 2232 .loc 2 807 0 2233 0f68 0C609DE5 ldr r6, [sp, #12] 2234 0f6c 000056E3 cmp r6, #0 805:lib/vsprintf.c **** num++; 2235 .loc 2 805 0 2236 0f70 014084E2 add r4, r4, #1 2237 .LVL282: 2238 .loc 2 807 0 2239 0f74 0600000A beq .L197 2240 .LVL283: 2241 .L255: 615:lib/vsprintf.c **** while(*fmt && *str) { 2242 .loc 2 615 0 discriminator 1 2243 0f78 04309DE5 ldr r3, [sp, #4] 2244 0f7c 0030D3E5 ldrb r3, [r3, #0] @ zero_extendqisi2 2245 0f80 000053E3 cmp r3, #0 2246 0f84 0200000A beq .L197 615:lib/vsprintf.c **** while(*fmt && *str) { 2247 .loc 2 615 0 is_stmt 0 discriminator 2 2248 0f88 0020D6E5 ldrb r2, [r6, #0] @ zero_extendqisi2 2249 .LVL284: 2250 0f8c 000052E3 cmp r2, #0 2251 0f90 C7FEFF1A bne .L248 2252 .LVL285: 2253 .L197: 808:lib/vsprintf.c **** break; 809:lib/vsprintf.c **** str = next; 810:lib/vsprintf.c **** } 811:lib/vsprintf.c **** return num; 812:lib/vsprintf.c **** } 2254 .loc 2 812 0 is_stmt 1 2255 0f94 0400A0E1 mov r0, r4 2256 0f98 10D08DE2 add sp, sp, #16 2257 0f9c F041BDE8 ldmfd sp!, {r4, r5, r6, r7, r8, lr} 2258 0fa0 1EFF2FE1 bx lr 2259 .L279: 2260 .align 2 2261 .L278: 2262 0fa4 00000000 .word _ctype 2263 .cfi_endproc 2264 .LFE14: 2266 .align 2 2267 .global sscanf 2269 sscanf: 2270 .LFB15: 813:lib/vsprintf.c **** 814:lib/vsprintf.c **** 815:lib/vsprintf.c **** /** 816:lib/vsprintf.c **** * sscanf - Unformat a buffer into a list of arguments 817:lib/vsprintf.c **** * @buf: input buffer 818:lib/vsprintf.c **** * @fmt: formatting of buffer 819:lib/vsprintf.c **** * @...: resulting arguments 820:lib/vsprintf.c **** */ 821:lib/vsprintf.c **** int sscanf(const char * buf, const char * fmt, ...) 822:lib/vsprintf.c **** { 2271 .loc 2 822 0 2272 .cfi_startproc 2273 @ Function supports interworking. 2274 @ args = 4, pretend = 12, frame = 8 2275 @ frame_needed = 0, uses_anonymous_args = 1 2276 .LVL286: 2277 0fa8 0E002DE9 stmfd sp!, {r1, r2, r3} 2278 .LCFI16: 2279 .cfi_def_cfa_offset 12 2280 0fac 03402DE9 stmfd sp!, {r0, r1, lr} 2281 .LCFI17: 2282 .cfi_def_cfa_offset 24 823:lib/vsprintf.c **** va_list args; 824:lib/vsprintf.c **** int i; 825:lib/vsprintf.c **** 826:lib/vsprintf.c **** va_start(args,fmt); 827:lib/vsprintf.c **** i = vsscanf(buf,fmt,args); 2283 .loc 2 827 0 2284 0fb0 0C109DE5 ldr r1, [sp, #12] 2285 .cfi_offset 14, -16 2286 .cfi_offset 0, -24 2287 .cfi_offset 3, -4 2288 .cfi_offset 2, -8 2289 .cfi_offset 1, -20 826:lib/vsprintf.c **** va_start(args,fmt); 2290 .loc 2 826 0 2291 0fb4 10208DE2 add r2, sp, #16 2292 0fb8 04208DE5 str r2, [sp, #4] 2293 .loc 2 827 0 2294 0fbc FEFFFFEB bl vsscanf 2295 .LVL287: 828:lib/vsprintf.c **** va_end(args); 829:lib/vsprintf.c **** return i; 830:lib/vsprintf.c **** } 2296 .loc 2 830 0 2297 0fc0 0C40BDE8 ldmfd sp!, {r2, r3, lr} 2298 0fc4 0CD08DE2 add sp, sp, #12 2299 0fc8 1EFF2FE1 bx lr 2300 .cfi_endproc 2301 .LFE15: 2303 .section .rodata 2304 .set .LANCHOR0,. + 0 2307 large_digits.4362: 2308 0000 30313233 .ascii "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\000" 2308 34353637 2308 38394142 2308 43444546 2308 4748494A 2311 small_digits.4361: 2312 0025 30313233 .ascii "0123456789abcdefghijklmnopqrstuvwxyz\000" 2312 34353637 2312 38396162 2312 63646566 2312 6768696A 2313 .text 2314 .Letext0: DEFINED SYMBOLS *ABS*:00000000 vsprintf.c C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:21 .text:00000000 $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:23 .text:00000000 __toupper C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:47 .text:00000018 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:51 .text:0000001c $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:53 .text:0000001c skip_atoi C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:92 .text:00000058 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:96 .text:0000005c $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:98 .text:0000005c number C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:427 .text:000002a4 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:431 .text:000002a8 $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:434 .text:000002a8 simple_strtoul C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:552 .text:0000037c $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:556 .text:00000380 $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:559 .text:00000380 simple_strtol C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:596 .text:000003ac simple_strtoull C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:731 .text:000004a8 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:735 .text:000004ac $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:738 .text:000004ac simple_strtoll C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:778 .text:000004e4 vsnprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1423 .text:000009e8 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1427 .text:000009ec $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1430 .text:000009ec vscnprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1461 .text:00000a08 snprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1498 .text:00000a2c scnprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1543 .text:00000a5c vsprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1569 .text:00000a70 sprintf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:1609 .text:00000a98 vsscanf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:2262 .text:00000fa4 $d C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:2266 .text:00000fa8 $a C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:2269 .text:00000fa8 sscanf C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:2307 .rodata:00000000 large_digits.4362 C:\Users\netz\AppData\Local\Temp\ccjL0JzD.s:2311 .rodata:00000025 small_digits.4361 .debug_frame:00000010 $d UNDEFINED SYMBOLS _ctype __do_div64 strnlen