[gem5-dev] Re: ARM build failures

2020-09-01 Thread Andreas Sandberg via gem5-dev

+ Ciro, Richard

Hi Everyone,

Thanks for pointing this out and submitting a fix.

Richard/Ciro/Giacomo: Could one of you review this so we can merge the fix?

Thanks,
Andreas

On 31/08/2020 05:41, Bobby Bruce wrote:
Hey Gabe,

Iru Cai made a fix for this a week or so ago: 
https://gem5-review.googlesource.com/c/public/gem5/+/33154. Not sure if this 
addresses all concerns, but their change is mostly basic reduction due to `imm` 
and `ecount` being unsigned. I also find if you take on board these 
observations, there's at least one unreachable branch, and one condition that's 
always true (see my comments in the Gerrit PatchSet).

Kind regards,
Bobby
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Sun, Aug 30, 2020 at 3:52 AM Gabe Black via gem5-dev 
mailto:gem5-dev@gem5.org>> wrote:
Hi folks. I'm seeing a few build failures for ARM with gcc version 10.2. Since 
these look like they may be real bugs and I don't want to make a mess fixing 
them or do a bunch of research, I'll mention them here so we can collectively 
find the right fix. There are a lot of instances of these two:

build/ARM/arch/arm/generated/exec-ns.cc.inc:278501:40: error: comparison of 
unsigned express
ion in '>= 0' is always true [-Werror=type-limits]
278501 | bool posCount = ((count * imm) >= 0);


build/ARM/arch/arm/generated/exec-ns.cc.inc:278970:40: error: comparison of 
unsigned express
ion in '< 0' is always false [-Werror=type-limits]
278970 | bool negCount = ((count * imm) < 0);

I'm not sure what's going on with these. Maybe applying the same template with 
both signed and unsigned imm and count fields? As far as I can tell with a 
little digging around, imm is usually unsigned. I'm not sure where count comes 
from, but I'm guessing also unsigned?

build/ARM/arch/arm/generated/exec-ns.cc.inc:169243:29: error: 
'destReg.ArmISAInst::VqdmulhsQ
<_Element>::execute::RegVect::regs[0]' may be used uninitialized 
in this functi
on [-Werror=maybe-uninitialized]
169243 | FpDestP0 = letoh(destReg.regs[0]);

I haven't looked into these at all.

build/ARM/arch/arm/generated/exec-ns.cc.inc:169491:17: error: comparison of 
unsigned express
ion in '< 0' is always false [-Werror=type-limits]
169491 | if (imm < 0 && imm >= eCount) {

This one looks really fishy. How would imm be both less than 0 and also greater 
than eCount? Is eCount negative? Is it ok for it to be just a little negative? 
Is this supposed to be an ||? Apparently imm is unsigned anyway, so comparing 
it with 0 is pointless.

Gabe
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to 
gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: ARM build failures

2020-08-30 Thread Bobby Bruce via gem5-dev
Hey Gabe,

Iru Cai made a fix for this a week or so ago:
https://gem5-review.googlesource.com/c/public/gem5/+/33154. Not sure if
this addresses all concerns, but their change is mostly basic reduction due
to `imm` and `ecount` being unsigned. I also find if you take on board
these observations, there's at least one unreachable branch, and one
condition that's always true (see my comments in the Gerrit PatchSet).

Kind regards,
Bobby
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Sun, Aug 30, 2020 at 3:52 AM Gabe Black via gem5-dev 
wrote:

> Hi folks. I'm seeing a few build failures for ARM with gcc version 10.2.
> Since these look like they may be real bugs and I don't want to make a mess
> fixing them or do a bunch of research, I'll mention them here so we can
> collectively find the right fix. There are a lot of instances of these two:
>
> build/ARM/arch/arm/generated/exec-ns.cc.inc:278501:40: error: comparison
> of unsigned express
> ion in '>= 0' is always true [-Werror=type-limits]
> 278501 | bool posCount = ((count * imm) >= 0);
>
>
> build/ARM/arch/arm/generated/exec-ns.cc.inc:278970:40: error: comparison
> of unsigned express
> ion in '< 0' is always false [-Werror=type-limits]
> 278970 | bool negCount = ((count * imm) < 0);
>
> I'm not sure what's going on with these. Maybe applying the same template
> with both signed and unsigned imm and count fields? As far as I can tell
> with a little digging around, imm is usually unsigned. I'm not sure where
> count comes from, but I'm guessing also unsigned?
>
> build/ARM/arch/arm/generated/exec-ns.cc.inc:169243:29: error: '
> destReg.ArmISAInst::VqdmulhsQ
> <_Element>::execute::RegVect::regs[0]' may be used
> uninitialized in this functi
> on [-Werror=maybe-uninitialized]
> 169243 | FpDestP0 = letoh(destReg.regs[0]);
>
> I haven't looked into these at all.
>
> build/ARM/arch/arm/generated/exec-ns.cc.inc:169491:17: error: comparison
> of unsigned express
> ion in '< 0' is always false [-Werror=type-limits]
> 169491 | if (imm < 0 && imm >= eCount) {
>
> This one looks really fishy. How would imm be both less than 0 and also
> greater than eCount? Is eCount negative? Is it ok for it to be just a
> little negative? Is this supposed to be an ||? Apparently imm is unsigned
> anyway, so comparing it with 0 is pointless.
>
> Gabe
> ___
> gem5-dev mailing list -- gem5-dev@gem5.org
> To unsubscribe send an email to gem5-dev-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s