📄 xllp_logmessage.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4345
TTL F:\wm520\PLATFORM\intel_dbpxa27x\Public\CSP\ARM\INTEL\PXA27X\XLLP\SOURCE\.\xllp_logmessage.c
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
00000 AREA |.rdata|, DATA, READONLY
|HexCharsUC| DCB "0123456789ABCDEF", 0x0
% 3
|HexCharsLC| DCB "0123456789abcdef", 0x0
; File f:\wm520\platform\intel_dbpxa27x\public\csp\arm\intel\pxa27x\xllp\source\xllp_logmessage.c
00000 AREA |.text| { |PutByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PutByte|, PDATA, SELECTION=5, ASSOC=|.text| { |PutByte| } ; comdat associative
|$T1375| DCD |$L1374|
DCD 0x40000f01
; Function compile flags: /Ogsy
00000 AREA |.text| { |PutByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PutByte| PROC
; 68 : {
00000 |$L1374|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M1372|
00004 e1a0e000 mov lr, r0
; 69 : if (pBD->current_bytes >= pBD->max_bytes)
00008 e5912004 ldr r2, [r1, #4]
0000c e5913000 ldr r3, [r1]
00010 e1520003 cmp r2, r3
; 70 : return(0);
00014 23a00000 movcs r0, #0
; 73 : }
00018 249de004 ldrcs lr, [sp], #4
; 71 : pBD->p[pBD->current_bytes++] = c;
0001c 35913008 ldrcc r3, [r1, #8]
; 72 : return(1);
00020 33a00001 movcc r0, #1
00024 37c2e003 strccb lr, [r2, +r3]
00028 35913004 ldrcc r3, [r1, #4]
0002c 32833001 addcc r3, r3, #1
00030 35813004 strcc r3, [r1, #4]
; 73 : }
00034 349de004 ldrcc lr, [sp], #4
00038 e12fff1e bx lr
0003c |$M1373|
ENDP ; |PutByte|
IMPORT |__security_cookie|
IMPORT |__security_check_cookie|
00000 AREA |.text| { |PutHex| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PutHex|, PDATA, SELECTION=5, ASSOC=|.text| { |PutHex| } ; comdat associative
|$T1405| DCD |$L1404|
DCD 0x40003802
; Function compile flags: /Ogsy
00000 AREA |.text| { |PutHex| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PutHex| PROC
; 79 : {
00000 |$L1404|
00000 e92d4070 stmdb sp!, {r4 - r6, lr}
00004 e24dd00c sub sp, sp, #0xC
00008 |$M1402|
00008 e1a06003 mov r6, r3
0000c e3520000 cmp r2, #0
00010 e59f20c4 ldr r2, [pc, #0xC4]
00014 e5922000 ldr r2, [r2]
00018 e58d2008 str r2, [sp, #8]
; 80 : unsigned char tb[8];
; 81 : const unsigned char *phc;
; 82 : int i;
; 83 :
; 84 : phc = upcase ? HexCharsUC : HexCharsLC;
0001c 059f30b4 ldreq r3, [pc, #0xB4]
00020 159f20b0 ldrne r2, [pc, #0xB0]
; 85 : // put significant digits in temp buffer (from right to left)
; 86 : i = sizeof(tb)-1;
; 87 : while(1)
; 88 : {
; 89 : tb[i] = phc[n & 0xf];
00024 e3a04007 mov r4, #7
00028 02832014 addeq r2, r3, #0x14
0002c e200300f and r3, r0, #0xF
00030 e7d33002 ldrb r3, [r3, +r2]
; 90 : n >>= 4;
00034 e1b00220 movs r0, r0, lsr #4
00038 e5cd3007 strb r3, [sp, #7]
; 91 : if (n == 0)
0003c 0a000008 beq |$L1391|
00040 e28de000 add lr, sp, #0
00044 |$L1134|
; 92 : break;
; 93 : if (i > 0)
00044 e3540000 cmp r4, #0
00048 da000005 ble |$L1391|
0004c e200300f and r3, r0, #0xF
00050 e7d33002 ldrb r3, [r3, +r2]
; 94 : i--;
00054 e2444001 sub r4, r4, #1
00058 e1b00220 movs r0, r0, lsr #4
0005c e7c4300e strb r3, [r4, +lr]
00060 1afffff7 bne |$L1134|
00064 |$L1391|
; 95 : else
; 96 : break;
; 97 : }
; 98 : // i now points to the first non-zero hex char in hb[]
; 99 : if (out_chars != 0)
00064 e3510000 cmp r1, #0
00068 0a00000c beq |$L1385|
; 100 : {
; 101 : int z;
; 102 : if (out_chars > sizeof(tb))
0006c e3510008 cmp r1, #8
; 103 : out_chars = sizeof(tb);
00070 83a01008 movhi r1, #8
; 104 : if (fill == '\0')
; 105 : fill = '0';
; 106 : // calulate number of leading zeroes required
; 107 : z = out_chars - (sizeof(tb) - i);
00074 e0843001 add r3, r4, r1
00078 e3560000 cmp r6, #0
0007c e2435008 sub r5, r3, #8
00080 03a06030 moveq r6, #0x30
00084 ea000003 b |$L1401|
00088 |$L1144|
; 108 : // output leading zeroes
; 109 : while (z-- > 0)
; 110 : PutByte(fill, pBD);
00088 e59d101c ldr r1, [sp, #0x1C]
0008c e1a00006 mov r0, r6
00090 e2455001 sub r5, r5, #1
00094 eb000000 bl PutByte
00098 |$L1401|
00098 e3550000 cmp r5, #0
0009c cafffff9 bgt |$L1144|
000a0 |$L1385|
; 111 : }
; 112 : // output the hex chars
; 113 : while (i < sizeof(tb))
000a0 e3540008 cmp r4, #8
000a4 2a000006 bcs |$L1148|
000a8 e28d5000 add r5, sp, #0
000ac |$L1147|
000ac e7d40005 ldrb r0, [r4, +r5]
; 114 : PutByte(tb[i++], pBD);
000b0 e59d101c ldr r1, [sp, #0x1C]
000b4 eb000000 bl PutByte
000b8 e2844001 add r4, r4, #1
000bc e3540008 cmp r4, #8
000c0 3afffff9 bcc |$L1147|
000c4 |$L1148|
; 79 : {
000c4 e59d0008 ldr r0, [sp, #8]
000c8 eb000000 bl __security_check_cookie
; 115 :
; 116 : return;
; 117 : }
000cc e28dd00c add sp, sp, #0xC
000d0 e8bd4070 ldmia sp!, {r4 - r6, lr}
000d4 e12fff1e bx lr
000d8 |$L1407|
000d8 00000000 DCD |HexCharsUC|
000dc 00000000 DCD |__security_cookie|
000e0 |$M1403|
ENDP ; |PutHex|
00000 AREA |.text| { |PutDecimal| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PutDecimal|, PDATA, SELECTION=5, ASSOC=|.text| { |PutDecimal| } ; comdat associative
|$T1430| DCD |$L1429|
DCD 0x40003d02
; Function compile flags: /Ogsy
00000 AREA |.text| { |PutDecimal| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PutDecimal| PROC
; 120 : {
00000 |$L1429|
00000 e92d47f0 stmdb sp!, {r4 - r10, lr}
00004 e24dd010 sub sp, sp, #0x10
00008 |$M1427|
00008 e1a09003 mov r9, r3
0000c e1a08002 mov r8, r2
00010 e1a07001 mov r7, r1
00014 e59fe0d4 ldr lr, [pc, #0xD4]
00018 e59ee000 ldr lr, [lr]
0001c e58de00c str lr, [sp, #0xC]
; 121 : unsigned char tb[10];
; 122 : int i;
; 123 :
; 124 : // put significant digits in temp buffer (from right to left)
; 125 : i = sizeof(tb)-1;
; 126 : while(1)
; 127 : {
; 128 : tb[i] = (unsigned char)('0' + (n % 10));
00020 e59fa0c4 ldr r10, [pc, #0xC4]
00024 e3a06009 mov r6, #9
00028 e08e5a90 umull r5, lr, r0, r10
0002c e1a041ae mov r4, lr, lsr #3
00030 e084e104 add lr, r4, r4, lsl #2
00034 e040e08e sub lr, r0, lr, lsl #1
00038 e28ee030 add lr, lr, #0x30
; 129 : n /= 10;
0003c e5cde009 strb lr, [sp, #9]
00040 e3540000 cmp r4, #0
; 130 : if (n == 0)
00044 0a00000b beq |$L1418|
00048 e28d0000 add r0, sp, #0
0004c |$L1162|
; 131 : break;
; 132 : if (i > 0)
0004c e3560000 cmp r6, #0
00050 da000008 ble |$L1418|
00054 e0831a94 umull r1, r3, r4, r10
; 133 : i--;
00058 e2466001 sub r6, r6, #1
0005c e1a021a3 mov r2, r3, lsr #3
00060 e0823102 add r3, r2, r2, lsl #2
00064 e0443083 sub r3, r4, r3, lsl #1
00068 e2833030 add r3, r3, #0x30
0006c e1b04002 movs r4, r2
00070 e7c63000 strb r3, [r6, +r0]
00074 1afffff4 bne |$L1162|
00078 |$L1418|
; 134 : else
; 135 : break;
; 136 : }
; 137 : // i now points to the first non-zero decimal char in hb[]
; 138 : if (out_chars != 0)
00078 e3570000 cmp r7, #0
0007c 0a00000c beq |$L1414|
; 139 : {
; 140 : int z;
; 141 : if (out_chars > sizeof(tb))
00080 e357000a cmp r7, #0xA
; 142 : out_chars = sizeof(tb);
00084 83a0700a movhi r7, #0xA
; 143 : if (fill == '\0')
; 144 : fill = ' ';
; 145 : // calulate number of leading fill chars required
; 146 : z = out_chars - (sizeof(tb) - i);
00088 e0863007 add r3, r6, r7
0008c e3580000 cmp r8, #0
00090 e243400a sub r4, r3, #0xA
00094 03a08020 moveq r8, #0x20
00098 ea000003 b |$L1426|
0009c |$L1173|
; 147 : // output leading fill
; 148 : while (z-- > 0)
; 149 : PutByte(fill, pBD);
0009c e1a01009 mov r1, r9
000a0 e1a00008 mov r0, r8
000a4 e2444001 sub r4, r4, #1
000a8 eb000000 bl PutByte
000ac |$L1426|
000ac e3540000 cmp r4, #0
000b0 cafffff9 bgt |$L1173|
000b4 |$L1414|
; 150 : }
; 151 : // output the decimal chars
; 152 : while (i < sizeof(tb))
000b4 e356000a cmp r6, #0xA
000b8 2a000006 bcs |$L1177|
000bc e28d4000 add r4, sp, #0
000c0 |$L1176|
000c0 e7d60004 ldrb r0, [r6, +r4]
; 153 : PutByte(tb[i++], pBD);
000c4 e1a01009 mov r1, r9
000c8 eb000000 bl PutByte
000cc e2866001 add r6, r6, #1
000d0 e356000a cmp r6, #0xA
000d4 3afffff9 bcc |$L1176|
000d8 |$L1177|
; 120 : {
000d8 e59d000c ldr r0, [sp, #0xC]
000dc eb000000 bl __security_check_cookie
; 154 :
; 155 : return;
; 156 : }
000e0 e28dd010 add sp, sp, #0x10
000e4 e8bd47f0 ldmia sp!, {r4 - r10, lr}
000e8 e12fff1e bx lr
000ec |$L1432|
000ec cccccccd DCD 0xcccccccd
000f0 00000000 DCD |__security_cookie|
000f4 |$M1428|
ENDP ; |PutDecimal|
00000 AREA |.text| { |PutString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$PutString|, PDATA, SELECTION=5, ASSOC=|.text| { |PutString| } ; comdat associative
|$T1448| DCD |$L1447|
DCD 0x40001201
; Function compile flags: /Ogsy
00000 AREA |.text| { |PutString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |PutString| PROC
; 159 : {
00000 |$L1447|
00000 e92d4070 stmdb sp!, {r4 - r6, lr}
00004 |$M1445|
00004 e1a05001 mov r5, r1
00008 e1a04000 mov r4, r0
; 160 : unsigned long idcb = pBD->current_bytes;
; 161 : while (*s)
0000c e5956004 ldr r6, [r5, #4]
00010 ea000005 b |$L1444|
00014 |$L1186|
; 162 : {
; 163 : if (PutByte(*s++, pBD) == 0)
00014 e1a01005 mov r1, r5
00018 e1a00003 mov r0, r3
0001c eb000000 bl PutByte
00020 e3500000 cmp r0, #0
00024 e2844001 add r4, r4, #1
00028 0a000002 beq |$L1438|
0002c |$L1444|
0002c e5d43000 ldrb r3, [r4]
00030 e3530000 cmp r3, #0
00034 1afffff6 bne |$L1186|
00038 |$L1438|
; 164 : break;
; 165 : }
; 166 : return(pBD->current_bytes - idcb);
00038 e5953004 ldr r3, [r5, #4]
0003c e0430006 sub r0, r3, r6
; 167 : }
00040 e8bd4070 ldmia sp!, {r4 - r6, lr}
00044 e12fff1e bx lr
00048 |$M1446|
ENDP ; |PutString|
EXPORT |xllp_vsnprintf|
00000 AREA |.text| { |xllp_vsnprintf| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$xllp_vsnprintf|, PDATA, SELECTION=5, ASSOC=|.text| { |xllp_vsnprintf| } ; comdat associative
|$T1498| DCD |$L1497|
DCD 0x4000bb02
; Function compile flags: /Ogsy
00000 AREA |.text| { |xllp_vsnprintf| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |xllp_vsnprintf| PROC
; 170 : {
00000 |$L1497|
00000 e92d4ff0 stmdb sp!, {r4 - r11, lr}
00004 e24dd010 sub sp, sp, #0x10
00008 |$M1495|
00008 e1a06003 mov r6, r3
0000c e1a07002 mov r7, r2
00010 e1a05000 mov r5, r0
; 171 : unsigned char c;
; 172 : unsigned char fill_c;
; 173 : unsigned long width;
; 174 : const unsigned char *pf = pFormat;
; 175 : va_list valist = ap;
; 176 : BUFFER_DESCRIPTOR BD;
; 177 : BUFFER_DESCRIPTOR *pBD = &BD;
; 178 :
; 179 : pBD->current_bytes = 0;
; 180 : pBD->max_bytes = max_bytes - 4; // leave room for '\0' and overflow markers.
; 181 : pBD->p = pBuf;
; 182 :
; 183 : while (*pf)
00014 e5d70000 ldrb r0, [r7]
00018 e3a0e000 mov lr, #0
0001c e2411004 sub r1, r1, #4
00020 e3500000 cmp r0, #0
00024 e58de008 str lr, [sp, #8]
00028 e58d1004 str r1, [sp, #4]
0002c e58d500c str r5, [sp, #0xC]
00030 0a00009c beq |$L1470|
00034 e28da004 add r10, sp, #4
00038 e28db004 add r11, sp, #4
0003c |$L1206|
; 184 : {
; 185 : if (pBD->current_bytes >= pBD->max_bytes)
0003c e15e0001 cmp lr, r1
00040 2a000099 bcs |$L1489|
; 186 : break;
; 187 : c = *pf++;
00044 e4d70001 ldrb r0, [r7], #1
; 188 : switch (c)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -