def METHOD_NAME():
    n = 0
    if len(sys.argv) <= 3:
        print("Usage: test-mmx.py x86.csv test-mmx.h CPUID...")
        exit(1)
    csvfile = open(sys.argv[1], 'r', newline='')
    archs = sys.argv[3:]
    with open(sys.argv[2], "w") as outf:
        outf.write("// Generated by test-mmx.py. Do not edit.\n")
        for row in csv.reader(strip_comments(csvfile)):
            insn = row[0].replace(',', '').split()
            if insn[0] in ignore:
                continue
            cpuid = row[6]
            if cpuid in archs:
                try:
                    g = InsnGenerator(insn[0], insn[1:])
                    for insn in g.gen():
                        outf.write('TEST(%d, "%s", %s)\n' % (n, insn, g.optype))
                        n += 1
                except SkipInstruction:
                    pass
        outf.write("#undef TEST\n")
        csvfile.close()