public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix microblaze sim build error
@ 2021-04-01  5:18 Martin Liška
  2021-04-01 13:49 ` Mike Frysinger
  2021-04-02 11:18 ` Michael Eager
  0 siblings, 2 replies; 4+ messages in thread
From: Martin Liška @ 2021-04-01  5:18 UTC (permalink / raw)
  To: binutils

I see the following error for --target=microblaze-elf:

../../../sim/microblaze/interp.c: In function ‘sim_engine_run’:
../../../sim/microblaze/interp.c:147:39: error: passing argument 2 of ‘get_insn_microblaze’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  147 |       op = get_insn_microblaze (inst, &imm_unsigned, &insn_type,
      |                                       ^~~~~~~~~~~~~
      |                                       |
      |                                       int *
In file included from ../../bfd/bfd.h:45,
                 from ../../../sim/microblaze/interp.c:24:
../../../sim/microblaze/../../opcodes/microblaze-dis.h:34:57: note: expected ‘_Bool *’ but argument is of type ‘int *’
   34 | extern enum microblaze_instr get_insn_microblaze (long, bool *,
      |                                                         ^

sim/microblaze/ChangeLog:

	* interp.c (sim_engine_run): Use bool instead of int.
---
 sim/microblaze/interp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 5b125a64da2..8a9dbc3245a 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -126,7 +126,7 @@ sim_engine_run (SIM_DESC sd,
   int cycs;
   word WLhash;
   ubyte carry;
-  int imm_unsigned;
+  bool imm_unsigned;
   short ra, rb, rd;
   long immword;
   uword oldpc, newpc;
-- 
2.30.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix microblaze sim build error
  2021-04-01  5:18 [PATCH] Fix microblaze sim build error Martin Liška
@ 2021-04-01 13:49 ` Mike Frysinger
  2021-04-01 13:53   ` Martin Liška
  2021-04-02 11:18 ` Michael Eager
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2021-04-01 13:49 UTC (permalink / raw)
  To: Martin Liška; +Cc: binutils

thanks, lgtm.  i was just going to make the same change :x.
-mike

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix microblaze sim build error
  2021-04-01 13:49 ` Mike Frysinger
@ 2021-04-01 13:53   ` Martin Liška
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liška @ 2021-04-01 13:53 UTC (permalink / raw)
  To: binutils

On 4/1/21 3:49 PM, Mike Frysinger wrote:
> thanks, lgtm.  i was just going to make the same change :x.
> -mike
> 

Thanks, I've just pushed the commit.

Cheers,
Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix microblaze sim build error
  2021-04-01  5:18 [PATCH] Fix microblaze sim build error Martin Liška
  2021-04-01 13:49 ` Mike Frysinger
@ 2021-04-02 11:18 ` Michael Eager
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Eager @ 2021-04-02 11:18 UTC (permalink / raw)
  To: Martin Liška, binutils

On 3/31/21 10:18 PM, Martin Liška wrote:
> I see the following error for --target=microblaze-elf:
> 
> ../../../sim/microblaze/interp.c: In function ‘sim_engine_run’:
> ../../../sim/microblaze/interp.c:147:39: error: passing argument 2 of ‘get_insn_microblaze’ from incompatible pointer type [-Werror=incompatible-pointer-types]
>    147 |       op = get_insn_microblaze (inst, &imm_unsigned, &insn_type,
>        |                                       ^~~~~~~~~~~~~
>        |                                       |
>        |                                       int *
> In file included from ../../bfd/bfd.h:45,
>                   from ../../../sim/microblaze/interp.c:24:
> ../../../sim/microblaze/../../opcodes/microblaze-dis.h:34:57: note: expected ‘_Bool *’ but argument is of type ‘int *’
>     34 | extern enum microblaze_instr get_insn_microblaze (long, bool *,
>        |                                                         ^
> 
> sim/microblaze/ChangeLog:
> 
> 	* interp.c (sim_engine_run): Use bool instead of int.
> ---
>   sim/microblaze/interp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
> index 5b125a64da2..8a9dbc3245a 100644
> --- a/sim/microblaze/interp.c
> +++ b/sim/microblaze/interp.c
> @@ -126,7 +126,7 @@ sim_engine_run (SIM_DESC sd,
>     int cycs;
>     word WLhash;
>     ubyte carry;
> -  int imm_unsigned;
> +  bool imm_unsigned;
>     short ra, rb, rd;
>     long immword;
>     uword oldpc, newpc;
> 

OK to apply.

-- 
Michael Eager

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-02 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  5:18 [PATCH] Fix microblaze sim build error Martin Liška
2021-04-01 13:49 ` Mike Frysinger
2021-04-01 13:53   ` Martin Liška
2021-04-02 11:18 ` Michael Eager

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).