Commit 9ab0c73d authored by Matthias Braun's avatar Matthias Braun
Browse files

arm has a modulo_shift of 256

parent 2a474c6c
......@@ -112,7 +112,7 @@ typedef struct backend_params {
* the shift value are read resulting in a modulo shift value of 32.
* On an architecture without modulo_shift this value is 0.
*/
unsigned char modulo_shift;
unsigned modulo_shift;
/** Settings for architecture dependent optimizations. */
const ir_settings_arch_dep_t *dep_param;
......
......@@ -784,8 +784,8 @@ static ir_node *make_shift(ir_node *node, match_flags_t flags,
ir_node *op2 = get_binop_right(node);
dbg_info *dbgi = get_irn_dbg_info(node);
ir_mode *mode = get_irn_mode(node);
if (get_mode_modulo_shift(mode) != 32)
panic("modulo shift!=32 not supported");
if (get_mode_modulo_shift(mode) != 256)
panic("modulo shift!=256 not supported");
if (flags & MATCH_SIZE_NEUTRAL) {
op1 = arm_skip_downconv(op1);
......
......@@ -47,6 +47,8 @@
#include "arm_optimize.h"
#include "arm_emitter.h"
static const backend_params *arm_get_libfirm_params(void);
static ir_entity *arm_get_frame_entity(const ir_node *irn)
{
const arm_attr_t *attr = get_arm_attr_const(irn);
......@@ -186,8 +188,14 @@ static void arm_create_runtime_entities(void)
if (divsi3 != NULL)
return;
ir_type *int_tp = get_type_for_mode(mode_Is);
ir_type *uint_tp = get_type_for_mode(mode_Iu);
unsigned modulo_shift = arm_get_libfirm_params()->modulo_shift;
ir_mode *mode_int = new_int_mode("arm_be_int", irma_twos_complement, 32,
true, modulo_shift);
ir_mode *mode_uint = new_int_mode("arm_be_int", irma_twos_complement, 32,
false, modulo_shift);
ir_type *int_tp = get_type_for_mode(mode_int);
ir_type *uint_tp = get_type_for_mode(mode_uint);
ir_type *tp_divsi3 = new_type_method(2, 1);
set_method_param_type(tp_divsi3, 0, int_tp);
......@@ -331,7 +339,7 @@ static const backend_params *arm_get_libfirm_params(void)
true, /* big endian */
false, /* PIC code not supported */
false, /* unaligned memory access */
32, /* modulo shift */
256, /* modulo shift */
&ad, /* will be set later */
arm_is_mux_allowed, /* allow_ifconv function */
32, /* machine size */
......
......@@ -153,7 +153,7 @@ struct ir_mode {
bool sign:1; /**< signedness of this mode */
ENUMBF(float_int_conversion_overflow_style_t)
int_conv_overflow:1;
unsigned char modulo_shift; /**< number of bits a values of this mode will be shifted */
unsigned modulo_shift; /**< number of bits a values of this mode will be shifted */
float_descriptor_t float_desc;
/* ---------------------------------------------------------------------- */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment