home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!cunews!nrcnet0!bnrgate!bmerh85!bcars64a!bqneh3!schow
- From: schow@bqneh3.bnr.ca (Stanley T.H. Chow)
- Subject: Program behaviour (was Re: trapping speculative ops
- Message-ID: <1992Aug27.202845.10747@bcars64a.bnr.ca>
- Sender: news@bcars64a.bnr.ca (Usenet News)
- Organization: Bell Northern Research Ltd, Ottawa
- References: <l9q6e0INN919@exodus.Eng.Sun.COM>
- Date: Thu, 27 Aug 1992 20:28:45 GMT
- Lines: 54
-
- In article <l9q6e0INN919@exodus.Eng.Sun.COM> chased@rbbb.Eng.Sun.COM (David Chase) writes:
- >As far as loads and stores go, I am similarly mystified by the
- >insistence that each and every trap from the source program be
- >preserved in "very-optimized" code (not code compiled for debugging,
- >or at a "normal" level of optimization).
-
- Some people (including me), believe that there is only *one* level
- of optimization. One should always ship the same binary that one
- tested; doing otherwise expresses immense faith in the ability of
- one's process to recompile the same source as well as the correctness
- of ones tools - the compilers, optimizes, linkers.
-
- And then there are people who have to debug "very-optimized" code
- because the program must interact with the outside world. E.g., when
- writing a driver for gigabit per seond device, and the CPU chip can
- barely keep up, how do you not debug "very-optimized" code?
-
- Also, there are languages and systems that actually specify the
- behaviour for incorrect programs - typically, trap if dereferencing
- a wild pointer. Given that most MMUs do quite a good job, it is
- strange to force those compilers to generate slower code.
-
- >For instance, (as has been
- >noted by several people before me in more severely refereed forums),
- >if page zero is mapped readable, then you can transform
- > [example deleted]
- >No hardware support is required, but some other traps might be lost.
-
- No hardware support is required in any case. Most systems already
- have an MMU that can map out page zero. The question is whether
- the gain in performance justifies the lost in security. I expect
- different people will answer differently.
-
-
- >Note that the hardware support for what I described above is pretty
- >damn cheap. Note that no changes are needed to the architecture.
-
- I assume you mean no change to "Instruction Set Architecuture". You
- are certainly implying changes to "System Architecture".
-
- >Remember, we've got tools to help us debug our code.
-
- But only during the "debugging phase". What happens when the program
- is released into user hands? OK, for a compiler, you could ask the
- user to send you the source files. What if the program controls a
- chemical plant? Are you going to ask the user to ship you a copy of
- the plant? Some debugging just *have* to be done on the target system.
-
-
- --
- Stanley Chow InterNet: schow@BNR.CA
- Bell Northern Research UUCP: ..!uunet!bnrgate!bqneh3!schow
- (613) 763-2831
- Me? Represent other people? Don't make them laugh so hard.
-