[PATCH] Fix warnings building pdp11 port

* config/pdp11/pdp11.c (pdp11_branch_cost): New function.
	* config/pdp11/pdp11.h (BRANCH_COST): Call function rather than
	inline macro expansion.

From-SVN: r228259
This commit is contained in:
Jeff Law 2015-09-29 10:56:04 -06:00 committed by Jeff Law
parent 7bf92e50de
commit ef295bcefe
4 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,9 @@
2015-09-29 Jeff Law <law@redhat.com>
* config/pdp11/pdp11.c (pdp11_branch_cost): New function.
* config/pdp11/pdp11.h (BRANCH_COST): Call function rather than
inline macro expansion.
* config/i386/t-interix (winnt-stubs.o): Fix compilation rule.
* config/sh/sh.c (gen_shl_and): Fix undefined left shift

View file

@ -47,3 +47,4 @@ extern void output_ascii (FILE *, const char *, int);
extern void pdp11_asm_output_var (FILE *, const char *, int, int, bool);
extern void pdp11_expand_prologue (void);
extern void pdp11_expand_epilogue (void);
extern int pdp11_branch_cost (void);

View file

@ -1933,4 +1933,10 @@ pdp11_scalar_mode_supported_p (machine_mode mode)
return default_scalar_mode_supported_p (mode);
}
int
pdp11_branch_cost ()
{
return (TARGET_BRANCH_CHEAP ? 0 : 1);
}
struct gcc_target targetm = TARGET_INITIALIZER;

View file

@ -660,8 +660,7 @@ extern rtx cc0_reg_rtx;
/* there is no point in avoiding branches on a pdp,
since branches are really cheap - I just want to find out
how much difference the BRANCH_COST macro makes in code */
#define BRANCH_COST(speed_p, predictable_p) (TARGET_BRANCH_CHEAP ? 0 : 1)
#define BRANCH_COST(speed_p, predictable_p) pdp11_branch_cost ()
#define COMPARE_FLAG_MODE HImode