hotspot/src/share/vm/c1/c1_LIR.cpp
Print this page
rev 611 : Merge
@@ -1,10 +1,10 @@
#ifdef USE_PRAGMA_IDENT_SRC
#pragma ident "@(#)c1_LIR.cpp 1.119 07/06/18 14:25:24 JVM"
#endif
/*
- * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 2000-2008 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -38,22 +38,22 @@
Register LIR_OprDesc::as_register_hi() const {
return FrameMap::cpu_rnr2reg(cpu_regnrHi());
}
-#ifdef IA32
+#if defined(X86)
XMMRegister LIR_OprDesc::as_xmm_float_reg() const {
return FrameMap::nr2xmmreg(xmm_regnr());
}
XMMRegister LIR_OprDesc::as_xmm_double_reg() const {
assert(xmm_regnrLo() == xmm_regnrHi(), "assumed in calculation");
return FrameMap::nr2xmmreg(xmm_regnrLo());
}
-#endif
+#endif // X86
#ifdef SPARC
FloatRegister LIR_OprDesc::as_float_reg() const {
@@ -82,11 +82,11 @@
case addressTag: return LIR_OprFact::intConst(type->as_AddressConstant()->value());
case intTag : return LIR_OprFact::intConst(type->as_IntConstant()->value());
case floatTag : return LIR_OprFact::floatConst(type->as_FloatConstant()->value());
case longTag : return LIR_OprFact::longConst(type->as_LongConstant()->value());
case doubleTag : return LIR_OprFact::doubleConst(type->as_DoubleConstant()->value());
- default: ShouldNotReachHere();
+ default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1);
}
}
LIR_Opr LIR_OprFact::dummy_value_type(ValueType* type) {
@@ -95,22 +95,22 @@
case addressTag:
case intTag: return LIR_OprFact::intConst(0);
case floatTag: return LIR_OprFact::floatConst(0.0);
case longTag: return LIR_OprFact::longConst(0);
case doubleTag: return LIR_OprFact::doubleConst(0.0);
- default: ShouldNotReachHere();
+ default: ShouldNotReachHere(); return LIR_OprFact::intConst(-1);
}
return illegalOpr;
}
//---------------------------------------------------
LIR_Address::Scale LIR_Address::scale(BasicType type) {
- int elem_size = type2aelembytes[type];
+ int elem_size = type2aelembytes(type);
switch (elem_size) {
case 1: return LIR_Address::times_1;
case 2: return LIR_Address::times_2;
case 4: return LIR_Address::times_4;
case 8: return LIR_Address::times_8;
@@ -163,10 +163,11 @@
case T_ILLEGAL:
return '?';
default:
ShouldNotReachHere();
+ return '?';
}
}
#ifndef PRODUCT
void LIR_OprDesc::validate_type() const {
@@ -1375,11 +1376,11 @@
} else if (is_single_cpu()) {
out->print(as_register()->name());
} else if (is_double_cpu()) {
out->print(as_register_hi()->name());
out->print(as_register_lo()->name());
-#ifdef IA32
+#if defined(X86)
} else if (is_single_xmm()) {
out->print(as_xmm_float_reg()->name());
} else if (is_double_xmm()) {
out->print(as_xmm_double_reg()->name());
} else if (is_single_fpu()) {