6939207: refactor constant pool index processing

Factored cleanup of instruction decode which prepares for enhanced ldc semantics.

Reviewed-by: twisti
This commit is contained in:
John R Rose 2010-05-23 01:38:26 -07:00
parent 2e24ba80e9
commit 581521ba96
40 changed files with 875 additions and 592 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -73,6 +73,7 @@ class TemplateTable: AllStatic {
public:
enum Operation { add, sub, mul, div, rem, _and, _or, _xor, shl, shr, ushr };
enum Condition { equal, not_equal, less, less_equal, greater, greater_equal };
enum CacheByte { f1_byte = 1, f2_byte = 2, f1_oop = 0x11 }; // byte_no codes
private:
static bool _is_initialized; // true if TemplateTable has been initialized
@ -244,13 +245,18 @@ class TemplateTable: AllStatic {
static void _return(TosState state);
static void resolve_cache_and_index(int byte_no, Register cache, Register index);
static void resolve_cache_and_index(int byte_no, // one of 1,2,11
Register result , // either noreg or output for f1/f2
Register cache, // output for CP cache
Register index, // output for CP index
size_t index_size); // one of 1,2,4
static void load_invoke_cp_cache_entry(int byte_no,
Register method,
Register itable_index,
Register flags,
bool is_invokevirtual = false,
bool is_virtual_final = false);
bool is_invokevirtual,
bool is_virtual_final,
bool is_invokedynamic);
static void load_field_cp_cache_entry(Register obj,
Register cache,
Register index,