Rich, Thanks for the updated patch. Please do not start new threads for a continuation of an existing thread. This makes it difficult to track in the archives.
On Tue, 2015-10-20 at 23:41 -0400, Rich Felker wrote: > Attached is a hopefully near-ready-for-commit version of the SH/FDPIC > patch. I believe I've addressed all comments by Oleg and Kaz on the > previous versions of the patch. I'm still working on drafting the > Changelog entry (there's a lot to go in it, and I might very well be > going into more detail than is needed). Other than the missing ChangeLog: How did you test the patch? > One thing I've considered doing, since TARGET_FDPIC implies flag_pic > now, is removing all parts of the patch that just replace checks for > flag_pic with (flag_pic || TARGET_FDPIC). Would doing this be > desirable? It shrinks the patch a bit but of course more strongly > codes the assumption that TARGET_FDPIC implies flag_pic. If FDPIC only ever will make sense in combination with flag_pic != 0, then I guess this could be done. If you do that, please add a comment above this hunk: > + if (TARGET_FDPIC && !flag_pic) > + flag_pic = 2; Some other nits: > rtx lab = function_symbol (func_addr_rtx, "__movmemSI12_i4", > SFUNC_STATIC).lab; Break overlong lines to fit into 80 columns. E.g. rtx lab = function_symbol (func_addr_rtx, "__movmemSI12_i4", SFUNC_STATIC).lab; > if (TARGET_FDPIC > && (TARGET_SHMEDIA || TARGET_SHCOMPACT || !TARGET_SH2)) > sorry ("non-SH2 FDPIC"); Drop SH5 stuff. > if (TARGET_FDPIC) > { > emit_move_insn (gen_rtx_REG (Pmode, PIC_REG), > sh_get_fdpic_reg_initial_val ()); > } > Remove braces around single statements. > return (GET_CODE (x) != CONST_DOUBLE > || mode == DFmode || mode == SFmode > || mode == DImode || GET_MODE (x) == VOIDmode); Remove unnecessary parens around return statements. When applying the patch I'm getting: patching file gcc/config/sh/sh-protos.h (Stripping trailing CRs from patch; use --binary to disable.) Maybe something with your editor settings? Cheers, Oleg