|
From: <sv...@va...> - 2013-09-15 23:38:55
|
Author: petarj
Date: Sun Sep 15 23:38:39 2013
New Revision: 2763
Log:
mips32: small cleanup in show_hwcaps_mips32
Small cleanup in show_hwcaps_mips32(). More will follow as we need to add
support for Cavium boards too.
Modified:
trunk/priv/main_main.c
Modified: trunk/priv/main_main.c
==============================================================================
--- trunk/priv/main_main.c (original)
+++ trunk/priv/main_main.c Sun Sep 15 23:38:39 2013
@@ -1428,41 +1428,25 @@
static const HChar* show_hwcaps_mips32 ( UInt hwcaps )
{
/* MIPS baseline. */
- if (hwcaps && VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
+ if (hwcaps & VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
/* MIPS baseline with dspr2. */
- if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
+ if (hwcaps & VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
return "MIPS-baseline-dspr2";
}
/* MIPS baseline with dsp. */
- if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
+ if (hwcaps & VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
return "MIPS-baseline-dsp";
}
return "MIPS-baseline";
}
/* Broadcom baseline. */
- if (hwcaps && VEX_PRID_COMP_BROADCOM == VEX_PRID_COMP_BROADCOM) {
- /* Broadcom baseline with dspr2. */
- if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
- return "Broadcom-baseline-dspr2";
- }
- /* Broadcom baseline with dsp. */
- if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
- return "Broadcom-baseline-dsp";
- }
+ if (hwcaps & VEX_PRID_COMP_BROADCOM == VEX_PRID_COMP_BROADCOM) {
return "Broadcom-baseline";
}
/* Netlogic baseline. */
- if (hwcaps && VEX_PRID_COMP_NETLOGIC == VEX_PRID_COMP_NETLOGIC) {
- /* Netlogic baseline with dspr2. */
- if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
- return "Netlogic-baseline-dspr2";
- }
- /* Netlogic baseline with dsp. */
- if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
- return "Netlogic-baseline-dsp";
- }
+ if (hwcaps & VEX_PRID_COMP_NETLOGIC == VEX_PRID_COMP_NETLOGIC) {
return "Netlogic-baseline";
}
|
|
From: Florian K. <fl...@ei...> - 2013-09-16 08:50:41
|
On 09/16/2013 01:38 AM, sv...@va... wrote:
>
> Modified: trunk/priv/main_main.c
> ==============================================================================
> --- trunk/priv/main_main.c (original)
> +++ trunk/priv/main_main.c Sun Sep 15 23:38:39 2013
> @@ -1428,41 +1428,25 @@
> static const HChar* show_hwcaps_mips32 ( UInt hwcaps )
> {
> /* MIPS baseline. */
> - if (hwcaps && VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
> + if (hwcaps & VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
This is probably not what you meant to say as the condition will
evaluate to false if hwcaps == VEX_PRID_COMP_MIPS.
Probably
if ((hwcaps & VEX_PRID_COMP_MIPS) == VEX_PRID_COMP_MIPS)
> /* MIPS baseline with dspr2. */
> - if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
> + if (hwcaps & VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
and likewise etc.
Florian
|
|
From: Petar J. <mip...@gm...> - 2013-09-16 10:43:50
|
True, I missed the parentheses, thanks. I am changing this part right now
anyway, so I will fix that with the next change.
Regards,
Petar
On Mon, Sep 16, 2013 at 10:50 AM, Florian Krohm <fl...@ei...>wrote:
> On 09/16/2013 01:38 AM, sv...@va... wrote:
> >
> > Modified: trunk/priv/main_main.c
> >
> ==============================================================================
> > --- trunk/priv/main_main.c (original)
> > +++ trunk/priv/main_main.c Sun Sep 15 23:38:39 2013
> > @@ -1428,41 +1428,25 @@
> > static const HChar* show_hwcaps_mips32 ( UInt hwcaps )
> > {
> > /* MIPS baseline. */
> > - if (hwcaps && VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
> > + if (hwcaps & VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
>
> This is probably not what you meant to say as the condition will
> evaluate to false if hwcaps == VEX_PRID_COMP_MIPS.
> Probably
>
> if ((hwcaps & VEX_PRID_COMP_MIPS) == VEX_PRID_COMP_MIPS)
>
>
> > /* MIPS baseline with dspr2. */
> > - if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
> > + if (hwcaps & VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
>
> and likewise etc.
>
> Florian
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Valgrind-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
>
|