- /* FIXME: only true for little endian */
- cnst = new_Const_long(mode_Iu, delta * 8);
- store_value = new_r_Shr(current_ir_graph, get_nodes_block(load),
- store_value, cnst, store_mode);
- }
+ /* produce a shift to adjust offset delta */
+ if (delta > 0) {
+ ir_node *cnst;
+
+ /* FIXME: only true for little endian */
+ cnst = new_Const_long(mode_Iu, delta * 8);
+ store_value = new_r_Shr(current_ir_graph, get_nodes_block(load),
+ store_value, cnst, store_mode);
+ }