Re: Use of unaligned load/stores by compilers

hrubin@stat.purdue.edu (Herman Rubin)
26 Jan 1998 00:52:40 -0500

          From comp.compilers

Related articles
Use of unaligned load/stores by compilers sazal@aol.com (1998-01-24)
Re: Use of unaligned load/stores by compilers falan@inreach.com (Alan Fargusson) (1998-01-25)
Re: Use of unaligned load/stores by compilers corbett@lupa.Eng.Sun.COM (1998-01-25)
Re: Use of unaligned load/stores by compilers hrubin@stat.purdue.edu (1998-01-26)
Re: Use of unaligned load/stores by compilers scott@basis.com (1998-01-30)
Re: Use of unaligned load/stores by compilers reid@micro.ti.com (Reid Tatge) (1998-01-30)
Re: Use of unaligned load/stores by compilers tgl@netcom.com (Tom Lane) (1998-02-01)
Re: Use of unaligned load/stores by compilers albaugh@agames.com (1998-02-01)
Re: Use of unaligned load/stores by compilers hrubin@stat.purdue.edu (1998-02-01)
Re: Use of unaligned load/stores by compilers dlmoore@ix.netcom.com (David L Moore) (1998-02-01)
[1 later articles]
| List of all articles for this month |

From: hrubin@stat.purdue.edu (Herman Rubin)
Newsgroups: comp.compilers
Date: 26 Jan 1998 00:52:40 -0500
Organization: Purdue University Statistics Department
References: 98-01-099
Keywords: architecture

Sazal <sazal@aol.com> wrote:
> I was wondering if anyone can point out the different capacities in
>which compilers use unaligned load/store instructions. So far I have
>seen them used in structure copy blocks. Can a architecture whose
>code is solely generated by compilers live without unaligned
>load/stores. Any references will be greatly apppreciated.




>[Any architecture can live without unaligned loads and stores. The
>IBM 360 didn't have them. (The 370 added them for reasons I don't
>totally grasp.) Most RISC chips don't have them.


>Fortran lets you use equivalence statements to misalign double precision
>floats, other than that I don't know of any languages where misaligned
>data will happen without extraordinary programmer effort. -John]


It depends on what you mean by extraordinary effort. Of course, one
cannot do unaligned loads/stores if the architecture automatically
blocks the process, although one can simulate it without what I would
call extraordinary effort. And, while it is technically not legal in
C, most implementations do not check pointer casts to see if they are
properly aligned. This is certainly not extraordinary effort.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.