From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-Thread: fa528,85404311f8041f7a X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-07-09 01:47:49 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-04!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: Jack Patteeuw Newsgroups: comp.sys.dec,comp.unix.tru64,comp.arch Subject: Re: Compaq kills Alpha Date: Mon, 09 Jul 2001 04:49:40 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <3B497024.84358097@peoplepc.com> Reply-To: jjpatteeuw@nospam.peoplepc.com X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 References: <3B37351D.5080503@cli.de> <4495ef1f.0106281109.4b460a70@posting.google.com> <8PS_6.265783$p33.5339568@news1.sttls1.wa.home.com> <9hhtur$1oj9$2@info.cs.uofs.edu> <9hi2q1$hbs@augusta.math.psu.edu> <9hj3ch$qmi$1@pyrite.mv.net> <_Ay07.62$G_1.10702@newsread2.prod.itd.earthlink.net> <3B462723.8938B09B@peoplepc.com> <3B469F39.618E0ADE@igs.net> <3B46C8C7.E2AFF889@peoplepc.com> <3B471A6C.EE8715F5@igs.net> <1yI17.850$6c1.158549@newsread2.prod.itd.earthlink.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.sys.dec:5411 comp.unix.tru64:3241 comp.arch:13340 mulp wrote: > > "Paul DeMone" wrote in message ... > > > > SPARC always had 8 and 16 bit loads and stores. > > > > > > It is interesting that PowerPC does not have a load or store signed > > > byte > > > > What's the difference between a signed and unsigned store? > > What's the difference between a signed and unsigned load? > > Even C recognizes that fetching/storing a data value, converting to > another type, and using the data are three operations. Combining the > conversion and memory operation into one instruction is at best an > optimization, but in probably makes life a lot more difficult for the > CPU implementer with little value. True, but it also makes life a bit more difficult for the compiler writers and those of us who still write drivers and such in assembly language. The real point is that with as many instruction as PowerPC has (http://e-www.motorola.com/brdata/PDFDB/MICROCONTROLLERS/32-BIT /MPC500_FAMILY/RCPURM.pdf) it does not have an orthogonal set of load/store instructions > > Sign extended byte loads doesn't eliminate the requirement for byte > arithmetic operations, so its necessary to have byte to other type > conversions even with load signed byte. PowerPC and many other RISC architectures, only do 32 (or 64) bit arithmetic. Anything smaller is signed extended (or in PPC terms, algebraic) or zero extended when the value is loaded and "clipped" when the value is stored. So incrementing a byte value requires loading the value (assuming you already have an indirect register set up seeing as there is no such thing as direct addressing) (lzb), sign extending that vale (extsb), adding 1 to it (addi) and the storing the answer (stb). If the value were 16 bits, the lzb, extsb would be replaced by lha. No amount of instruction scheduling will make that extsb go away. Checking for sign overflow is up to the programmer/compiler. Jack Patteeuw