core/com.nokia.carbide.cpp.compiler.doc.user/html/pragmas/p_optimizewithasm.htm
author stechong
Wed, 20 Oct 2010 11:19:31 -0500
changeset 2165 2a7b5eccb0bc
parent 1641 2b3996fc09a1
permissions -rw-r--r--
Keeping PlatSim internal only.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <meta name="LASTUPDATED" content="06/17/05 11:09:43" />
    <title>optimizewithasm</title>
	<link rel="StyleSheet" href="../../book.css" type="text/css"/>
  </head>

<body>
<h3>optimizewithasm</h3>
<p>  Controls optimization of assembly language.  </p>
<h5>Syntax</h5>
  <p class="code">#pragma optimizewithasm on | off | reset
  </p>
  <h5>Targets</h5>
  All platforms.<br />
  <h5>Remarks</h5>
  <p>This #pragma controls whether the optimizer queries the backend compiler for the effects of inline assembly instructions so it can safely perform code motion, dead code removal, and constant propagation that may affect assembly code. This #pragma should usually remain on.</p>
  <p>Use <span class="code">#pragma optimizewithasm on</span> to tell the optimizer it is safe to optimize assembly language statements in C/C++ source code. This is available in the x86 compiler.</p>
  <p>Use <span class="code">#pragma optimizewithasm off</span> to tell the optimizer to explicitly disable several optimizations in functions containing inline assembly to avoid removing or reordering code that might change the bahavior of the inline assembly.</p>
  <p class="note"><strong>NOTE</strong> The backend compiler may have additional options or directives to control optimization of the actual inline assembly code.</p>
  <p>This pragma corresponds to the Inline Assembly settings in the CodeGen panel. To check this setting, use <span class="code">__option (optimizewithasm)</span>, described in <a href="../symbols/sym_settings.htm">Checking Settings</a>. The default setting is <span class="code">off</span>.</p>
  <p></p>
<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>


</body>
</html>