I have committed the original change. Let me know if there is a problem Best, -Rick
[email protected] wrote: > Sorry for not responding sooner. I thought Rick was going to commit his > change. > This is the bit of code that traces the macroop on request. For that to > happen, > ExecMacro needs to be turned on and the current instruction needs to be a > microop (and hence have a macroop). Beyond that you also (&&) need to either > be > tracing microops and be on the first microop (the macroop is before the first > microop), or not tracing microops and be committing the last microop. The > version Rick has, if equivalent to what I had (which I think it is) has the > correct behavior and I believe is otherwise correct. > > Rick, could you or someone on your behalf please commit your fix? I won't be > home for a while and I don't touch m5 code at work. > > Gabe > > Quoting nathan binkert <[email protected]>: > > >> I was trying to compile and so I fixed this in my own tree, and in the >> process, I came to the conclusion that this actually found a >> legitimate bug. (+1 for leaving the warning on) >> >> The thing is, I'm not at all clear on what the intended behavior is. >> There are redundant terms in the version that's committed. >> >> Do you have an && on the first line where you intended to have an || ? >> >> My guess is a bit different than Rick's. I'm guessing that you intended >> this: >> >> if ((IsOn(ExecMacro) && staticInst->isMicroop()) || >> (IsOn(ExecMicro) && macroStaticInst && staticInst->isFirstMicroop()) >> || >> (!IsOn(ExecMicro) && macroStaticInst && staticInst->isLastMicroop())) >> { >> traceInst(macroStaticInst, false); >> } >> >> Anyways, please commit a fix asap, or else I'll just have to commit a >> guess and put in a panic so that the tree will build again. >> >> btw, you can just install gcc 4.3 and set the CC and CXX parameters to SCons: >> scons CC=gcc-4.3 CXX=g++-4.3 <args> >> >> Nate >> >> >> >> On Thu, Jan 8, 2009 at 11:36 AM, Rick Strong <[email protected]> wrote: >> >>> Hi all, >>> >>> It appears that there is a compiler error in src/cpu/exetrace.cc for gcc >>> version 4.3.2 for m5dev. >>> >>> >>> scons: Building targets ... >>> g++ -o /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.do -c >>> -Wno-deprecated -pipe -fno-strict-aliasing -Wall -Wno-sign-compare >>> -Werror -Wundef -ggdb3 -DTHE_ISA=ALPHA_ISA -DDEBUG -DTRACING_ON=1 >>> -Iext/dnet -I/usr/include/python2.5 >>> -I/home/rstrong/build/m5dev/build/libelf >>> -I/home/rstrong/build/m5dev/build/gzstream >>> -I/home/rstrong/build/m5dev/build/ALPHA_SE >>> /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc >>> cc1plus: warnings being treated as errors >>> /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc: In member >>> function 'virtual void Trace::ExeTracerRecord::dump()': >>> /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc:134: error: >>> suggest parentheses around && within || >>> /home/rstrong/build/m5dev/build/ALPHA_SE/arch/alpha/isa_traits.hh: At >>> global scope: >>> /home/rstrong/build/m5dev/build/ALPHA_SE/arch/alpha/isa_traits.hh:159: >>> error: 'AlphaISA::SyscallPseudoReturnReg' defined but not used >>> scons: *** [/home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.do] >>> Error 1 >>> scons: building terminated because of errors. >>> >>> >>> The fix I propose below fixes this with a simple addition of an extra >>> set of parenthesis. Does everyone agree? Has anyone else had this >>> problem from m5dev? >>> >>> diff -r 9279812da5ee src/cpu/exetrace.cc >>> --- a/src/cpu/exetrace.cc Wed Jan 07 00:05:33 2009 -0800 >>> +++ b/src/cpu/exetrace.cc Thu Jan 08 04:13:52 2009 -0800 >>> @@ -128,10 +128,10 @@ >>> * complete/print when they fault. >>> */ >>> if (IsOn(ExecMacro) && staticInst->isMicroop() && >>> - (IsOn(ExecMicro) && >>> + ((IsOn(ExecMicro) && >>> macroStaticInst && staticInst->isFirstMicroop()) || >>> (!IsOn(ExecMicro) && >>> - macroStaticInst && staticInst->isLastMicroop())) { >>> + macroStaticInst && staticInst->isLastMicroop()))) { >>> traceInst(macroStaticInst, false); >>> } >>> if (IsOn(ExecMicro) || !staticInst->isMicroop()) { >>> >>> >>> >>> Best, >>> -Rick >>> _______________________________________________ >>> m5-dev mailing list >>> [email protected] >>> http://m5sim.org/mailman/listinfo/m5-dev >>> >>> >>> >> _______________________________________________ >> m5-dev mailing list >> [email protected] >> http://m5sim.org/mailman/listinfo/m5-dev >> >> > > > > > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
