blob: 733e70d86672bef9670e0ebe60c83b9a15d73aee [file] [log] [blame]
<html lang="en">
<head>
<title>Sparc-Aligned-Data - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Sparc_002dDependent.html#Sparc_002dDependent" title="Sparc-Dependent">
<link rel="prev" href="Sparc_002dOpts.html#Sparc_002dOpts" title="Sparc-Opts">
<link rel="next" href="Sparc_002dSyntax.html#Sparc_002dSyntax" title="Sparc-Syntax">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/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>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="Sparc-Aligned-Data"></a>
<a name="Sparc_002dAligned_002dData"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Sparc_002dSyntax.html#Sparc_002dSyntax">Sparc-Syntax</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="Sparc_002dOpts.html#Sparc_002dOpts">Sparc-Opts</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Sparc_002dDependent.html#Sparc_002dDependent">Sparc-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.35.2 Enforcing aligned data</h4>
<p><a name="index-data-alignment-on-SPARC-1633"></a><a name="index-SPARC-data-alignment-1634"></a>SPARC GAS normally permits data to be misaligned. For example, it
permits the <code>.long</code> pseudo-op to be used on a byte boundary.
However, the native SunOS assemblers issue an error when they see
misaligned data.
<p><a name="index-g_t_002d_002denforce_002daligned_002ddata-1635"></a>You can use the <code>--enforce-aligned-data</code> option to make SPARC GAS
also issue an error about misaligned data, just as the SunOS
assemblers do.
<p>The <code>--enforce-aligned-data</code> option is not the default because gcc
issues misaligned data pseudo-ops when it initializes certain packed
data structures (structures defined using the <code>packed</code> attribute).
You may have to assemble with GAS in order to initialize packed data
structures in your own code.
<p><a name="index-SPARC-syntax-1636"></a><a name="index-syntax_002c-SPARC-1637"></a>
</body></html>