This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hppa "unaligned access" fix


This little patch stops hppa gcc bombing with bus errors on asm
statement rtl like the following.

(insn 107 105 109 (parallel[ 
            (asm_operands/v ("ssm %0,%%r0") ("") 0
                [ 
                    (const_int 1 [0x1])
                ] 
                [ 
                    (asm_input:SI ("i"))
                ]  ("init/main.c") 571)
            (clobber (mem:BLK (scratch) 0))
        ] ) -1 (insn_list 105 (nil))
    (nil))

Almost in the obvious class.  Would someone check it in please?

	* config/pa/pa.c (pa_adjust_insn_length): Check that block move
	pattern is a set before looking at operands.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

--- gcc/config/pa/pa.c~	Thu Feb  1 15:33:49 2001
+++ gcc/config/pa/pa.c	Tue Feb 13 23:41:53 2001
@@ -3816,6 +3816,7 @@ pa_adjust_insn_length (insn, length)
   /* Block move pattern.  */
   else if (GET_CODE (insn) == INSN
 	   && GET_CODE (pat) == PARALLEL
+	   && GET_CODE (XVECEXP (pat, 0, 0)) == SET
 	   && GET_CODE (XEXP (XVECEXP (pat, 0, 0), 0)) == MEM
 	   && GET_CODE (XEXP (XVECEXP (pat, 0, 0), 1)) == MEM
 	   && GET_MODE (XEXP (XVECEXP (pat, 0, 0), 0)) == BLKmode



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]