home *** CD-ROM | disk | FTP | other *** search
- Path: newsserver.rrzn.uni-hannover.de!tubsibr!duening
- From: duening@ibr.cs.tu-bs.de (Lars Duening)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 5 Jan 1996 14:48:45 GMT
- Organization: TU Braunschweig, Informatik (Bueltenweg), Germany
- Distribution: world
- Message-ID: <4cjdod$j0t@ra.ibr.cs.tu-bs.de>
- References: <john.hendrikx.40ka@grafix.xs4all.nl> <4b77tq$htp@serpens.rhein.de> <MQAQx*XOe@yaps.rhein.de> <4bqhnf$6g5@sunsystem5.informatik.tu-muenchen.de> <jasonb.820051107@cs.uwa.edu.au> <4c9i2l$h3i@sunsystem5.informatik.tu-muenchen.de> <4cf0ep$233@ra.ibr.cs.tu-bs.de> <4cgo3i$b8n@sunsystem5.informatik.tu-muenchen.de>
- Reply-To: duening@ibr.cs.tu-bs.de (Lars Duening)
- NNTP-Posting-Host: kastor.ibr.cs.tu-bs.de
-
- In article <4cgo3i$b8n@sunsystem5.informatik.tu-muenchen.de> fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) writes:
- >Lars Duening (duening@ibr.cs.tu-bs.de) wrote:
- >
- >: That doesn't count because in C you don't need to know if this statement
- >: compiles to a .w, to a .l or even to a .q .
- >
- >but when the .l meets a real-world color-register, you will notice
- >your claim is not always true.
-
- If a have to access hardware registers (never had to so far), I will
- not do this by direct pointers, but instead define a structure
- representing them. This is then the only place where I have to worry
- about .c, .w and .l, everywhere else I can write
- 'chipregs->blt0con = *b++;' and let the compiler figure the rest out.
- HLLs win again here: the compiler will warn if *b is of the wrong
- type, and if I defined the structure wrong (your .w/.l example), I
- just have to correct the structure, not the n statements where it is
- used. And the compiler would even take care of bitshifts where
- necessary.
-
- Your 'move.w (a0)+,(a1)+' doesn't tell you if the '.w' is correct or
- not, unless you read the context and discover that a1 points to the
- chip registers. It doesn't tell you either if the data pointed to by (a0)
- is organized in words or in longwords - it just assumes that it is
- organized in words.
- --
- Lars Duening; duening@ibr.cs.tu-bs.de
-