Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!batcomputer!pyramid!prls!mips!sjc From: sjc@mips.COM (Steve "The" Correll) Newsgroups: comp.arch Subject: Re: RISC data alignment Message-ID: <1506@quacky.mips.COM> Date: 5 Feb 88 08:23:13 GMT References: <2635@calmasd.GE.COM> <28200092@ccvaxa> Lines: 13 In article <28200092@ccvaxa>, aglew@ccvaxa.UUCP writes: ) I have often wanted an optimizing compiler that could take ) struct { long a; int b; long c; char d; } ) which is usually mapped into bytes as AAAABBxxCCCCDxxx ) (on a machine where misaligned accesses are penalized) ) and make it into AAAACCCCBBDx. Note that you'd want to be able to select this optimization independently of others, since it violates the Kernighan & Ritchie statement that the addresses of fields increase from left to right, and a particular program may or may not care about the violation. -- ...decwrl!mips!sjc Steve Correll