public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1865] pdp11: Fix signednedd warnings, remove "register" keywords
@ 2021-06-29 7:27 Jan-Benedict Glaw
0 siblings, 0 replies; only message in thread
From: Jan-Benedict Glaw @ 2021-06-29 7:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dc6866b033b1b85f690bf32c0dae7d787cbf58f0
commit r12-1865-gdc6866b033b1b85f690bf32c0dae7d787cbf58f0
Author: Jan-Benedict Glaw <jbglaw@getslash.de>
Date: Tue Jun 29 09:23:07 2021 +0200
pdp11: Fix signednedd warnings, remove "register" keywords
gcc/ChangeLog:
* config/pdp11/pdp11.h (ASM_OUTPUT_SKIP): Fix signedness warning.
* config/pdp11/pdp11.c (pdp11_asm_print_operand_punct_valid_p): Remove
"register" keyword.
(pdp11_initial_elimination_offset) Remove unused variable.
(pdp11_cmp_length) Ditto.
(pdp11_insn_cost): Ditto, and fix signedness warning.
Diff:
---
gcc/config/pdp11/pdp11.c | 27 ++++++++++++---------------
gcc/config/pdp11/pdp11.h | 10 ++++++----
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c
index b663b43a29c..4cab3aee598 100644
--- a/gcc/config/pdp11/pdp11.c
+++ b/gcc/config/pdp11/pdp11.c
@@ -829,12 +829,12 @@ pdp11_asm_print_operand_punct_valid_p (unsigned char c)
}
void
-print_operand_address (FILE *file, register rtx addr)
+print_operand_address (FILE *file, rtx addr)
{
- register rtx breg;
+ rtx breg;
rtx offset;
int again = 0;
-
+
retry:
switch (GET_CODE (addr))
@@ -1160,12 +1160,11 @@ pdp11_addr_cost (rtx addr, machine_mode mode, addr_space_t as ATTRIBUTE_UNUSED,
static int
pdp11_insn_cost (rtx_insn *insn, bool speed)
{
- int base_cost, i;
+ int base_cost;
rtx pat, set, dest, src, src2;
machine_mode mode;
- const char *fmt;
enum rtx_code op;
-
+
if (recog_memoized (insn) < 0)
return 0;
@@ -1462,24 +1461,24 @@ bool
pushpop_regeq (rtx op, int regno)
{
rtx addr;
-
+
/* False if not memory reference. */
if (GET_CODE (op) != MEM)
return FALSE;
-
+
/* Get the address of the memory reference. */
addr = XEXP (op, 0);
if (GET_CODE (addr) == MEM)
addr = XEXP (addr, 0);
-
+
switch (GET_CODE (addr))
{
case PRE_DEC:
case POST_INC:
case PRE_MODIFY:
case POST_MODIFY:
- return REGNO (XEXP (addr, 0)) == regno;
+ return REGNO (XEXP (addr, 0)) == (unsigned) regno;
default:
return FALSE;
}
@@ -1771,8 +1770,7 @@ int
pdp11_initial_elimination_offset (int from, int to)
{
/* Get the size of the register save area. */
- int spoff;
-
+
if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM)
return get_frame_size ();
else if (from == ARG_POINTER_REGNUM && to == FRAME_POINTER_REGNUM)
@@ -2106,15 +2104,14 @@ pdp11_cmp_length (rtx *operands, int words)
{
rtx inops[2];
rtx exops[4][2];
- rtx lb[1];
int i, len = 0;
if (!reload_completed)
return 2;
-
+
inops[0] = operands[0];
inops[1] = operands[1];
-
+
pdp11_expand_operands (inops, exops, 2, words, NULL, big);
for (i = 0; i < words; i++)
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index a21ae648439..9bc5e089f49 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -618,10 +618,12 @@ extern int current_first_parm_offset;
fprintf (FILE, "\t.even\n")
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
- if (TARGET_DEC_ASM) \
- fprintf (FILE, "\t.blkb\t%o\n", (SIZE) & 0xffff); \
- else \
- fprintf (FILE, "\t.=.+ %#o\n", (SIZE) & 0xffff);
+ do { \
+ if (TARGET_DEC_ASM) \
+ fprintf (FILE, "\t.blkb\t%o\n", (int) ((SIZE) & 0xffff)); \
+ else \
+ fprintf (FILE, "\t.=.+ %#o\n", (int) ((SIZE) & 0xffff)); \
+ } while (0)
/* This says how to output an assembler line
to define a global common symbol. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-29 7:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 7:27 [gcc r12-1865] pdp11: Fix signednedd warnings, remove "register" keywords Jan-Benedict Glaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).