//------------------------------------------------------------------- int notmain ( void ) { unsigned int ra; unsigned int rb; rb=0xEA000000+((0x8000>>2)-2); for(ra=0x00; ra<0x40; ra+=4) PUT32(ra,rb); uart_init(); hexstring(0x12345678); m4vmov(0xABCDABCD); hexstring(m4add(0x3F800000,0x00000000,0x3F801230,0x3F801110)); m4vmov(0xABCDABCD); hexstring(m4add(0x00012345,0x00000111,0x3F801230,0x3F802220)); m4vmov(0xABCDABCD); hexstring(m4add(0x00000111,0x00012345,0x3F801230,0x3F803330)); m4vmov(0xABCDABCD); hexstring(m4add(0x3F801230,0x3F801110,0x00000111,0x00012345)); m4vmov(0xABCDABCD); hexstring(m4add(0x3F800000,0x00000000,0x3F801230,0x3F804440)); hexstring(0x22222222); m4vmov(0xABCDABCD); hexstring(m4add2(0x3F801230,0x3F805550,0x3F800000,0x00000000)); m4vmov(0xABCDABCD); hexstring(m4add2(0x00000111,0x00012345,0x3F801230,0x3F806660)); m4vmov(0xABCDABCD); hexstring(m4add2(0x3F801230,0x3F807770,0x00000111,0x00012345)); hexstring(0x12345678); return(0); }
//------------------------------------------------------------------- int notmain ( void ) { unsigned int ra; volatile unsigned int beg,end; ra=GET32(RCC_APB1ENR); ra|=1<<3; //enable TIM5 PUT32(RCC_APB1ENR,ra); PUT16(TIM5BASE+0x00,0x0000); PUT16(TIM5BASE+0x00,0x0001); PUT32(CPACR,GET32(CPACR)|(0xF<<20)); clock_init(); uart_init(); hexstring(0x12345678,1); //instruction cache, data cache and prefetch ra=GET32(FLASH_ACR); PUT32(FLASH_ACR,ra|0x700); uart_string("\nHello World!\n"); beg=GET32(TIM5BASE+0x24); ra=add(1,1,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); beg=GET32(TIM5BASE+0x24); ra=add(1,1,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); beg=GET32(TIM5BASE+0x24); ra=m4add(1.0F,1.0F,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); beg=GET32(TIM5BASE+0x24); ra=m4add(1.0F,1.0F,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); beg=GET32(TIM5BASE+0x24); ra=add(1,1,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); beg=GET32(TIM5BASE+0x24); ra=m4add(1.0F,1.0F,LOOPS); end=GET32(TIM5BASE+0x24); hexstring(end-beg,1); hexstring(0x12345678,1); return(0); }