Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!sdcsvax!sdcc6!calmasd!gjo From: gjo@calmasd.GE.COM (Glenn Olander) Newsgroups: comp.arch Subject: RISC data alignment Message-ID: <2635@calmasd.GE.COM> Date: 23 Jan 88 02:11:23 GMT Reply-To: gjo@calmasd.UUCP (Glenn Olander) Organization: GE Calma, San Diego R&D Lines: 21 Please forgive a possibly neophyte-type question, but is it true that there may be an inherent incompatibility between RISC and conventional machines? In particular, I believe that many RISC machines require data to be aligned on a natural boundary, e.g. longwords must be referenced on a 4-byte boundary. This requires compilers to make accomodations to ensure that such alignment always occurs, even if it means padding a data structure which contains mixed types of data, for example a C structure with a mixture of shorts, longs, and doubles. If this is true, then it would seem to also be true that a C structure could have different lengths, depending on whether it was compiled on a RISC or non-RISC machine. Further, it would seem that if that C structure were written out to a file, it could only be read properly by a machine of the same type as that which wrote it. Does such incompatibilty truly exist? If I create a file on a Sun/4 will I be able to read it on a Sun/3? Glenn Olander GE Calma gjo%calmasd.ge.com@sdcsvax.ucsd.edu