Beispiel #1
0
static void create_divmod_intrinsics(ir_mode *mode_unsigned,
                                     ir_mode *mode_signed)
{
	ir_type *const tp_unsigned = get_type_for_mode(mode_unsigned);
	uldivmod = make_divmod("__aeabi_uldivmod", tp_unsigned, tp_unsigned);

	ir_type *const tp_signed = get_type_for_mode(mode_signed);
	ir_type *const even      = arm_cg_config.big_endian ? tp_signed   : tp_unsigned;
	ir_type *const odd       = arm_cg_config.big_endian ? tp_unsigned : tp_signed;
	ldivmod = make_divmod("__aeabi_ldivmod", even, odd);
}
Beispiel #2
0
LLVMValueRef gen_mod(compile_t* c, ast_t* left, ast_t* right)
{
  return make_divmod(c, left, right, LLVMConstFRem, LLVMConstURem,
    LLVMConstSRem, LLVMBuildFRem, LLVMBuildURem, LLVMBuildSRem);
}
Beispiel #3
0
LLVMValueRef gen_div(compile_t* c, ast_t* left, ast_t* right)
{
  return make_divmod(c, left, right, LLVMConstFDiv, LLVMConstUDiv,
    LLVMConstSDiv, LLVMBuildFDiv, LLVMBuildUDiv, LLVMBuildSDiv);
}