Skip to content

Commit

Permalink
8326235: RISC-V: Size CodeCache for short calls encoding
Browse files Browse the repository at this point in the history
Reviewed-by: fyang, tonyp
  • Loading branch information
robehn committed Feb 21, 2024
1 parent c022431 commit 51e2dde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/hotspot/cpu/riscv/globalDefinitions_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const bool CCallingConventionRequiresIntsAsLongs = false;

#define USE_POINTERS_TO_REGISTER_IMPL_ARRAY

// auipc useable for all cc -> cc calls and jumps
#define CODE_CACHE_SIZE_LIMIT ((2*G)-(2*K))

// The expected size in bytes of a cache line.
#define DEFAULT_CACHE_LINE_SIZE 64

Expand Down
7 changes: 5 additions & 2 deletions src/hotspot/share/utilities/globalDefinitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,16 @@ extern uint64_t OopEncodingHeapMax;

// Machine dependent stuff

#include CPU_HEADER(globalDefinitions)

// The maximum size of the code cache. Can be overridden by targets.
#ifndef CODE_CACHE_SIZE_LIMIT
#define CODE_CACHE_SIZE_LIMIT (2*G)
#endif

// Allow targets to reduce the default size of the code cache.
#define CODE_CACHE_DEFAULT_LIMIT CODE_CACHE_SIZE_LIMIT

#include CPU_HEADER(globalDefinitions)

// To assure the IRIW property on processors that are not multiple copy
// atomic, sync instructions must be issued between volatile reads to
// assure their ordering, instead of after volatile stores.
Expand Down

1 comment on commit 51e2dde

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.