EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compiler switches on RISC byte alignment
From: "Lawrence T. Hoff" <[email protected]>
To: "Fairley, Diane" <[email protected]>
Cc: Andrew Johnson <[email protected]>, "Dalesio, Leo" <[email protected]>, [email protected]
Date: Thu, 02 Sep 2004 14:56:38 -0400

As far as I know, that is a characteristic of the SPARC processor, and cannot be
influenced by compiler directives. You *can* use byte-oriented instructions on
data which is not on "natural" boundaries. I.e. you could access "lInt" as follows
(from a packed array):


unsigned long int temp;
memcpy(&temp, &testdata.lInt, sizeof(temp));

printf("testdata.lInt = %lu", temp)

HTH -- Larry


does not print the right value. A pointer to an unaligned structure member results in a segment violation.





Replies:
Re: Compiler switches on RISC byte alignment Kay-Uwe Kasemir
References:
RE: Compiler switches on RISC byte alignment Fairley, Diane

Navigate by Date:
Prev: RE: Compiler switches on RISC byte alignment Fairley, Diane
Next: Re: Compiler switches on RISC byte alignment Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Compiler switches on RISC byte alignment Fairley, Diane
Next: Re: Compiler switches on RISC byte alignment Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·