Keil Logo Arm Logo

Discussion Forum

Keil MDK arm C compiler doesn't optize VLDMIA with register sets

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
fabrice faure
Posted
4-Nov-2011 18:26 GMT
Toolset
ARM
New! Keil MDK arm C compiler doesn't optize VLDMIA with register sets

Keil MDK arm C compiler doesn't optize VLDMIA instructions calls even in -O3 -Otime mode for Cortex M4-F CPU:

In the following example:

float * M = 0x10;
float f1,f2,f3,f4;

f1 = *(M++);
f2 = *(M++);
f3 = *(M++);
f4 = *(M++);

C compiler generates:
0x080005CC ECB40A01 VLDMIA r4!, {s0-s0}
0x080005CC ECB40A01 VLDMIA r4!, {s1-s1}
0x080005CC ECB40A01 VLDMIA r4!, {s2-s2}
0x080005CC ECB40A01 VLDMIA r4!, {s3-s3}

Instead of expected of only following instruction that will have the same result:
0x080005CC ECB40A01 VLDMIA r4!, {s0-s3}

Is there an option to activate this or another way to force it?

Read-Only
Author
IB Shy
Posted
4-Nov-2011 20:34 GMT
Toolset
ARM
New! RE: Keil MDK arm C compiler doesn't optize VLDMIA with register sets

"Is there an option to activate this or another way to force it?"

Yes - Use assembler.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.