summaryrefslogtreecommitdiff
path: root/gcc/config/mips
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/mips')
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/mips/mips.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index cf6ec559672..d713550f68b 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5326,7 +5326,7 @@ mips_asm_file_end (file)
fatal_io_error (temp_filename);
while ((len = fread (buffer, 1, sizeof (buffer), asm_out_text_file)) > 0)
- if (fwrite (buffer, 1, len, file) != len)
+ if ((int) fwrite (buffer, 1, len, file) != len)
pfatal_with_name (asm_file_name);
if (len < 0)
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index edf6399f3bd..c0e543846a2 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -2180,7 +2180,7 @@ extern struct mips_frame_info current_frame_info;
#define CAN_ELIMINATE(FROM, TO) \
(((FROM) == RETURN_ADDRESS_POINTER_REGNUM && (! leaf_function_p () \
- || TO == GP_REG_FIRST + 31 && leaf_function_p)) \
+ || (TO == GP_REG_FIRST + 31 && leaf_function_p))) \
|| ((FROM) != RETURN_ADDRESS_POINTER_REGNUM \
&& ((TO) == HARD_FRAME_POINTER_REGNUM \
|| ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed \
@@ -2219,11 +2219,13 @@ extern struct mips_frame_info current_frame_info;
/* Some ABIs store 64 bits to the stack, but Pmode is 32 bits, \
so we must add 4 bytes to the offset to get the right value. */ \
else if ((FROM) == RETURN_ADDRESS_POINTER_REGNUM) \
+ { \
if (leaf_function_p ()) \
(OFFSET) = 0; \
else (OFFSET) = current_frame_info.gp_sp_offset \
+ ((UNITS_PER_WORD - (POINTER_SIZE / BITS_PER_UNIT)) \
* (BYTES_BIG_ENDIAN != 0)); \
+ } \
}
/* If we generate an insn to push BYTES bytes,