[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v7 07/35] Hexagon (target/hexagon) scalar core helpers
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v7 07/35] Hexagon (target/hexagon) scalar core helpers |
Date: |
Fri, 22 Jan 2021 21:50:31 +0000 |
> -----Original Message-----
> From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> On
> Behalf Of Philippe Mathieu-Daudé
> Sent: Friday, January 22, 2021 2:30 PM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: richard.henderson@linaro.org; alex.bennee@linaro.org;
> laurent@vivier.eu; ale@rev.ng; Brian Cain <bcain@quicinc.com>
> Subject: Re: [PATCH v7 07/35] Hexagon (target/hexagon) scalar core helpers
>
> Hi Taylor,
>
> On 1/20/21 4:28 AM, Taylor Simpson wrote:
> > The majority of helpers are generated. Define the helper functions
> needed
> > then include the generated file
> >
> > Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
> > ---
> > target/hexagon/helper.h | 85 ++++
> > target/hexagon/op_helper.c | 1066
> ++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 1151 insertions(+)
> > create mode 100644 target/hexagon/helper.h
> > create mode 100644 target/hexagon/op_helper.c
> ...
>
> > diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c
> > new file mode 100644
> > index 0000000..5186dd1
> > --- /dev/null
> > +++ b/target/hexagon/op_helper.c
> > @@ -0,0 +1,1066 @@
> > +/*
>
> I'm getting:
>
> In file included from ../target/hexagon/op_helper.c:23:
> ../target/hexagon/op_helper.c: In function ‘log_reg_write_pair’:
> ../target/hexagon/op_helper.c:74:19: error: format ‘%ld’ expects
> argument of type ‘long int’, but argument 4 has type ‘int64_t’ {aka
> ‘long long int’} [-Werror=format=]
> 74 | HEX_DEBUG_LOG("log_reg_write_pair[%d:%d] = %ld\n", rnum + 1,
> rnum, val);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~
> |
> |
> |
> int64_t {aka long long int}
> ../target/hexagon/internal.h:28:22: note: in definition of macro
> ‘HEX_DEBUG_LOG’
> 28 | qemu_log(__VA_ARGS__); \
> | ^~~~~~~~~~~
> ../target/hexagon/op_helper.c:74:50: note: format string is defined here
> 74 | HEX_DEBUG_LOG("log_reg_write_pair[%d:%d] = %ld\n", rnum + 1,
> rnum, val);
> | ~~^
> | |
> | long int
> | %lld
> In file included from ../target/hexagon/op_helper.c:23:
> ../target/hexagon/op_helper.c: In function ‘log_store64’:
> ../target/hexagon/op_helper.c:109:19: error: format ‘%ld’ expects
> argument of type ‘long int’, but argument 4 has type ‘int64_t’ {aka
> ‘long long int’} [-Werror=format=]
> 109 | HEX_DEBUG_LOG("log_store%d(0x" TARGET_FMT_lx ", %ld
> [0x%lx])\n",
> | ^~~~~~~~~~~~~~~~
> 110 | width, addr, val, val);
> | ~~~
> | |
> | int64_t {aka long long int}
> ../target/hexagon/internal.h:28:22: note: in definition of macro
> ‘HEX_DEBUG_LOG’
> 28 | qemu_log(__VA_ARGS__); \
> | ^~~~~~~~~~~
> ../target/hexagon/op_helper.c:109:19: error: format ‘%lx’ expects
> argument of type ‘long unsigned int’, but argument 5 has type ‘int64_t’
> {aka ‘long long int’} [-Werror=format=]
> 109 | HEX_DEBUG_LOG("log_store%d(0x" TARGET_FMT_lx ", %ld
> [0x%lx])\n",
> | ^~~~~~~~~~~~~~~~
> 110 | width, addr, val, val);
> | ~~~
> | |
> | int64_t {aka long long int}
> ../target/hexagon/internal.h:28:22: note: in definition of macro
> ‘HEX_DEBUG_LOG’
> 28 | qemu_log(__VA_ARGS__); \
> | ^~~~~~~~~~~
> ../target/hexagon/op_helper.c: In function ‘print_store’:
> ../target/hexagon/op_helper.c:201:27: error: format ‘%lu’ expects
> argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’
> {aka ‘long long unsigned int’} [-Werror=format=]
> 201 | HEX_DEBUG_LOG("\tmemd[0x" TARGET_FMT_lx "] = %lu
> (0x%016lx)\n",
> | ^~~~~~~~~~~
> 202 | env->mem_log_stores[slot].va,
> 203 | env->mem_log_stores[slot].data64,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | uint64_t {aka
> long long unsigned int}
> ../target/hexagon/internal.h:28:22: note: in definition of macro
> ‘HEX_DEBUG_LOG’
> 28 | qemu_log(__VA_ARGS__); \
> | ^~~~~~~~~~~
> ../target/hexagon/op_helper.c:201:27: error: format ‘%lx’ expects
> argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’
> {aka ‘long long unsigned int’} [-Werror=format=]
> 201 | HEX_DEBUG_LOG("\tmemd[0x" TARGET_FMT_lx "] = %lu
> (0x%016lx)\n",
> | ^~~~~~~~~~~
> ......
> 204 | env->mem_log_stores[slot].data64);
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | |
> | uint64_t {aka
> long long unsigned int}
> ../target/hexagon/internal.h:28:22: note: in definition of macro
> ‘HEX_DEBUG_LOG’
> 28 | qemu_log(__VA_ARGS__); \
> | ^~~~~~~~~~~
Strange, I don't see those errors. I tested it on Ubuntu 16 with gcc 4.8 and
5.5 and Ubuntu 20 with gcc 9.3. Could you tell me more about the system you
are building on?
All of those HEX_DEBUG_LOG calls should be #ifdef'ed out. Did you change the
definition of HEX_DEBUG in internal.h? Even when I set HEX_DEBUG to 1, I don't
see these errors.
Thanks,
Taylor
- [PATCH v7 13/35] Hexagon (target/hexagon) instruction/packet decode, (continued)
- [PATCH v7 13/35] Hexagon (target/hexagon) instruction/packet decode, Taylor Simpson, 2021/01/19
- [PATCH v7 02/35] Hexagon (target/hexagon) README, Taylor Simpson, 2021/01/19
- [PATCH v7 03/35] Hexagon (include/elf.h) ELF machine definition, Taylor Simpson, 2021/01/19
- [PATCH v7 25/35] Hexagon (target/hexagon) instruction classes, Taylor Simpson, 2021/01/19
- [PATCH v7 06/35] Hexagon (target/hexagon) register names, Taylor Simpson, 2021/01/19
- [PATCH v7 21/35] Hexagon (target/hexagon) generator phase 3 - C preprocessor for decode tree, Taylor Simpson, 2021/01/19
- [PATCH v7 07/35] Hexagon (target/hexagon) scalar core helpers, Taylor Simpson, 2021/01/19
- [PATCH v7 10/35] Hexagon (target/hexagon) instruction and packet types, Taylor Simpson, 2021/01/19
- [PATCH v7 24/35] Hexagon (target/hexagon) macros, Taylor Simpson, 2021/01/19
- [PATCH v7 09/35] Hexagon (target/hexagon) architecture types, Taylor Simpson, 2021/01/19
- [PATCH v7 12/35] Hexagon (target/hexagon) instruction attributes, Taylor Simpson, 2021/01/19
[PATCH v7 11/35] Hexagon (target/hexagon) register fields, Taylor Simpson, 2021/01/19