<html lang="en">
<head>
<title>CFI directives - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops">
<link rel="prev" href="Comm.html#Comm" title="Comm">
<link rel="next" href="Data.html#Data" title="Data">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
@import url("../raisonance.css");
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<p>
<a name="CFI-directives"></a>
Next:&nbsp;<a rel="next" accesskey="n" href="Data.html#Data">Data</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Comm.html#Comm">Comm</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Pseudo-Ops.html#Pseudo-Ops">Pseudo Ops</a>
<hr>
</div>

<h3 class="section">7.9 <code>.cfi_startproc</code></h3>

<p><a name="index-g_t_0040code_007bcfi_005fstartproc_007d-directive-288"></a><code>.cfi_startproc</code> is used at the beginning of each function that
should have an entry in <code>.eh_frame</code>. It initializes some internal
data structures and emits architecture dependent initial CFI instructions. 
Don't forget to close the function by
<code>.cfi_endproc</code>.

<h3 class="section">7.10 <code>.cfi_endproc</code></h3>

<p><a name="index-g_t_0040code_007bcfi_005fendproc_007d-directive-289"></a><code>.cfi_endproc</code> is used at the end of a function where it closes its
unwind entry previously opened by
<code>.cfi_startproc</code>. and emits it to <code>.eh_frame</code>.

<h3 class="section">7.11 <code>.cfi_def_cfa </code><var>register</var><code>, </code><var>offset</var></h3>

<p><code>.cfi_def_cfa</code> defines a rule for computing CFA as: <i>take
address from </i><var>register</var><i> and add </i><var>offset</var><i> to it</i>.

<h3 class="section">7.12 <code>.cfi_def_cfa_register </code><var>register</var></h3>

<p><code>.cfi_def_cfa_register</code> modifies a rule for computing CFA. From
now on <var>register</var> will be used instead of the old one. Offset
remains the same.

<h3 class="section">7.13 <code>.cfi_def_cfa_offset </code><var>offset</var></h3>

<p><code>.cfi_def_cfa_offset</code> modifies a rule for computing CFA. Register
remains the same, but <var>offset</var> is new. Note that it is the
absolute offset that will be added to a defined register to compute
CFA address.

<h3 class="section">7.14 <code>.cfi_adjust_cfa_offset </code><var>offset</var></h3>

<p>Same as <code>.cfi_def_cfa_offset</code> but <var>offset</var> is a relative
value that is added/substracted from the previous offset.

<h3 class="section">7.15 <code>.cfi_offset </code><var>register</var><code>, </code><var>offset</var></h3>

<p>Previous value of <var>register</var> is saved at offset <var>offset</var> from
CFA.

<h3 class="section">7.16 <code>.cfi_rel_offset </code><var>register</var><code>, </code><var>offset</var></h3>

<p>Previous value of <var>register</var> is saved at offset <var>offset</var> from
the current CFA register.  This is transformed to <code>.cfi_offset</code>
using the known displacement of the CFA register from the CFA. 
This is often easier to use, because the number will match the
code it's annotating.

<h3 class="section">7.17 <code>.cfi_signal_frame</code></h3>

<p>Mark current function as signal trampoline.

<h3 class="section">7.18 <code>.cfi_window_save</code></h3>

<p>SPARC register window has been saved.

<h3 class="section">7.19 <code>.cfi_escape</code> <var>expression</var>[, <small class="dots">...</small>]</h3>

<p>Allows the user to add arbitrary bytes to the unwind info.  One
might use this to add OS-specific CFI opcodes, or generic CFI
opcodes that GAS does not yet support.

   </body></html>

