Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c6832e1
Introduce C extension; decrease code alignment to 2 bytes
fuad1502 Jul 7, 2025
654c6ae
Utilize C extension for the rest of integer register-register operations
fuad1502 Jul 8, 2025
2aa7717
Apply suggestions from code review
fuad1502 Jul 8, 2025
5924e63
Ensure compressed instructions are not yet used in prolog / epilog ge…
fuad1502 Jul 8, 2025
270a63d
Temporarily disable assertion & return early instead when trying to g…
fuad1502 Jul 8, 2025
e5bf174
Fix missed adjustments to unwind info
fuad1502 Jul 12, 2025
e808e45
Update GCInfoTypes and UnwindInfo to reflect code alignment change
fuad1502 Jul 12, 2025
1bb2dd0
Use unsigned type for RVC reg numbers
fuad1502 Jul 12, 2025
1e578a3
Move _MvAdd & MiscAlu cost calculation to the correct place
fuad1502 Jul 12, 2025
29d7cea
Use labels instead of hard coded branch offsets
fuad1502 Jul 13, 2025
e7894f3
Modify TODO comments to TODO-RISCV64-RVC for C extension specific todos
fuad1502 Jul 13, 2025
c44c5ac
Fix skip calculation in unwinder
fuad1502 Jul 15, 2025
bb47230
Update assumption on RISC-V instruction length
fuad1502 Jul 15, 2025
111af3c
Update minimum code alignment of RISC-V in TargetDetails.cs
fuad1502 Jul 15, 2025
f575559
Update RISC-V ELF header to include RVC bit
fuad1502 Jul 15, 2025
cd2d5d4
Adjust and add RISCV64-RVC specific todos
fuad1502 Jul 15, 2025
324258b
Adjust RISC-V RVC instruction formatting in R2RDump
fuad1502 Jul 16, 2025
d56276e
Merge branch 'main' into riscv-jit-opt/c-ext
fuad1502 Jul 16, 2025
47546bb
Add TODO comment on introducing a switch in jitconfigvalues.h to show…
fuad1502 Jul 16, 2025
aa169fe
Fix if defined guard usage
fuad1502 Jul 17, 2025
3aed899
Temporarily disable ProbeRiscV64Quirks
fuad1502 Jul 24, 2025
c011705
Merge branch 'main' into riscv-jit-opt/c-ext
fuad1502 Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/inc/clrnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ RtlpGetFunctionEndAddress (
FunctionLength = *(PTR_ULONG64)(ImageBase + FunctionLength) & 0x3ffff;
}

return FunctionEntry->BeginAddress + 4 * FunctionLength;
return FunctionEntry->BeginAddress + 2 * FunctionLength;
}

#define RUNTIME_FUNCTION__BeginAddress(FunctionEntry) ((FunctionEntry)->BeginAddress)
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/inc/gcinfotypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -803,18 +803,18 @@ struct RISCV64GcInfoEncoding {
// GC Pointers are 8-bytes aligned
static inline constexpr int32_t NORMALIZE_STACK_SLOT (int32_t x) { return ((x)>>3); }
static inline constexpr int32_t DENORMALIZE_STACK_SLOT (int32_t x) { return ((x)<<3); }
// All Instructions are 4 bytes long
static inline constexpr uint32_t NORMALIZE_CODE_LENGTH (uint32_t x) { return ((x)>>2); }
static inline constexpr uint32_t DENORMALIZE_CODE_LENGTH (uint32_t x) { return ((x)<<2); }
// All Instructions are 2/4 bytes long
static inline constexpr uint32_t NORMALIZE_CODE_LENGTH (uint32_t x) { return ((x)>>1); }
static inline constexpr uint32_t DENORMALIZE_CODE_LENGTH (uint32_t x) { return ((x)<<1); }
// Encode Frame pointer X8 as zero, sp/x2 as 1
static inline constexpr uint32_t NORMALIZE_STACK_BASE_REGISTER (uint32_t x) { return ((x) == 8 ? 0u : 1u); }
static inline constexpr uint32_t DENORMALIZE_STACK_BASE_REGISTER (uint32_t x) { return ((x) == 0 ? 8u : 2u); }
static inline constexpr uint32_t NORMALIZE_SIZE_OF_STACK_AREA (uint32_t x) { return ((x)>>3); }
static inline constexpr uint32_t DENORMALIZE_SIZE_OF_STACK_AREA (uint32_t x) { return ((x)<<3); }
static const bool CODE_OFFSETS_NEED_NORMALIZATION = true;
// Instructions are 4 bytes long
static inline constexpr uint32_t NORMALIZE_CODE_OFFSET (uint32_t x) { return ((x)>>2); }
static inline constexpr uint32_t DENORMALIZE_CODE_OFFSET (uint32_t x) { return ((x)<<2); }
// Instructions are 2/4 bytes long
static inline constexpr uint32_t NORMALIZE_CODE_OFFSET (uint32_t x) { return ((x)>>1); }
static inline constexpr uint32_t DENORMALIZE_CODE_OFFSET (uint32_t x) { return ((x)<<1); }

static const int PSP_SYM_STACK_SLOT_ENCBASE = 6;
static const int GENERICS_INST_CONTEXT_STACK_SLOT_ENCBASE = 6;
Expand Down
Loading
Loading