> On Dec 9, 2020, at 9:06 AM, Maciej W. Rozycki <ma...@linux-mips.org> wrote:
>
> On Sat, 28 Nov 2020, Paul Koning wrote:
>
>>> Hmm, I gather those systems are able to run some kind of BSD Unix: don't
>>> they support the r-commands which would allow you to run DejaGNU testing
>>> with a realistic environment PDP-11 hardware would be usually used with,
>>> possibly on actual hardware even? I always feel a bit uneasy about the
>>> accuracy of any simulation (having suffered from bugs in QEMU causing
>>> false negatives in software verification).
>>
>> Fair enough. But SIMH is a full system emulator with a very large
>> amount of history and expertise involved in its creation. It's also
>> known to run every PDP-11 OS and most diagnostics. Yes, it certainly
>> runs BSD 2.x; the reason I didn't use that approach is that I don't know
>> it well.
>
> This all sounds great. Do you happen to know if it is cycle-accurate
> with respect to individual hardware microarchitectures simulated? That
> would be required for performance evaluation of compiler-generated code.
No, it isn't. I believe it just charges one time unit per instruction, with
the possible exception of CIS instructions.
I don't know of any cycle accurate PDP-11 emulators. It's not even clear if it
is possible to build one, given the asynchronous operation of the UNIBUS. It
certainly would be extremely difficult since even the documented timing is
amazingly complex, never mind the possibility that the reality is different
from what is documented.
The pdp11 back end uses a very rough approximation of the documented 11/70
timing, but GCC doesn't make it easy (or maybe not even possible) to use the
full timing details. It's not something I'd expect to refine a whole lot
further.
More interesting would be to tweak the optimizing machinery to improve parts
that either have bitrotted or never actually worked. The code generation for
auto-increment etc. isn't particularly effective and I think that's a known
limitation. Ditto indirect addressing, since few other machines have that.
(VAX does, of course; it might benefit too.) And with LRA things are more
limited still, again this seems to be known and is caused by the focus on
modern machine architectures.
paul