summaryrefslogtreecommitdiff
path: root/gcc/config/pdp11
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-29 16:56:04 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2015-09-29 16:56:04 +0000
commitc6fc406c69342fdcca25ee48294bd43dd90facc2 (patch)
tree63aafc91f2eddb4d6eebae2829cef7b143ab91d6 /gcc/config/pdp11
parent2fd8962cd11401e6cb1a8f0a41f950ec50b35e58 (diff)
downloadgcc-c6fc406c69342fdcca25ee48294bd43dd90facc2.tar.gz
[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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228259 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pdp11')
-rw-r--r--gcc/config/pdp11/pdp11-protos.h1
-rw-r--r--gcc/config/pdp11/pdp11.c6
-rw-r--r--gcc/config/pdp11/pdp11.h3
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/pdp11/pdp11-protos.h b/gcc/config/pdp11/pdp11-protos.h
index 86c6da3760b..aca3d828e0b 100644
--- a/gcc/config/pdp11/pdp11-protos.h
+++ b/gcc/config/pdp11/pdp11-protos.h
@@ -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);
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index f0c2a5d8c9c..8eb37c64a25 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -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;
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 1d947f38a97..8339f1c8dc9 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -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