ARM Technical Support Knowledge Articles

VECTOR FLOATING POINT UNIT ON LPC3000

Applies to: RealView C Compiler

Answer


Information in this article applies to:


QUESTION

How can I use the Vector Floating Point (VFP) unit on NXP LPC3000 devices? Is the VFP unit fully supported in the RealView compiler?

ANSWER

Yes, the VFP unit is fully supported on LPC3180 devices. Just enter the following directive under Projects — Options — C/C++ — Misc Controls:

--fpu=vfpv2

The directive may be selectively used for the modules that should use the VFP unit. Other modules (where you may disable the VFP unit during execution) may be translated without this directive.

The directive can be also applied to assembler modules.

You may even inline the sqrt function when you are using the compiler directives under Projects — Options — C/C++ — Misc Controls:

--fpu=vfpv2 --fpmode=fast

When you are using the optimize level 2 or above, the code below will be translated in-line using VFP instructions.

  float f1, f2;
    :
  f1 = f1 * sqrtf (f2);

MORE INFORMATION

Article last edited on: 2007-04-27 15:08:18

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential