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]
Other format: [Raw text]

Re: [PATCH] First attempt at unwind epilogue support for powerpc{,64}


Jakub Jelinek wrote:
+	    if (DEFAULT_ABI == ABI_V4
+		|| (info->altivec_save_offset
+		    + 16 * (i - info->first_altivec_reg_save)
+		    < (TARGET_32BIT ? -220 : -288)))

This condition ought to be pulled out to a predicate function. It's complex and used more than once.

-      emit_insn (TARGET_32BIT
-		 ? gen_addsi3 (frame_reg_rtx, hard_frame_pointer_rtx,
-			       GEN_INT (info->total_size))
-		 : gen_adddi3 (frame_reg_rtx, hard_frame_pointer_rtx,
-			       GEN_INT (info->total_size)));
+      insn = emit_insn (TARGET_32BIT
+			? gen_addsi3 (frame_reg_rtx, hard_frame_pointer_rtx,
+				      GEN_INT (info->total_size))
+			: gen_adddi3 (frame_reg_rtx, hard_frame_pointer_rtx,
+				      GEN_INT (info->total_size)));

Could use gen_add3_insn to tidy some of this up.


+				      sp_offset
+				      ? gen_rtx_PLUS (Pmode, frame_reg_rtx,
+						      GEN_INT (sp_offset))
+				      : frame_reg_rtx);

plus_constant.


Otherwise it all looks pretty reasonable to me.


r~



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