This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [hsa merge 08/10] HSAIL BRIG description header file
- From: Martin Jambor <mjambor at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 18 Jan 2016 16:22:18 +0100
- Subject: Re: [hsa merge 08/10] HSAIL BRIG description header file
- Authentication-results: sourceware.org; auth=none
- References: <20160113173925 dot 220029649 at virgil dot suse dot cz> <20160113173925 dot 842609640 at virgil dot suse dot cz> <20160114130447 dot GF3017 at tucnak dot redhat dot com> <m31t9jtzb3 dot fsf at pepe dot airs dot com> <20160115101433 dot GJ3982 at virgil dot suse dot cz> <20160115103732 dot GS3017 at tucnak dot redhat dot com> <20160115120335 dot GU3017 at tucnak dot redhat dot com> <20160115172305 dot GP3982 at virgil dot suse dot cz> <20160116114307 dot GM3017 at tucnak dot redhat dot com>
Hi,
On Sat, Jan 16, 2016 at 12:43:07PM +0100, Jakub Jelinek wrote:
> On Fri, Jan 15, 2016 at 06:23:05PM +0100, Martin Jambor wrote:
> > BRIG_KIND_OPERAND_REGISTER = 0x300a,
> > BRIG_KIND_OPERAND_STRING = 0x300b,
> > BRIG_KIND_OPERAND_WAVESIZE = 0x3009c,
> > BRIG_KIND_OPERAND_END = 0x300d
>
> The above looks weird, I'd have expected BRIG_KIND_OPERAND_WAVESIZE
> to be 0x300c instead. Bug in the standard?
> As typedef uint16_t BrigKind16_t;, I'm afraid this doesn't even fit
> into the data type. Note the original brig header you've posted
> had this fixed.
>
That is clearly a bug. We did not catch it whe comparing the compiler
binary because we never use this constant. Have you found this by
hand or did you do any more systematic comparison?
BRIG is always validated when finalized and I belive that fortunately
this particular bug would be caught by that as would majority of
similar "random" ones.
I am going to commit the following patch to the branch.
Thanks for spotting this.
Martin
2016-01-18 Martin Jambor <mjambor@suse.cz>
* hsa-brig-format.h (BrigKind): Fix the value of
BRIG_KIND_OPERAND_WAVESIZE.
---
gcc/hsa-brig-format.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/hsa-brig-format.h b/gcc/hsa-brig-format.h
index 247799b..e1c6cd2 100644
--- a/gcc/hsa-brig-format.h
+++ b/gcc/hsa-brig-format.h
@@ -303,7 +303,7 @@ enum BrigKind
BRIG_KIND_OPERAND_OPERAND_LIST = 0x3009,
BRIG_KIND_OPERAND_REGISTER = 0x300a,
BRIG_KIND_OPERAND_STRING = 0x300b,
- BRIG_KIND_OPERAND_WAVESIZE = 0x3009c,
+ BRIG_KIND_OPERAND_WAVESIZE = 0x300c,
BRIG_KIND_OPERAND_END = 0x300d
};
--
2.6.4