8255271: Avoid generating duplicate interpreter entries for subword types

Reviewed-by: iklam, coleenp
This commit is contained in:
Claes Redestad 2020-10-23 15:37:46 +00:00
parent 5ec1b80c4a
commit cc861134f4
5 changed files with 48 additions and 43 deletions

View file

@ -556,7 +556,11 @@ class CodeBuffer: public StackObj {
static int locator_sect(int locator) { return locator & sect_mask; }
static int locator(int pos, int sect) { return (pos << sect_bits) | sect; }
int locator(address addr) const;
address locator_address(int locator) const;
address locator_address(int locator) const {
if (locator < 0) return NULL;
address start = code_section(locator_sect(locator))->start();
return start + locator_pos(locator);
}
// Heuristic for pre-packing the taken/not-taken bit of a predicted branch.
bool is_backward_branch(Label& L);