|
Hi All,
I have made a patch to
Long Operation of JJOS (Well It is not a patch, I just wrote a
library). Currently, These Operation are
implemented.
xor
or
and
add
sub
mul
div
mod
shr
shl
neg
Please have look at it.
Regards,
Hilary
|
bool frame::lneg(exception_to_throw &e)
{
TRACE(("lneg"));
jlong jl = op_stack.pop_jlong();
jlong jlneg;
jlneg.myHigh32 = jl.myHigh32;
jlneg.myLow32 = jl.myLow32;
_lneg(&jlneg);
op_stack.push_jlong(jl);
return(true);
}
bool frame::ladd(exception_to_throw &e)
{
TRACE(("ladd"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_ladd(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::lsub(exception_to_throw &e)
{
TRACE(("lsub"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_lsub(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::lmul(exception_to_throw &e)
{
TRACE(("lmul"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_lmul(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::ldiv(exception_to_throw &e)
{
TRACE(("ldiv"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_ldiv(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::lrem(exception_to_throw &e)
{
TRACE(("lrem"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_lrem(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::lshr(exception_to_throw &e)
{
TRACE(("lshr"));
jint shift = op_stack.pop_jint();
jlong jl = op_stack.pop_jlong();
// jlong jl_shifted = jl >> shift;
jlong jl_shifted;
jl_shifted.myHigh32 = jl.myHigh32;
jl_shifted.myLow32 = jl.myLow32;
_lshr(&jl_shifted, shift);
op_stack.push_jlong(jl_shifted);
return(true);
}
bool frame::lshl(exception_to_throw &e)
{
TRACE(("lshl"));
jint shift = op_stack.pop_jint();
jlong jl = op_stack.pop_jlong();
// jlong jl_shifted = jl >> shift;
jlong jl_shifted;
jl_shifted.myHigh32 = jl.myHigh32;
jl_shifted.myLow32 = jl.myLow32;
_lshl(&jl_shifted, shift);
op_stack.push_jlong(jl_shifted);
return(true);
}
bool frame::lor(exception_to_throw &e)
{
TRACE(("lor"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_lor(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::land(exception_to_throw &e)
{
TRACE(("land"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_land(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
bool frame::lxor(exception_to_throw &e)
{
TRACE(("lxor"));
jlong jl1 = op_stack.pop_jlong();
jlong jl2 = op_stack.pop_jlong();
jlong jl3;
_lxor(&jl3, &jl1, &jl2);
op_stack.push_jlong(jl3);
return(true);
}
long64.h