* [PATCH 2/2] rx: make field type enum
2016-05-18 3:25 [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type tbsaunde+binutils
@ 2016-05-18 3:25 ` tbsaunde+binutils
2016-05-18 4:14 ` Alan Modra
2016-05-18 4:13 ` [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type Alan Modra
1 sibling, 1 reply; 4+ messages in thread
From: tbsaunde+binutils @ 2016-05-18 3:25 UTC (permalink / raw)
To: binutils
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
Hi,
Same as previous with a different enum type.
built and regtested cross to rx-elf, ok?
Trev
gas/ChangeLog:
2016-05-17 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-rx.c (struct cpu_type): Change the type of a field from
int to enum rx_cpu_types.
---
gas/config/tc-rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c
index a1590ac..834a76b 100644
--- a/gas/config/tc-rx.c
+++ b/gas/config/tc-rx.c
@@ -109,7 +109,7 @@ size_t md_longopts_size = sizeof (md_longopts);
struct cpu_type
{
const char *cpu_name;
- int type;
+enum rx_cpu_types type;
};
struct cpu_type cpu_type_list[] =
--
2.7.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type
@ 2016-05-18 3:25 tbsaunde+binutils
2016-05-18 3:25 ` [PATCH 2/2] rx: make field type enum tbsaunde+binutils
2016-05-18 4:13 ` [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type Alan Modra
0 siblings, 2 replies; 4+ messages in thread
From: tbsaunde+binutils @ 2016-05-18 3:25 UTC (permalink / raw)
To: binutils
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
HI,
$subject, they only ever hold values of the enum so this seems clearer.
built and regtested cross to dlx-elf, and tic4x-coff, ok?
Trev
gas/ChangeLog:
2016-05-17 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-dlx.c (struct machine_it): change the type of a field from
int to bfd_reloc_code_real_type.
* config/tc-tic4x.c: Likewise.
---
gas/config/tc-dlx.c | 2 +-
gas/config/tc-tic4x.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c
index b636cec..03e8de9 100644
--- a/gas/config/tc-dlx.c
+++ b/gas/config/tc-dlx.c
@@ -52,7 +52,7 @@ struct machine_it
int pcrel;
int size;
int reloc_offset; /* Offset of reloc within insn. */
- int reloc;
+ bfd_reloc_code_real_type reloc;
int HI;
int LO;
}
diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c
index 97f830c..16fa8b2 100644
--- a/gas/config/tc-tic4x.c
+++ b/gas/config/tc-tic4x.c
@@ -124,7 +124,7 @@ typedef struct tic4x_insn
unsigned int nchars; /* This is always 4 for the C30. */
unsigned long opcode; /* Opcode number. */
expressionS exp; /* Expression required for relocation. */
- int reloc; /* Relocation type required. */
+ bfd_reloc_code_real_type reloc; /* Relocation type required. */
int pcrel; /* True if relocation PC relative. */
char *pname; /* Name of instruction in parallel. */
unsigned int num_operands; /* Number of operands in total. */
--
2.7.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type
2016-05-18 3:25 [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type tbsaunde+binutils
2016-05-18 3:25 ` [PATCH 2/2] rx: make field type enum tbsaunde+binutils
@ 2016-05-18 4:13 ` Alan Modra
1 sibling, 0 replies; 4+ messages in thread
From: Alan Modra @ 2016-05-18 4:13 UTC (permalink / raw)
To: tbsaunde+binutils; +Cc: binutils
On Tue, May 17, 2016 at 11:25:01PM -0400, tbsaunde+binutils@tbsaunde.org wrote:
> * config/tc-dlx.c (struct machine_it): change the type of a field from
> int to bfd_reloc_code_real_type.
> * config/tc-tic4x.c: Likewise.
OK, but
> --- a/gas/config/tc-tic4x.c
> +++ b/gas/config/tc-tic4x.c
> @@ -124,7 +124,7 @@ typedef struct tic4x_insn
> unsigned int nchars; /* This is always 4 for the C30. */
> unsigned long opcode; /* Opcode number. */
> expressionS exp; /* Expression required for relocation. */
> - int reloc; /* Relocation type required. */
> + bfd_reloc_code_real_type reloc; /* Relocation type required. */
Please fix overly long line.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] rx: make field type enum
2016-05-18 3:25 ` [PATCH 2/2] rx: make field type enum tbsaunde+binutils
@ 2016-05-18 4:14 ` Alan Modra
0 siblings, 0 replies; 4+ messages in thread
From: Alan Modra @ 2016-05-18 4:14 UTC (permalink / raw)
To: tbsaunde+binutils; +Cc: binutils
On Tue, May 17, 2016 at 11:25:02PM -0400, tbsaunde+binutils@tbsaunde.org wrote:
> * config/tc-rx.c (struct cpu_type): Change the type of a field from
> int to enum rx_cpu_types.
OK, but
> --- a/gas/config/tc-rx.c
> +++ b/gas/config/tc-rx.c
> @@ -109,7 +109,7 @@ size_t md_longopts_size = sizeof (md_longopts);
> struct cpu_type
> {
> const char *cpu_name;
> - int type;
> +enum rx_cpu_types type;
> };
Formatting.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-18 4:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 3:25 [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type tbsaunde+binutils
2016-05-18 3:25 ` [PATCH 2/2] rx: make field type enum tbsaunde+binutils
2016-05-18 4:14 ` Alan Modra
2016-05-18 4:13 ` [PATCH 1/2] change the type of some fields to bfd_reloc_code_real_type Alan Modra
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).