0N/A * or visit www.oracle.com if you need additional information or have any
0N/A#include "precompiled.hpp"
0N/A#include "c1/c1_InstructionPrinter.hpp"
0N/A#include "c1/c1_LIR.hpp"
0N/A#include "c1/c1_LIRAssembler.hpp"
0N/A#include "c1/c1_ValueStack.hpp"
0N/A#include "ci/ciInstance.hpp"
0N/A#include "runtime/sharedRuntime.hpp"
#ifdef ARM
switch (tag) {
case objectTag : {
return illegalOpr;
switch (elem_size) {
#ifndef PRODUCT
assert(scale() == times_1, "Scaled addressing mode not available on SPARC/PPC and should not be used");
#ifdef ARM
#ifdef _LP64
case T_ARRAY:
t = T_OBJECT;
case T_BOOLEAN:
case T_CHAR:
case T_FLOAT:
case T_DOUBLE:
case T_BYTE:
case T_SHORT:
case T_INT:
case T_LONG:
case T_OBJECT:
case T_ADDRESS:
case T_VOID:
return ::type2char(t);
case T_ILLEGAL:
#ifndef PRODUCT
#ifdef ASSERT
case T_LONG:
case T_FLOAT:
case T_DOUBLE:
case T_BOOLEAN:
case T_CHAR:
case T_BYTE:
case T_SHORT:
case T_INT:
case T_ADDRESS:
case T_OBJECT:
case T_ARRAY:
case T_ILLEGAL:
if (is_pointer()) {
return t == object_type;
#ifdef ASSERT
switch (code()) {
case lir_cmove:
case lir_xchg:
if (TwoOperandLIRForm) {
switch (code()) {
case lir_add:
case lir_sub:
case lir_mul:
case lir_mul_strictfp:
case lir_div:
case lir_div_strictfp:
case lir_rem:
case lir_logic_and:
case lir_logic_or:
case lir_logic_xor:
case lir_shl:
case lir_shr:
case lir_ushr:
assert(in_opr1() == result_opr() || in_opr2()->is_constant(), "opr1 and result must match or shift count is constant");
LIR_OpBranch::LIR_OpBranch(LIR_Condition cond, BasicType type, BlockBegin* block, BlockBegin* ublock)
_block = b;
_ublock = b;
switch (_cond) {
default: ShouldNotReachHere();
, _should_profile(false)
LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, CodeEmitInfo* info_for_exception)
, _fast_check(false)
, _should_profile(false)
LIR_OpArrayCopy::LIR_OpArrayCopy(LIR_Opr src, LIR_Opr src_pos, LIR_Opr dst, LIR_Opr dst_pos, LIR_Opr length,
switch(code()) {
case lir_move:
case lir_null_check:
case lir_return:
reset();
case lir_safepoint:
#ifdef PPC
case lir_alloc_object:
case lir_roundfp: {
case lir_cmp:
case lir_cmp_l2i:
case lir_ucmp_fd2i:
case lir_cmp_fd2i:
case lir_add:
case lir_sub:
case lir_mul:
case lir_div:
case lir_rem:
case lir_sqrt:
case lir_abs:
case lir_logic_and:
case lir_logic_or:
case lir_logic_xor:
case lir_shl:
case lir_shr:
case lir_ushr:
case lir_xadd:
case lir_xchg:
case lir_cmove:
case lir_mul_strictfp:
case lir_div_strictfp:
case lir_throw: {
case lir_unwind: {
case lir_tan:
case lir_sin:
case lir_cos:
case lir_log:
case lir_log10:
case lir_exp: {
case lir_pow: {
case lir_idiv:
case lir_irem: {
case lir_static_call:
case lir_optvirtual_call:
case lir_icvirtual_call:
case lir_virtual_call:
case lir_dynamic_call: {
do_call();
case lir_rtcall: {
do_call();
case lir_arraycopy: {
assert(opArrayCopy->_src->is_valid(), "used"); do_input(opArrayCopy->_src); do_temp(opArrayCopy->_src);
assert(opArrayCopy->_src_pos->is_valid(), "used"); do_input(opArrayCopy->_src_pos); do_temp(opArrayCopy->_src_pos);
assert(opArrayCopy->_dst->is_valid(), "used"); do_input(opArrayCopy->_dst); do_temp(opArrayCopy->_dst);
assert(opArrayCopy->_dst_pos->is_valid(), "used"); do_input(opArrayCopy->_dst_pos); do_temp(opArrayCopy->_dst_pos);
assert(opArrayCopy->_length->is_valid(), "used"); do_input(opArrayCopy->_length); do_temp(opArrayCopy->_length);
do_call();
case lir_lock:
case lir_unlock: {
case lir_delay_slot: {
case lir_instanceof:
case lir_checkcast:
case lir_store_check: {
case lir_cas_long:
case lir_cas_obj:
case lir_cas_int: {
case lir_alloc_array: {
if (opAllocArray->_klass->is_valid()) do_input(opAllocArray->_klass); do_temp(opAllocArray->_klass);
case lir_profile_call: {
for (i = 0; i < info_count(); i++) {
#ifdef ASSERT
for (i = 0; i < info_count(); i++) {
return result;
return new XHandlers();
return result;
#ifdef ASSERT
info_count() == 0 &&
!has_call() &&
!has_slow_case();
if (stub()) {
if (stub()) {
if (stub()) {
#ifndef PRODUCT
#ifdef ASSERT
, _line(0)
#ifdef ASSERT
if (f == NULL) {
f = file;
_file = f;
src,
info));
void LIR_List::volatile_load_mem_reg(LIR_Address* address, LIR_Opr dst, CodeEmitInfo* info, LIR_PatchCode patch_code) {
dst,
void LIR_List::volatile_load_unsafe_reg(LIR_Opr base, LIR_Opr offset, LIR_Opr dst, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code) {
dst,
type,
void LIR_List::store_mem_int(jint v, LIR_Opr base, int offset_in_bytes, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code) {
type,
info));
void LIR_List::store_mem_oop(jobject o, LIR_Opr base, int offset_in_bytes, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code) {
type,
info));
void LIR_List::store(LIR_Opr src, LIR_Address* addr, CodeEmitInfo* info, LIR_PatchCode patch_code) {
src,
info));
void LIR_List::volatile_store_mem_reg(LIR_Opr src, LIR_Address* addr, CodeEmitInfo* info, LIR_PatchCode patch_code) {
src,
info,
void LIR_List::volatile_store_unsafe_reg(LIR_Opr src, LIR_Opr base, LIR_Opr offset, BasicType type, CodeEmitInfo* info, LIR_PatchCode patch_code) {
src,
type,
left,
tmp,
res,
info));
left,
tmp,
res,
info));
left,
tmp,
res,
info));
left,
tmp,
res,
info));
void LIR_List::cmp_mem_int(LIR_Condition condition, LIR_Opr base, int disp, int c, CodeEmitInfo* info) {
info));
void LIR_List::cmp_reg_mem(LIR_Condition condition, LIR_Opr reg, LIR_Address* addr, CodeEmitInfo* info) {
reg,
info));
dst,
t1,
t2,
t3,
t4,
stub));
void LIR_List::allocate_array(LIR_Opr dst, LIR_Opr len, LIR_Opr t1,LIR_Opr t2, LIR_Opr t3,LIR_Opr t4, BasicType type, LIR_Opr klass, CodeStub* stub) {
len,
dst,
t1,
t2,
t3,
t4,
type,
stub));
dst,
tmp));
dst,
tmp));
dst,
tmp));
left,
dst));
void LIR_List::lock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub, CodeEmitInfo* info) {
hdr,
obj,
lock,
stub,
info));
void LIR_List::unlock_object(LIR_Opr hdr, LIR_Opr obj, LIR_Opr lock, LIR_Opr scratch, CodeStub* stub) {
hdr,
obj,
lock,
stub,
NULL));
c->set_should_profile(true);
append(c);
void LIR_List::instanceof(LIR_Opr result, LIR_Opr object, ciKlass* klass, LIR_Opr tmp1, LIR_Opr tmp2, LIR_Opr tmp3, bool fast_check, CodeEmitInfo* info_for_patch, ciMethod* profiled_method, int profiled_bci) {
LIR_OpTypeCheck* c = new LIR_OpTypeCheck(lir_instanceof, result, object, klass, tmp1, tmp2, tmp3, fast_check, NULL, info_for_patch, NULL);
c->set_should_profile(true);
append(c);
LIR_OpTypeCheck* c = new LIR_OpTypeCheck(lir_store_check, object, array, tmp1, tmp2, tmp3, info_for_exception);
c->set_should_profile(true);
append(c);
#ifdef PRODUCT
if (is_illegal()) {
if (is_pointer()) {
} else if (is_single_stack()) {
} else if (is_double_stack()) {
} else if (is_virtual()) {
} else if (is_single_cpu()) {
} else if (is_double_cpu()) {
#if defined(X86)
} else if (is_single_xmm()) {
} else if (is_double_xmm()) {
} else if (is_single_fpu()) {
} else if (is_double_fpu()) {
} else if (is_single_fpu()) {
} else if (is_double_fpu()) {
} else if (is_single_fpu()) {
} else if (is_double_fpu()) {
} else if (is_illegal()) {
if (!is_illegal()) {
switch (type()) {
switch (scale()) {
case times_1: break;
if (x->number_of_preds() > 0) {
for (int i = 0; i < x->number_of_preds(); i ++) {
if (x->number_of_sux() > 0) {
for (int i = 0; i < x->number_of_sux(); i ++) {
if (x->number_of_exception_handlers() > 0) {
for (int i = 0; i < x->number_of_exception_handlers(); i++) {
#ifdef ASSERT
const char* s = NULL;
switch(code()) {
switch (move_kind()) {
case lir_move_normal:
case lir_move_unaligned:
case lir_move_volatile:
case lir_move_wide:
switch(code) {
case lir_patch_none: break;
default: ShouldNotReachHere();
switch(cond) {
#ifdef PPC
switch(code) {
#ifdef ASSERT
for (int i = 0; i < number_of_insertion_points(); i++) {