mirror of
https://github.com/marketideas/qasm.git
synced 2025-01-13 20:32:14 +00:00
working on testdata tests
This commit is contained in:
parent
dcd12630af
commit
0bea0d2254
23
asm.cpp
23
asm.cpp
@ -56,7 +56,7 @@ void CLASS::print(uint32_t lineno)
|
||||
printf("\n%s in line: %d", errStrings[errorcode].c_str(), lineno + 1);
|
||||
if (errorText != "")
|
||||
{
|
||||
printf("%s", errorText.c_str());
|
||||
printf(" (%s)", errorText.c_str());
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
@ -213,7 +213,11 @@ void CLASS::print(uint32_t lineno)
|
||||
{
|
||||
pcol += printf(" ");
|
||||
}
|
||||
pcol += printf(":[Error] %s %s", errStrings[errorcode].c_str(), errorText.c_str());
|
||||
pcol += printf(":[Error] %s", errStrings[errorcode].c_str());
|
||||
if (errorText.length() > 0)
|
||||
{
|
||||
pcol += printf(" (%s)",errorText.c_str());
|
||||
}
|
||||
}
|
||||
else if (!commentprinted)
|
||||
{
|
||||
@ -1376,13 +1380,15 @@ void CLASS::initpass(void)
|
||||
else
|
||||
{
|
||||
printf("Unknown CPU type in .ini\n");
|
||||
mx=0x00;
|
||||
mx = 0x00;
|
||||
}
|
||||
mx = getInt("asm.startmx",mx);;
|
||||
mx = getInt("asm.startmx", mx);;
|
||||
|
||||
savepath = getConfig("option.objfile", "");
|
||||
|
||||
relocatable = false;
|
||||
currentsym = NULL;
|
||||
currentsymstr="";
|
||||
currentsymstr = "";
|
||||
lineno = 0;
|
||||
errorct = 0;
|
||||
passcomplete = false;
|
||||
@ -1409,7 +1415,6 @@ void CLASS::initpass(void)
|
||||
}
|
||||
curLUP.clear();
|
||||
curDO.clear();
|
||||
savepath = "";
|
||||
}
|
||||
|
||||
void CLASS::complete(void)
|
||||
@ -1421,10 +1426,6 @@ void CLASS::complete(void)
|
||||
std::string currentdir = Poco::Path::current();
|
||||
|
||||
savepath = processFilename(savepath, currentdir, 0);
|
||||
if (isDebug() >= 1)
|
||||
{
|
||||
savepath += "1"; // append this to the end to help with testing against other assemblers
|
||||
}
|
||||
printf("saving to file: %s\n", savepath.c_str());
|
||||
|
||||
std::ofstream f(savepath);
|
||||
@ -1765,7 +1766,7 @@ void CLASS::process(void)
|
||||
if (c != ':')
|
||||
{
|
||||
currentsym = findSymbol(line.lable);
|
||||
currentsymstr=line.lable;
|
||||
currentsymstr = line.lable;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ int CLASS::doMVN(MerlinLine &line, TSymbol &sym)
|
||||
{
|
||||
value = 0xFFFFFFFF;
|
||||
line.setError(errBadOperand);
|
||||
line.errorText = line.operand_expr2;
|
||||
//line.errorText = line.operand_expr2;
|
||||
}
|
||||
|
||||
setOpcode(line, op);
|
||||
|
2
qasm.cpp
2
qasm.cpp
@ -20,6 +20,8 @@ programOption PAL::appOptions[] =
|
||||
#endif
|
||||
//{ "config", "f", "load configuration data from a <file>", " <file>", false, false},
|
||||
{ "exec", "x", "execute a command [asm, link, reformat] default=asm", " <command>", false, false},
|
||||
{ "objfile", "o", "write output to file", " <file>", false, false},
|
||||
|
||||
{ "", "", "", "", false, false}
|
||||
};
|
||||
|
||||
|
@ -13,11 +13,14 @@ SRC=`ls ./testdata`
|
||||
for S in $SRC ; do
|
||||
|
||||
rm -f $TMPFILE
|
||||
./qasm ./testdata/$S >> $TMPFILE
|
||||
./qasm -o 0/$OUTDIR/$S ./testdata/$S >> $TMPFILE
|
||||
|
||||
R=?$
|
||||
echo $S
|
||||
cat $TMPFILE | grep "End qASM assembly"
|
||||
|
||||
done
|
||||
ls -l $OUTDIR
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user