by brucehoult · 3y ago · 0 comments
Another protection is that the membership application for RISC-V International includes certification that RISC-V does not infringe on the applicant's own patents. With companies such as Intel, AMD, IBM, Marvell, Microchip, MIPS, nVIDIA, NXP, Qualcomm, Renesas, Samsung, Siemens, Sony, STM, Texas Instruments being members that covers a lot of ground.
The base ISA (up to RV32GC, RV64GC) very deliberately breaks no new ground. It's just smoother, with known potholes filled in.
Many of the optional extensions do break some new ground. The V extension has some unique features, though the basics are inspired by the Cray-1. RVWMO is based on experience gained with ARM and DEC Alpha memory ordering models, but fixing the problems -- and was actually designed by a world-wide group of academic and industry experts. Both of these are examples of something that simply would not be done as well by a small group of people inside a single company, working to a deadline.
Looking at the May 2011 spec (https://www2.eecs.berkeley.edu/Pubs/TechRpts/2011/EECS-2011-...) there is `RDNPC Rd` which simply loads next PC into Rd. So that's 4 bytes different to modern `AUIPC Rd,0`, and functionally identical (other than return address predictor SNAFU) to modern `JAL Rd,.+4` or 2011 `JAL .+4` (only `x1` supported).
So 32 bit PC-relative addressing needed `RDNPC;LUI;ADD` and then `JALR`/load/store vs modern just `AUIPC` before the main instruction.
If there was something before `RDNPC` then it much have been very short-lived!
There is allegedly an earlier RISC-V design here...
https://inst.eecs.berkeley.edu/~cs250/fa10/handouts/lab2-ris...
... but I get "You don't have permission to access this resource."
There is an updated 2011 version which appears to conform to the May 2011 spec. The instruction listing omits load/store byte/half and there is no relative addressing support at all (except `JAL 4`) but that is probably just simplification for a hardware design class.
https://inst.eecs.berkeley.edu/~cs250/fa11/handouts/lab2-ris...
Chris, do you have access to that fa10 version?
I think RDNPC is what I was thinking of, but I can't at all remember what was perceived as "risky" about it. I may be overblowing something from memory. AUIPC is better anyways.
- 2010 opcodes left justified like MIPS, 2011 right justified and a func3 like modern RISC-V .. but rd on the far left, not between func3 and opcode.
- register names in formats changed from xa, xb, xc (dst) to rs1, rs2, rd
- 2010 lw uses xa for dst, sw uses xa for src like MIPS, ARM etc. 2011 has rd always in the same place, with sw using rs2 not rd, like modern RISC-V.
- 2010 jalr has no offset, 2011 has 12 bit offset like now.
- 2010 the literals for ANDI, ORI, XORI are zero-extended, 2011 unspecified (so I think all sign-ext)
- 2010 j/jal have 27 bit offset (28 with shift?), 2011 25 bit field.
- 2010 ADD/SUB/shifts have *W suffixes. 2011 is is like modern RV32.
- 2010 has SRA / SRAI, 2011 only has logical. Possibly just a simplification for the lab.
In what ways?
I thought that it was fairly well understood that LR/SC stuff was suboptimal for (for example) lock-free data structures and that the x86 primitives were quite a bit more suitable for those.
Taking a superficial look at the RVWMO stuff doesn't seem to contradict this.
What am I missing? How was this fixed?
The memory model specifies what happens when you DON'T use atomic ops.