Hacker News
Unearthing my 1996 windowed OS in machine code for Am29000 homebrew computer
taolson
|next
[-]
Very impressive work -- congratulations!
nanochess
|root
|parent
[-]
taolson
|root
|parent
[-]
gr2 and gr3 were used in the 29050 for FP condition code registers, but otherwise I'm pretty sure accessing the rest caused a trap.
Joker_vD
|next
|previous
[-]
Pretty much the only use of "reversed subtraction" instruction on a 3-operand machine is to implement NEG (subtract from immediate zero) and NOT (subtract from immediate -1, which Am29000 can't actually do since it zero-extends the immediates)... but NOT is usually not a very useful operation on its own anyway, especially when you have an actual ANDN instruction (most of the uses of ~ in C are of "var &= ~mask" or "expr & ~mask" variety) and a whole slew of NAND/NOR/XNOR instructions as well. Oh, and also, if you know for sure that your value is either 1 or 0, you can logically negate it by subtracting it from immediate 1.
On the other hand, on a 2-operand machine "SUBR reg, reg" is a surprisingly useful instruction.
> I made a phantom ROM that reads the disk using a special instruction coded in the emulator, and returns on unhandled services.
Really puts into perspective just how useful BIOS/UEFI utilities are, doesn't it? Just give me the device tree info (or the equivalent) and load the bloody OS image, thank you, that's all I need.
> I find fun how they implement the multiplication instruction using a trap and 32 continuous MUL instructions (bit-shifting all the way).
They did division the same way; I believe it was a done as a clever to have an interruptible MULTIPLY/DIVIDE instructions: otherwise, those 32-35 cycle beasts would need some special handling in the pipeline.
ronsor
|root
|parent
[-]
ndiddy
|next
|previous
[-]
rbanffy
|next
|previous
[-]
Would have been an interesting project. Considering the size of the array, I'd be able to control all TVs from the building one block down.
sage981
|next
|previous
[-]
fidotron
|next
|previous
[-]
"The AMD 29000 improved the design by allowing the windows to be of variable size, which helps utilization in the common case where fewer than eight registers are needed for a call. It also separated the registers into a global set of 64, and an additional 128 for the windows."
Amazing stuff. (Both the 29K and the article).
nanochess
|root
|parent
|next
[-]
fidotron
|root
|parent
[-]
The fact you got this stuff working at all is completely mind bending.
rob74
|next
|previous
[-]
The AMD 29k - the fastest CPU you never heard of? No, seriously, I am quite interested in computer hardware, and Computer Architecture by Patterson/Hennessy was required reading during my studies, but I can't say I ever heard of this CPU architecture, which is "based on the seminal Berkeley RISC" (according to https://en.wikipedia.org/wiki/AMD_Am29000). And it seems to have been quite widely used, but not in an actual computer (except for this one)...
AnotherGoodName
|root
|parent
|next
[-]
Well that was basically an am29000 but with an x86 instruction decoder front end. The architecture was that good it was competitive 10years later.
Think of the am29000 as an incredibly influential research project that flowed into all of AMDs future CPUs in some way or another.
taolson
|root
|parent
|next
[-]
The K5 was based upon a 29K-family design, but it was actually an un-released superscalar project code-named "Jaguar", rather than just a 29K with an x86 decoder.
rbanffy
|root
|parent
|next
|previous
[-]
Sad. A 29K saddled with an ugly and kludgy ISA.
rob74
|root
|parent
|previous
[-]
adrian_b
|root
|parent
[-]
AMD bought the company NexGen and K6, K6-2 and K6-III were based on the NexGen design. I had been the happy owner of a K6-2, which did not have the integrated L2 cache of K6-III, but I had a friend who had bought earlier an AMD K5.
The K6 family also did not have successors, as Athlon had a very different microarchitecture, with a lot of inspiration from DEC Alpha.
The AMD K6 family of CPUs has the distinction of being one of the very few modern CPUs that are described in an entire book: "The anatomy of a high-performance microprocessor : a systems perspective" by Bruce Shriver.
I am not aware about any comparable description for any more recent CPU, because nowadays the companies have become much more secretive.
It is likely that the publication of many details about K6 was also approved because it was an architecture abandoned by AMD, as they focused on Athlon for their future (this was not yet known publicly when the book was launched, in 1998).
taolson
|root
|parent
|next
|previous
[-]
gforce_de
|next
|previous
[-]
cyberge99
|next
|previous
[-]
And then came Leisure Suit Larry and the tweenage years.