+2017-01-20 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/61729
+ PR target/77850
+ * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
+ read from, for big endian.
+
2017-01-20 Jiong Wang <jiong.wang@arm.com>
* config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
size = int_size_in_bytes (type);
rsize = (size + 3) / 4;
+ int pad = 4 * rsize - size;
align = 1;
machine_mode mode = TYPE_MODE (type);
&& mode == SDmode)
t = fold_build_pointer_plus_hwi (t, size);
+ /* Args are passed right-aligned. */
+ if (BYTES_BIG_ENDIAN)
+ t = fold_build_pointer_plus_hwi (t, pad);
+
gimplify_assign (addr, t, pre_p);
gimple_seq_add_stmt (pre_p, gimple_build_goto (lab_over));
t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t,
build_int_cst (TREE_TYPE (t), -align));
}
+
+ /* Args are passed right-aligned. */
+ if (BYTES_BIG_ENDIAN)
+ t = fold_build_pointer_plus_hwi (t, pad);
+
gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);
gimplify_assign (unshare_expr (addr), t, pre_p);