⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gui__memset16.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\gui__memset16.o --depend=.\Obj\gui__memset16.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\Core\GUI__memset16.c]
                          THUMB

                          AREA ||i.GUI__memset16||, CODE, READONLY, ALIGN=1

                  GUI__memset16 PROC
;;;35     */
;;;36     void GUI__memset16(U16 * p, U16 Fill, int NumWords) {
000000  b510              PUSH     {r4,lr}
;;;37       /* Code for 16 bit CPUs */
;;;38       if (sizeof(int) == 2) { /* May some compilers generate a warning at this line: Condition is alwaws true/false */
;;;39         if (NumWords >= 8) {  /* May some compilers generate a warning at this line: Unreachable code */
;;;40           *p++ = Fill;
;;;41           *p++ = Fill;
;;;42           *p++ = Fill;
;;;43           *p++ = Fill;
;;;44           *p++ = Fill;
;;;45           *p++ = Fill;
;;;46           *p++ = Fill;
;;;47           *p++ = Fill;
;;;48           NumWords -= 8;
;;;49         }
;;;50         while (NumWords) {
;;;51           *p++ = Fill;
;;;52           NumWords--;
;;;53         }
;;;54       } else {
;;;55         int NumInts;          /* May some compilers generate a warning at this line: Unreachable code */
;;;56         /* Write 16 bit until we are done or have reached an int boundary */
;;;57         if (2 & (U32)p) {
000002  0783              LSLS     r3,r0,#30
000004  d502              BPL      |L1.12|
;;;58           *p++ = Fill;
000006  f8201b02          STRH     r1,[r0],#2
;;;59           NumWords--;
00000a  1e52              SUBS     r2,r2,#1
                  |L1.12|
;;;60         }
;;;61         /* Write Ints */
;;;62         NumInts = (unsigned)NumWords / (sizeof(int) / 2);
00000c  0853              LSRS     r3,r2,#1
;;;63         if (NumInts) {
00000e  d010              BEQ      |L1.50|
;;;64           int FillInt;
;;;65           int *pInt;
;;;66           FillInt = Fill * 0x10001;
000010  eb014401          ADD      r4,r1,r1,LSL #16
;;;67     
;;;68           pInt = (int*)p;
;;;69           /* Fill large amount of data at a time */
;;;70           if (NumInts >= 4) {
000014  2b04              CMP      r3,#4
000016  db08              BLT      |L1.42|
                  |L1.24|
;;;71             do {
;;;72               *pInt       = FillInt;
;;;73               *(pInt + 1) = FillInt;
000018  6004              STR      r4,[r0,#0]
;;;74               *(pInt + 2) = FillInt;
00001a  6044              STR      r4,[r0,#4]
;;;75               *(pInt + 3) = FillInt;
00001c  6084              STR      r4,[r0,#8]
;;;76               pInt += 4;
00001e  60c4              STR      r4,[r0,#0xc]
000020  3010              ADDS     r0,r0,#0x10
;;;77             } while ((NumInts -= 4) >= 4);
000022  1f1b              SUBS     r3,r3,#4
000024  2b04              CMP      r3,#4
000026  daf7              BGE      |L1.24|
000028  e001              B        |L1.46|
                  |L1.42|
;;;78           }
;;;79           /* Fill one int at a time */
;;;80           while (NumInts) {
;;;81             *pInt++ = FillInt;
00002a  c010              STM      r0!,{r4}
;;;82             NumInts--;
00002c  1e5b              SUBS     r3,r3,#1
                  |L1.46|
00002e  2b00              CMP      r3,#0                 ;80
000030  d1fb              BNE      |L1.42|
                  |L1.50|
;;;83           }
;;;84           p = (U16*)pInt;
;;;85         }
;;;86         /* Fill the remainder */
;;;87         if (NumWords & 1) {
000032  07d2              LSLS     r2,r2,#31
000034  d000              BEQ      |L1.56|
;;;88           *p = Fill;
000036  8001              STRH     r1,[r0,#0]
                  |L1.56|
;;;89         }
;;;90       }
;;;91     }
000038  bd10              POP      {r4,pc}
;;;92     
                          ENDP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -