static gcc_jit_rvalue *
emit_rvalue_from_emacs_uint (EMACS_UINT val)
{
- if (val != (long) val)
+ if (val > LONG_MAX || val < LONG_MIN)
return emit_rvalue_from_unsigned_long_long (comp.emacs_uint_type, val);
else
return gcc_jit_context_new_rvalue_from_long (comp.ctxt,
static gcc_jit_rvalue *
emit_rvalue_from_emacs_int (EMACS_INT val)
{
- if (val != (long) val)
+ if (val > LONG_MAX || val < LONG_MIN)
return emit_rvalue_from_long_long (comp.emacs_int_type, val);
else
return gcc_jit_context_new_rvalue_from_long (comp.ctxt,
static gcc_jit_rvalue *
emit_rvalue_from_lisp_word_tag (Lisp_Word_tag val)
{
- if (val != (long) val)
+ if (val > LONG_MAX || val < LONG_MIN)
return emit_rvalue_from_unsigned_long_long (comp.lisp_word_tag_type, val);
else
return gcc_jit_context_new_rvalue_from_long (comp.ctxt,
comp.lisp_word_type,
val);
#else
- if (val != (long) val)
+ if (val > LONG_MAX || val < LONG_MIN)
return emit_rvalue_from_unsigned_long_long (comp.lisp_word_type, val);
else
return gcc_jit_context_new_rvalue_from_long (comp.ctxt,