--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/m2pnvhpn5e.fsf%40berkeley.edu.
C.JALRA 11imm —> JALR ra ra imm<<1 #@ reserved full slot. For long or absolute calls, see CALL macro
C.NOT rsd’ —> XORI rsd rsd -1. #@ reserved C.op-imm 2, rs2' field 000. Because not is a basic op and fusion
C.NEG rs2d’* —> SUB rs2d x0 rs2d #@ C.ADDI4SPN rs2d’ 0. Because negative is a basic op and fusion. rs2d' !=0.
C.LPC rd —> AUIPC rd 0 #@ C.LUI rd 0 For pc rel addressing, see LA macro
>>>>> On Wed, 7 Nov 2018 03:15:31 -0800 (PST), Rogier Brussee <rogier....@gmail.com> said:
| This is as good a moment to ask as any.
It might be a good moment, but it's not the right thread. Redirecting.
| Are there plans to fill in (more of) the remaining free slots in the C
| extension once the current version is ratified and now that more experience and
| statistics of use is available?
Yes, but only after more thorough compiler and benchmarking work.
If anyone has realistic source code examples where code size is poor
to add to benchmarking database, this would be useful.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAP8PnuT5NLjOMkwLRdRM5D3OZDemUEXWmhwmr_OwPtGO_m8X5w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/c7a24001-df3a-bf50-1130-a7123281a416%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+unsubscribe@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
It is deliberate decision that the unprivileged manual does not go
into the mechanics of how a given privileged architecture takes a trap
when an exception is raised, so that the unprivileged ISA can be used
with a different privileged architecture.
The RISC-V Reader has some text on this.
We're going to start the public review period of the RISC-V base ISA
and standard extensions. The review period ends December 21, 2018.
Dear all, we would like to re-iterate on the important, in our opinion, issue/omissions of the current spec and propose potential fix.
Copy
operations between FPR and GPR are only defined for cases when XLEN >=FLEN.
Therefore, the architectures with XLEN<FLEN do not have them, including
very, in our opinion, practical RV32FD and RV64Q. In a sense, this makes copy
operations asymmetrical and ISA inconsistent because a bit pattern cannot be
copied from the one register file to another.
This issue had been briefly discussed before, but without acceptable
resolution. We still believe this would be highly beneficial to address this
drawback due to the following reasons:
1. There is currently no standard way to access to FPU registers from Debug
module, except Load/Store instructions through the memory. This will require to
reserve some memory for debug purpose which is limit to use standard debug
module (in accordance with the debug spec, the debug memory is optional)
2. In some cases, through-memory-only FP loads and stores can become a critical
drawback, some examples:
- The memory subsystem is not initialized yet (BIST during system boot)
- The memory reservation for the system debug may conflicts with the system memory map
- The load/store operations will change memory subsystem states: TLB, Caches may be changed during debug session
3. Additionally, FPU register file provides
fast storage with a significant capacity which in many cases can be used to
decrease pressure on general purpose registers (plus the opposite).
4. The current RISC-V Instruction Set Manual says: “the marginal hardware
cost of moving from a 32-bit to a 64-bit integer datapath is low”(Section
12.5). We respectfully disagree, - the move from XLEN 32 to 64 considerably
grows integer pipeline, control logic and execution units. We are estimating
the increase area for practical implementations to be from about 40-50kG. The
processing of the 32-bits data on the 64-bit machine also increases the code
size: the compiler have to add extra instructions to control upper parts of the
registers like sign extension or zero padding. For example, for the Coremark
the 7.1 compiler increases execution code up to 20%.
We maintain RV32FD architectures are practical and useful, specifically in the embedded domain, where 64-bits addressing mode are often an overhead feature, but computations require a double float point precision.
Our
proposal for discussion/inclusion in the spec:
1. moving the double-precision value from the floating-point register to
integer registers:
We propose to read FPR by two instructions:
1. The currently existing instruction FMV.X.W copies less significant bits
(LSB) of D register
2. Reuse opcode of FMV.X.D instruction for RV32 to copy the most significant
bits (MSB) of register D
This approach provides generic mechanism and enables unified FPR access
(mstatus.FS):
| funct7 | rs2 |
rs1 | funct3 | rd | opcode |
| 1110001 | 00000 | rs1 | 000 | rd |
1010011 | FMV.X.D for RV64D
| 1110001 | 00000 | rs1 | 000 | rd |
1010011 | FMVH.X.W
for RV32D (new)
2. moving the double-precision value from integer registers to
floating-point register
We propose to write FPR by a single instruction concatenating values of two X registers.
Instruction FMV.D.X has unused rs2 field (always equal to
0), which can be used to store the second integer operand.
| funct7 | rs2 |
rs1 | funct3 | rd | opcode |
| 1111001 | 00000 | rs1 | 000 | rd |
1010011 | FMV.D.X for RV64D
| 1111001 | rs2 | rs1 |
000 | rd | 1010011 | FMV.D.X for RV32D (new)
Where
rs1 contains 32 MSB of FRD register,
rs2 contains 32 LSB of FRD register.
The result of "fmv.d.x frd,rs1,rs2" is frd = {rs1, rs2};
The same approach can also be applied to RV64Q.
We would like to put this proposal for discussion and potential inclusion in the coming 2.3 spec.
so, let's assume compliance with the current spec: NaN-boxing is
basically, you sign-extend the upper bits of the value (which, if
using FMV.X.W as proposed contains the LSBs of a double-word, so the
sign-extension is likely to be garbage, but that's ok). then, because
you are now writing the *upper* bits, that sign-extension is now
overwritten.
To illustrate clearly, may I propose the following software emulation strategy:
* using an UNMODIFIED current version of spike, implement a software trap emulation of the proposed new instruction, in RV32 mode, placing the 32 bits into the HI word of the 64 bit FP number. This to be written as actual RISCV software, *NOT* by modifying or augmenting spike in any way. The trap may have to switch temporarily to RV64 Mode in order to be able to write to the top 32 bits of the register
* now call the two instructions, in RV32 mode, in the order in which you originally propose.
* note that the standard single precision FMV will DESTROY the top 32 bits by smashing NAN boxing 1s over it.
* now call the two instructions the other way round.
* note that whilst the standard single precision FMV also overwrites the top 32 bits with 1s, the following instruction (the new, emulated one) CORRECTLY overwrites the top 32 bits with the correct data, leaving the 64 bit result intact.
Is that now clear why the order has to be the other way round?
On a side note I did not receive a response regarding the ambiguity surrounding FMV. Has this been noted and taken care of?
L.
L.
--
You received this message because you are subscribed to the Google Groups "RISC-V ISA Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isa-dev+u...@groups.riscv.org.
To post to this group, send email to isa...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/isa-dev/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/c3acc909-3bba-414f-aa62-e1a0f324e4d4%40groups.riscv.org.
On Fri, Jan 18, 2019 at 4:54 AM lkcl <luke.l...@gmail.com> wrote:Dmitri I apologise for not following up to ensure that the reasoning that I gave was clear and fully understood.
To illustrate clearly, may I propose the following software emulation strategy:
* using an UNMODIFIED current version of spike, implement a software trap emulation of the proposed new instruction, in RV32 mode, placing the 32 bits into the HI word of the 64 bit FP number. This to be written as actual RISCV software, *NOT* by modifying or augmenting spike in any way. The trap may have to switch temporarily to RV64 Mode in order to be able to write to the top 32 bits of the register
* now call the two instructions, in RV32 mode, in the order in which you originally propose.
* note that the standard single precision FMV will DESTROY the top 32 bits by smashing NAN boxing 1s over it.
* now call the two instructions the other way round.
* note that whilst the standard single precision FMV also overwrites the top 32 bits with 1s, the following instruction (the new, emulated one) CORRECTLY overwrites the top 32 bits with the correct data, leaving the 64 bit result intact.
Is that now clear why the order has to be the other way round?
On a side note I did not receive a response regarding the ambiguity surrounding FMV. Has this been noted and taken care of?The sentence that says "the bits are not modified" is meant to apply to both instructions in the paragraph. But I can see how you interpreted the sentence as only applying to FMV.W.X. We'll change it to be crystal clear that it applies to both instructions.
On a side note I did not receive a response regarding the ambiguity surrounding FMV. Has this been noted and taken care of?
The sentence that says "the bits are not modified" is meant to apply to both instructions in the paragraph. But I can see how you interpreted the sentence as only applying to FMV.W.X. We'll change it to be crystal clear that it applies to both instructions.Just realized I was looking at v2.2 of the spec, where the two instructions were described in the same paragraph. Post-v2.2, the paragraph was split in two, but the crucial sentence wasn't duplicated. So, it looks like an editing error.
Dear Luke,
After reviewing your comments (thank you for taking time to review, btw), I have impression you may be not understanding it correctly.