No subject
Fri Feb 8 08:55:55 EST 2008
CASE (CEE_ADD)
++ip;
--sp;
#define CEE_ADD_CHECK(t, A, B) CHECK_NONE
#define CEE_ADD_OP(t, A, B) BINARY_OP (t, +, (A), =
(B))
BINARY_NUMERIC_SWITCH (CEE_ADD, sp [-1], sp [0]);
BREAK;
CASE (CEE_SUB)
++ip;
--sp;
#define CEE_SUB_CHECK(t, A, B) CHECK_NONE
#define CEE_SUB_OP(t, A, B) BINARY_OP (t, -, (A), =
(B))
BINARY_NUMERIC_SWITCH (CEE_SUB, sp [-1], sp [0]);
BREAK;
CASE (CEE_MUL)
++ip;
--sp;
#define CEE_MUL_CHECK(t, A, B) CHECK_NONE
#define CEE_MUL_OP(t, A, B) BINARY_OP (t, *, (A), =
(B))
BINARY_NUMERIC_SWITCH (CEE_MUL, sp [-1], sp [0]);
BREAK;
CASE (CEE_DIV)
++ip;
--sp;
#define CEE_DIV_CHECK(t, A, B) \
do { \
/* check for division by zero */ \
if (VAL_TYPE (t) !=3D VAL_DOUBLE \
&& READ_SV (t, (B)) =3D=3D (DATA_TYPE (t))0)
\
THROW_DIV_BY_ZERO_EX (ip - 1); \
/* check for result type overflow (MIN/-1)
*/ \
if (VAL_TYPE (t) !=3D VAL_DOUBLE \
&& READ_SV (t, (A)) =3D=3D VAL_MIN (t) \
&& READ_SV (t, (B)) =3D=3D (DATA_TYPE
(t))-1) \
THROW_ARITHMETIC_EX (ip - 1); \
} while (0)
#define CEE_DIV_OP(t, A, B) \
do { \
if (VAL_TYPE (t) =3D=3D VAL_DOUBLE \
&& READ_SV (t, (B)) =3D=3D (DATA_TYPE (t))0)
\
/* A / 0.0 =3D> NaN ? */; \
BINARY_OP (t, /, (A), (B)); \
} while (0)
BINARY_NUMERIC_SWITCH (CEE_DIV, sp [-1], sp [0]);
BREAK;
More information about the Mono-devel-list
mailing list