This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][RISCV] Add RVDC instruction support for EmulateInstructionRISCV
ClosedPublic

Authored by Emmmer on Jan 4 2023, 1:47 AM.

Details

Summary

RVC is the RISC-V standard compressed instruction-set extension, named "C", which reduces static and dynamic code size by adding short 16-bit instruction encodings for common operations, and RVCD is the compressed "D extension".

And "D extension" is a double-precision floating-point instruction-set extension, which adds double-precision floating-point computational instructions compliant with the IEEE 754-2008 arithmetic standard.

Diff Detail

Event Timeline

Emmmer created this revision.Jan 4 2023, 1:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 1:47 AM
Emmmer requested review of this revision.Jan 4 2023, 1:47 AM
RVC is the RISC-V standard compressed instruction-set extension, named "C", which reduces static and dynamic code size by adding short 16-bit instruction encodings for common operations, and RVCD is the compressed "D extension".

...and the D extension is? So many names :)

lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
321

What's the significance of FLDSP vs FLD? Is one implicitly using the stack pointer?

I guess what you're saying is both versions decode the same way which makes sense to me.

Emmmer marked an inline comment as done.Jan 12 2023, 2:58 AM
Emmmer added inline comments.
lldb/unittests/Instruction/RISCV/TestRISCVEmulator.cpp
321

Yes, FLDSP uses the stack pointer to calculate the offset, C.FLD expands to fld rd, offset(rs1) and C.FSDSP expands to fsd rs2, offset(sp).

Emmmer edited the summary of this revision. (Show Details)Jan 12 2023, 2:59 AM
This revision is now accepted and ready to land.Jan 12 2023, 3:00 AM
This revision was automatically updated to reflect the committed changes.
Emmmer marked an inline comment as done.