From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,33dd5febb8fc0fd0 X-Google-Attributes: gid1164f8,public X-Google-Thread: 105d97,cf27a69d65b9f023 X-Google-Attributes: gid105d97,public X-Google-Thread: 102b75,cf27a69d65b9f023 X-Google-Attributes: gid102b75,public X-Google-Thread: 110292,33dd5febb8fc0fd0 X-Google-Attributes: gid110292,public From: Bernd Paysan Subject: Re: OOO 68k (was: Intel Basic and Applied Research (and the DEC lawsuit)) Date: 1997/06/15 Message-ID: <33A3E5DF.1137B0C5@informatik.tu-muenchen.de>#1/1 X-Deja-AN: 248654135 Distribution: inet References: <5lbm3p$qgn$1@nnrp1.crl.com> <337C6A96.6052F337@cs.wisc.edu> <338B62A4.B014C80B@cs.wisc.edu> <5mrei9$40s@cynic.portal.ca> <3391C732.98803357@cs.wisc.edu> Organization: Bernd Paysan, 81477 Muenchen, Germany Newsgroups: comp.sys.dec,comp.sys.intel,comp.arch,sci.electronics Andy Glew wrote: > Each x86 instruction corresponds to a single sequence of RISCy uops: > > ADD reg, mem > tmp := load( MEM ) > reg := add( reg, tmp ) > > The addressing modes have only limited orthogonality - you only > have to look one or two instruction bytes ahead, to get the MODRM > bit, and you can tell whether it is a REG,REG or REG,MEM form. > > Each VAX/68K addressing mode is potentially a little program of > its own. Each addressing mode corresponds to a variable sequence > of uops. Parsing of the second operand cannot really begin until the > first has been understood. It's a while ago that I programmed 68k, but IMHO you are wrong here. The 68k is more a PDP11-lookalike than a VAX-lookalike. Most 68k instructions are not too far away from x86 instructions (one reg, one mem), important exception: MOVE. To obtain the length of a 68k instruction, you only have to check the first instruction word, and since the 68k designer had limited microcode ROM in mind, it's quite efficient. MOVE has 1, 2, or 3 in the first nibble. Only the offset, the index+offset and the "misc" mode has an extension, and only the "misc" modes have more than one extension words. You have to special check some operations like MOVEM or the divsl/divul operations, but these are multi-cycle anyway, so it's not much of a problem if you can't decode another instruction in that slot. It's a bit different for the new addressing modes on the 68020, but AFAIK these modes are rarely used, since these programs won't run on a 68000 and have a performance hit on the 68040 and 68060. You can convert most 68k ops to the following ROP sequence: tmp1 = load_update(mem) tmp2|reg2 = op(tmp1, reg1) ?store_update(mem, tmp2) Since the 68k has separated A and D regs, it's easy to do the address update in parallel (it doesn't even require an additional port). PA-RISC shows that load/store and update address in one instruction is possible even on RISC machines, and the PA-RISC addressing modes features everything the 68k has (not including the brain damaged 68020 modes). -- Bernd Paysan "Late answers are wrong answers!" http://www.informatik.tu-muenchen.de/~paysan/