Skip to content
Prev Previous commit
Next Next commit
Hoist unordered check
  • Loading branch information
kg committed Nov 23, 2022
commit d69318db3a7e184f46d4e3756069dba2c78e9b02
3 changes: 2 additions & 1 deletion src/mono/mono/mini/interp/jiterpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,15 @@ mono_jiterp_conv_ovf (void *dest, void *src, int opcode) {
#define JITERP_RELOP(opcode, type, op, noorder) \
case opcode: \
{ \
if (mono_isunordered (lhs, rhs)) \
if (is_unordered) \
return noorder; \
else \
return ((type)lhs op (type)rhs); \
}

EMSCRIPTEN_KEEPALIVE int
mono_jiterp_relop_fp (double lhs, double rhs, int opcode) {
gboolean is_unordered = mono_isunordered (lhs, rhs);
switch (opcode) {
JITERP_RELOP(MINT_CEQ_R4, float, ==, 0);
JITERP_RELOP(MINT_CEQ_R8, double, ==, 0);
Expand Down