(gdb) si????????????????????? ?
0x000004b4????? 182???????????????????????????? USART1->STATR &= ~(USART_FLAG_TC|USART_FLAG_TXE);
?? 0x000004a8:?????? 83 57 07 80???? lhu???? a5,-2048(a4)
?? 0x000004ac:?????? 42 05?? slli??? a0,a0,0x10
?? 0x000004ae:?????? 41 81?? srli??? a0,a0,0x10
?? 0x000004b0:?????? c2 07?? slli??? a5,a5,0x10
?? 0x000004b2:?????? c1 83?? srli??? a5,a5,0x10
=> 0x000004b4:?????? 93 f7 f7 f3???? andi??? a5,a5,-193
?? 0x000004b8:?????? c2 07?? slli??? a5,a5,0x10
?? 0x000004ba:?????? c1 83?? srli??? a5,a5,0x10
?? 0x000004bc:?????? 23 10 f7 80???? sh????? a5,-2048(a4)
(gdb) source /tmp/print_ax,gdb
a0:00000066; a1:00000000; a2:20000100; a3:40013800;
a4:40014000; a5:00000392; a6:00000000; a7:00000000;
(gdb) x /8wx 0x40013800?????? ?
0x40013800:???? 0x00000392????? 0x00000000????? 0x000001a1????? 0x0000200c
0x40013810:???? 0x00000000????? 0x00000040????? 0x00000000????? 0x00000000
(gdb) si????????????????????? ?
0x000004b8????? 182???????????????????????????? USART1->STATR &= ~(USART_FLAG_TC|USART_FLAG_TXE);
?? 0x000004a8:?????? 83 57 07 80???? lhu???? a5,-2048(a4)? //a0:0x66
?? 0x000004ac:?????? 42 05?? slli??? a0,a0,0x10 //a0:0x660000 a5:0x0392
?? 0x000004ae:?????? 41 81?? srli??? a0,a0,0x10 //a0:0x66
?? 0x000004b0:?????? c2 07?? slli??? a5,a5,0x10 //a5:0x03920000
?? 0x000004b2:?????? c1 83?? srli??? a5,a5,0x10 //a5:0x0392
?? 0x000004b4:?????? 93 f7 f7 f3???? andi??? a5,a5,-193 //0x0312
=> 0x000004b8:?????? c2 07?? slli??? a5,a5,0x10? //0x03120000
?? 0x000004ba:?????? c1 83?? srli??? a5,a5,0x10? //0x0312
?? 0x000004bc:?????? 23 10 f7 80???? sh????? a5,-2048(a4)
(gdb) source /tmp/print_ax,gdb
a0:00000066; a1:00000000; a2:20000100; a3:40013800;
a4:40014000; a5:00000312; a6:00000000; a7:00000000;
不知道為何要加以上這么幾條無效的指令,增加程序還多運(yùn)行時(shí)間。+182>+180>+178>+174>+172>+170>+168>+166>+162>+182>+180>+178>+174>+172>+170>+168>+166>+162>
slli??? a0,a0,0x10
slli??? a0,a0,0x10
slli??? a5,a5,0x10
slli??? a5,a5,0x10
slli??? a5,a5,0x10
slli??? a5,a5,0x10