changeset 173006ed898a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=173006ed898a
description:
        hsail: disable asserts to allow immediate operands i.e. 0 with loads

diffstat:

 src/arch/hsail/operand.cc |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r ad7e8afa0dfe -r 173006ed898a src/arch/hsail/operand.cc
--- a/src/arch/hsail/operand.cc Fri Dec 02 18:01:57 2016 -0500
+++ b/src/arch/hsail/operand.cc Fri Dec 02 18:01:58 2016 -0500
@@ -317,14 +317,25 @@
     const BrigDirective *d =
         (BrigDirective*)obj->getCodeSectionEntry(op->symbol);
 
-    assert(d->kind == BRIG_KIND_DIRECTIVE_VARIABLE);
+    /**
+     * HSAIL does not properly handle immediate offsets for instruction types
+     * that utilize them. It currently only supports instructions that use
+     * variables instead. Again, these pop up in code that is never executed
+     * (i.e. the HCC AMP codes) so we just hack it here to let us pass through
+     * the HSAIL object initialization. If such code is ever called, we would
+     * have to implement this properly.
+     */
+    if (d->kind != BRIG_KIND_DIRECTIVE_VARIABLE) {
+        warn("HSAIL implementation does not support instructions with "
+             "address calculations where the operand is not a variable\n");
+    }
+
     const BrigDirectiveVariable *sym = (BrigDirectiveVariable*)d;
     name = obj->getString(sym->name);
 
     if (sym->segment != BRIG_SEGMENT_ARG) {
         storageElement =
             obj->currentCode->storageMap->findSymbol(sym->segment, name);
-        assert(storageElement);
         offset = 0;
     } else {
         // sym->name does not work for BRIG_SEGMENT_ARG for the following case:
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to