]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR target/85666
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2018 18:12:14 +0000 (18:12 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Sep 2018 18:12:14 +0000 (18:12 +0000)
* config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
non-CONST_INT rtx:es using assemble_integer_with_op ".byte".

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264183 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mmix/mmix.c

index 270c67e37b232d9548cff9f90ca7b268742551ae..57725badf7a6b1b567d775f8ea4bcd90fc4fb4b5 100644 (file)
@@ -1,8 +1,10 @@
 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
 
        PR target/85666
-       * config/mmix/mmix.c (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't
-       call leaf_function_p, instead use has_hard_reg_initial_val.
+       * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
+       non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
+       (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
+       leaf_function_p, instead use has_hard_reg_initial_val.
 
 2018-09-09  Nathan Sidwell  <nathan@acm.org>
 
index 5ee9930620c32eea6c5761f01dc729027b3c46a2..9e3bc9437ce9da74fe2b02029680ffb770d2b851 100644 (file)
@@ -1370,8 +1370,14 @@ mmix_assemble_integer (rtx x, unsigned int size, int aligned_p)
       case 1:
        if (GET_CODE (x) != CONST_INT)
          {
-           aligned_p = 0;
-           break;
+           /* There is no "unaligned byte" op or generic function to
+              which we can punt, so we have to handle this here.  As
+              the expression isn't a plain literal, the generated
+              assembly-code can't be mmixal-equivalent (i.e. "BYTE"
+              won't work) and thus it's ok to emit the default op
+              ".byte". */
+           assemble_integer_with_op ("\t.byte\t", x);
+           return true;
          }
        fputs ("\tBYTE\t", asm_out_file);
        mmix_print_operand (asm_out_file, x, 'B');