This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] tc-z8k.c: make some argument types bfd_reloc_code_real_type
- From: Trevor Saunders <tbsaunde at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 19 Jul 2016 11:39:30 -0000
- Subject: [binutils-gdb] tc-z8k.c: make some argument types bfd_reloc_code_real_type
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=35fec4ff7e9162cd4bb7dcb267dc7dde92f3e304
commit 35fec4ff7e9162cd4bb7dcb267dc7dde92f3e304
Author: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Date: Mon Jul 18 04:07:26 2016 -0400
tc-z8k.c: make some argument types bfd_reloc_code_real_type
gas/ChangeLog:
2016-07-19 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-z8k.c (newfix): Make type of type argument
bfd_reloc_code_real_type.
(apply_fix): Likewise.
Diff:
---
gas/ChangeLog | 6 ++++++
gas/config/tc-z8k.c | 11 ++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index eaaf108..31da783 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2016-07-19 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
+
+ * config/tc-z8k.c (newfix): Make type of type argument
+ bfd_reloc_code_real_type.
+ (apply_fix): Likewise.
+
2016-07-16 Alan Modra <amodra@gmail.com>
* config/tc-epiphany.c: Don't include libbfd.h.
diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c
index 265adc6..9b6ee38 100644
--- a/gas/config/tc-z8k.c
+++ b/gas/config/tc-z8k.c
@@ -956,9 +956,8 @@ get_specific (opcode_entry_type *opcode, op_type *operands)
static char buffer[20];
static void
-newfix (int ptr, int type, int size, expressionS *operand)
+newfix (int ptr, bfd_reloc_code_real_type type, int size, expressionS *operand)
{
- int is_pcrel = 0;
fixS *fixP;
/* Size is in nibbles. */
@@ -966,12 +965,17 @@ newfix (int ptr, int type, int size, expressionS *operand)
|| operand->X_op_symbol
|| operand->X_add_number)
{
+ int is_pcrel;
switch(type)
{
case BFD_RELOC_8_PCREL:
case BFD_RELOC_Z8K_CALLR:
case BFD_RELOC_Z8K_DISP7:
is_pcrel = 1;
+ break;
+ default:
+ is_pcrel = 0;
+ break;
}
fixP = fix_new_exp (frag_now, ptr, size / 2,
operand, is_pcrel, type);
@@ -981,7 +985,8 @@ newfix (int ptr, int type, int size, expressionS *operand)
}
static char *
-apply_fix (char *ptr, int type, expressionS *operand, int size)
+apply_fix (char *ptr, bfd_reloc_code_real_type type, expressionS *operand,
+ int size)
{
long n = operand->X_add_number;