Mercurial > lcfOS
diff test/testir.py @ 292:534b94b40aa8
Fixup reorganize
author | Windel Bouwman |
---|---|
date | Wed, 27 Nov 2013 08:06:42 +0100 |
parents | 05184b95fa16 |
children | 158068af716c |
line wrap: on
line diff
--- a/test/testir.py Sun Nov 24 11:24:15 2013 +0100 +++ b/test/testir.py Wed Nov 27 08:06:42 2013 +0100 @@ -2,7 +2,8 @@ import sys import c3 import ppci -import ir, x86, transform +import ir +import transform import optimize @@ -129,34 +130,5 @@ """ if __name__ == '__main__': - #unittest.main() - #sys.exit() - diag = ppci.DiagnosticsManager() - builder = c3.Builder(diag) - cgenx86 = x86.X86CodeGenSimple(diag) - ir = builder.build(testsrc) - diag.printErrors(testsrc) - ir.check() - ir.dump() - optimize.optimize(ir) - print('dump IR') - print('dump IR') - print('dump IR') - print('dump IR') - ir.dump() - - # Dump a graphiz file: - with open('graaf.gv', 'w') as f: - ir.dumpgv(f) - os.system('dot -Tsvg -ograaf.svg graaf.gv') - + unittest.main() sys.exit() - asm = cgenx86.genBin(ir) - #for a in asm: - # print(a) - with open('out.asm', 'w') as f: - f.write('BITS 64\n') - for a in asm: - f.write(str(a) + '\n') - print(a) -