Changeset 6198 for icGREP


Ignore:
Timestamp:
Nov 12, 2018, 11:13:25 AM (3 months ago)
Author:
cameron
Message:

Fixes for byte-bit grep mode

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r6186 r6198  
    371371    std::vector<PabloAST *> basis(8);
    372372    for (unsigned i = 0; i < 4; i++) {
    373         // The subtraction 7-bit is because of the confusion between
    374         // little-endian and big-endian bit numbering of bytes.
    375         // We should fix this, switching to little-endian numbering throughout.
    376         basis[7-2*i] = scope1->createPackL(scope1->getInteger(2), bitpairs[i]);
    377         basis[7-(2*i + 1)] = scope1->createPackH(scope1->getInteger(2), bitpairs[i]);
     373        basis[2*i] = scope1->createPackL(scope1->getInteger(2), bitpairs[i]);
     374        basis[2*i + 1] = scope1->createPackH(scope1->getInteger(2), bitpairs[i]);
    378375    }
    379376   
  • icGREP/icgrep-devel/icgrep/re/re_analysis.cpp

    r6170 r6198  
    564564    if (const Seq * seq = dyn_cast<Seq>(r)) {
    565565        if (seq->size() < 4) return false;
    566         if (!isa<CC>(*seq->begin())) return false;
    567         if (!isa<CC>(*seq->begin()+1)) return false;
    568         if (!isa<CC>(*seq->begin()+2)) return false;
     566        if (!isa<CC>(seq->front())) return false;
     567        if (!isa<CC>((*seq)[1])) return false;
     568        if (!isa<CC>((*seq)[2])) return false;
    569569        prefixRE = makeSeq(seq->begin(), seq->begin()+3);
    570570        if (byteTestsWithinLimit(prefixRE, byteCClimit)) {
    571571            suffixRE = makeSeq(seq->begin()+3, seq->end());
    572             errs() << "prefixRE: " << Printer_RE::PrintRE(prefixRE) << "\n";
    573             errs() << "suffixRE: " << Printer_RE::PrintRE(suffixRE) << "\n";
    574572            return true;
    575573        }
Note: See TracChangeset for help on using the changeset viewer.