diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-10-12 21:04:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-10-12 21:04:26 +0000 |
commit | 95842021896e8c231cb23d0073c8a08dfe898744 (patch) | |
tree | 9e6f73e8e391c61cc09a2fc20e71b86e9f96287f /gcc | |
parent | 1ad16c52842e0513b96a0e02d2a431dc0f338c5d (diff) | |
download | gcc-95842021896e8c231cb23d0073c8a08dfe898744.zip gcc-95842021896e8c231cb23d0073c8a08dfe898744.tar.gz gcc-95842021896e8c231cb23d0073c8a08dfe898744.tar.bz2 |
visium.c (visium_gimplify_va_arg): Emit a big-endian correction if the type is smaller than a word.
* config/visium/visium.c (visium_gimplify_va_arg): Emit a big-endian
correction if the type is smaller than a word.
(visium_select_cc_mode): Add ... fall through ... comment.
From-SVN: r241076
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/visium/visium.c | 17 |
2 files changed, 21 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a67339..12a324c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-10-12 Eric Botcazou <ebotcazou@adacore.com> + + * config/visium/visium.c (visium_gimplify_va_arg): Emit a big-endian + correction if the type is smaller than a word. + (visium_select_cc_mode): Add ... fall through ... comment. + 2016-10-12 Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000.c (machine_function): Add new fields diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 4585af5..a0035c6 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -1626,8 +1626,8 @@ visium_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, 7: { 8: bytes = 0; 9: addr_rtx = ovfl; - 10: ovfl += rsize; - 11: } + 10: ovfl += rsize; + 11: } */ @@ -1691,6 +1691,16 @@ visium_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, gimplify_and_add (t, pre_p); t = build1 (LABEL_EXPR, void_type_node, lab_over); gimplify_and_add (t, pre_p); + + /* Emit a big-endian correction if size < UNITS_PER_WORD. */ + if (size < UNITS_PER_WORD) + { + t = build2 (POINTER_PLUS_EXPR, TREE_TYPE (addr), addr, + size_int (UNITS_PER_WORD - size)); + t = build2 (MODIFY_EXPR, void_type_node, addr, t); + gimplify_and_add (t, pre_p); + } + addr = fold_convert (ptrtype, addr); return build_va_arg_indirect_ref (addr); @@ -2848,6 +2858,9 @@ visium_select_cc_mode (enum rtx_code code, rtx op0, rtx op1) case CONST_INT: /* This is a degenerate case, typically an uninitialized variable. */ gcc_assert (op0 == constm1_rtx); + + /* ... fall through ... */ + case REG: case AND: case IOR: |