These are failing because of the following:

cc1plus: warnings being treated as errors
build/SPARC_SE/cpu/o3/inst_queue_impl.hh: In member function 'void
InstructionQueue<Impl>::scheduleReadyInsts() [with Impl = O3CPUImpl]':
build/SPARC_SE/cpu/o3/inst_queue.cc:35:   instantiated from here
build/SPARC_SE/cpu/o3/inst_queue_impl.h:751: warning: NULL used in
arithmetic

This warning seems to be going on specifically on gcc 4.2.4 which is
what's on zizzer. The warning looks pretty bogus (it's a comparison, not
arithmetic) but there may be some weirdness coming from the fact that
there's a reference counting pointer in there. I'd say it's most likely
a compiler bug. In any case, this is being triggered by the recent
change to make O3 re-execute memory instructions whose translation has
been delayed, and the attached patch fixes it. This gets rid of the
assignment in the while condition (clever, but perhaps overly clever).
It evaluates the pointer directly instead of comparing it to NULL, and
that looks too much like it was meant to be a test for equality to leave
in the while condition.

I would appreciate it if the ARM folks could please look this patch over
and make sure that code is still doing what you expected it to (it
should be functionally equivalent, but I'm being paranoid) and if so
commit it.

Gabe

On 02/13/11 00:50, Cron Daemon wrote:
> scons: *** [build/ALPHA_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ALPHA_SE_MOESI_hammer/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ALPHA_SE_MESI_CMP_directory/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ALPHA_SE_MOESI_CMP_directory/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ALPHA_SE_MOESI_CMP_token/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ALPHA_FS/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/MIPS_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/POWER_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/SPARC_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/X86_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ARM_SE/cpu/o3/inst_queue.fo] Error 1
> scons: *** [build/ARM_FS/cpu/o3/inst_queue.fo] Error 1
> ***** 
> build/SPARC_FS/tests/fast/long/80.solaris-boot/sparc/solaris/t1000-simple-atomic
>  passed.
>
> See /z/m5/regression/regress-2011-02-13-03:00:01 for details.
>
> _______________________________________________
> m5-dev mailing list
> m5-dev@m5sim.org
> http://m5sim.org/mailman/listinfo/m5-dev

# HG changeset patch
# Parent e8f4bb35dca98e5b7ed24974f99205431df42f03
O3: Pacify gcc 4.2.4 which gets upset about comparing a pointer with NULL.

gcc 4.2.4 throws a warning about NULL being used in arithmetic when compiling
this bit of code in O3. The warning does not seem to be legitimate and is most
likely a compiler bug. This change turns the comparison into evaluating the
pointer as true or false directly which pacifies gcc. Because the assignment
in the while loop condition would look like a broken test for equality without
the comparison to NULL, it was moved into the body of the loop.


diff -r e8f4bb35dca9 -r f585d47d653f src/cpu/o3/inst_queue_impl.hh
--- a/src/cpu/o3/inst_queue_impl.hh     Sat Feb 12 11:41:20 2011 -0600
+++ b/src/cpu/o3/inst_queue_impl.hh     Sun Feb 13 03:09:13 2011 -0800
@@ -748,8 +748,10 @@
 
     DynInstPtr deferred_mem_inst;
     int total_deferred_mem_issued = 0;
-    while (total_deferred_mem_issued < totalWidth &&
-           (deferred_mem_inst = getDeferredMemInstToExecute()) != NULL) {
+    while (total_deferred_mem_issued < totalWidth) {
+        deferred_mem_inst = getDeferredMemInstToExecute();
+        if (!deferred_mem_inst)
+            break;
         issueToExecuteQueue->access(0)->size++;
         instsToExecute.push_back(deferred_mem_inst);
         total_deferred_mem_issued++;
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to