You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/03/07 17:59:33 UTC
svn commit: r515646 - in /harmony/enhanced/drlvm/trunk/vm:
em/src/EdgeProfileCollector.cpp port/src/encoder/ia32_em64t/encoder.inl
port/src/lil/em64t/pim/lil_code_generator_em64t.cpp
Author: gshimansky
Date: Wed Mar 7 08:59:32 2007
New Revision: 515646
URL: http://svn.apache.org/viewvc?view=rev&rev=515646
Log:
Applied HARMONY-3321 [drlvm] warnings when building encoder on em64t
Modified:
harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp
harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl
harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp?view=diff&rev=515646&r1=515645&r2=515646
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/EdgeProfileCollector.cpp Wed Mar 7 08:59:32 2007
@@ -61,7 +61,7 @@
{
MethodProfile* mp = (MethodProfile*)mph;
assert(mp->pc->type == EM_PCTYPE_EDGE);
- return ((EdgeMethodProfile*)mp)->counters.size();
+ return (uint32)((EdgeMethodProfile*)mp)->counters.size();
}
Modified: harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl?view=diff&rev=515646&r1=515645&r2=515646
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/encoder/ia32_em64t/encoder.inl Wed Mar 7 08:59:32 2007
@@ -75,7 +75,7 @@
assert(n_size != sz);
args.add(EncoderBase::Operand(map_size(sz),
map_reg(m.base().reg_no()), map_reg(m.index().reg_no()),
- m.scale().get_value(), m.disp().get_value()));
+ (unsigned)m.scale().get_value(), (int)m.disp().get_value()));
}
inline static void add_rm(EncoderBase::Operands & args, const RM_Opnd & rm, Opnd_Size sz) {
Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp?view=diff&rev=515646&r1=515645&r2=515646
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/lil_code_generator_em64t.cpp Wed Mar 7 08:59:32 2007
@@ -527,7 +527,7 @@
inline const M_Opnd & get_m_opnd(const LcgEM64TLoc * loc) const {
assert(loc->kind == LLK_GStk || loc->kind == LLK_FStk);
void * const mem_ptr = mem.alloc(sizeof(M_Base_Opnd));
- return *(new(mem_ptr) M_Base_Opnd(rsp_reg, loc->addr));
+ return *(new(mem_ptr) M_Base_Opnd(rsp_reg, (int32)loc->addr));
}
inline const RM_Opnd & get_rm_opnd(const LcgEM64TLoc * loc) const {
@@ -1154,8 +1154,10 @@
if (lil_operation_is_binary(o)) {
if (lil_operand_is_immed(op1) && lil_operand_is_immed(op2)) {
// type-convert to get signed types of same length
- int32 op1_imm = get_imm_value(op1);
- int32 op2_imm = get_imm_value(op2);
+ assert(fit32(get_imm_value(op1)));
+ int32 op1_imm = (int32)get_imm_value(op1);
+ assert(fit32(get_imm_value(op2)));
+ int32 op2_imm = (int32)get_imm_value(op2);
int32 result = 0;
switch (o) {
case LO_Add:
@@ -1175,7 +1177,8 @@
}
move_imm(dest_loc, result);
} else if (lil_operand_is_immed(op1)) {
- const int32 op1_imm = get_imm_value(op1);
+ assert(fit32(get_imm_value(op1)));
+ const int32 op1_imm = (int32)get_imm_value(op1);
const LcgEM64TLoc * op2_loc = get_op_loc(op2, false);
switch (o) {
case LO_Add:
@@ -1194,7 +1197,8 @@
}
} else if (lil_operand_is_immed(op2)) {
const LcgEM64TLoc* op1_loc = get_op_loc(op1, false);
- const int32 op2_imm = get_imm_value(op2);
+ assert(fit32(get_imm_value(op2)));
+ const int32 op2_imm = (int32)get_imm_value(op2);
bin_op_rm_imm(o, dest_loc, op1_loc, op2_imm);
} else { // both operands non-immediate
const LcgEM64TLoc * src1_loc = get_op_loc(op1, false);
@@ -1203,7 +1207,8 @@
}
} else { // unary operation
if (lil_operand_is_immed(op1)) {
- int32 imm = get_imm_value(op1);
+ assert(fit32(get_imm_value(op1)));
+ int32 imm = (int32)get_imm_value(op1);
int32 result = 0;
switch (o) {
case LO_Neg: