| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # TODO: Retire this script and move the individual tests into the lit | 3 # TODO: Retire this script and move the individual tests into the lit |
| 4 # framework, to leverage parallel testing and other lit goodness. | 4 # framework, to leverage parallel testing and other lit goodness. |
| 5 | 5 |
| 6 set -eux | 6 set -eux |
| 7 | 7 |
| 8 # TODO(stichnot): Use FindBaseNaCl so that the script can be run from |
| 9 # anywhere within the native_client directory. |
| 10 PATH="../pydir:${PATH}" |
| 8 OPTLEVELS="m1 2" | 11 OPTLEVELS="m1 2" |
| 9 ATTRIBUTES="sse2 sse4.1" | 12 ATTRIBUTES="sse2 sse4.1" |
| 10 OUTDIR=Output | 13 OUTDIR=Output |
| 11 # Clean the output directory to avoid reusing stale results. | 14 # Clean the output directory to avoid reusing stale results. |
| 12 rm -rf "${OUTDIR}" | 15 rm -rf "${OUTDIR}" |
| 13 mkdir -p "${OUTDIR}" | 16 mkdir -p "${OUTDIR}" |
| 14 | 17 |
| 15 for optlevel in ${OPTLEVELS} ; do | 18 for optlevel in ${OPTLEVELS} ; do |
| 16 for attribute in ${ATTRIBUTES} ; do | 19 for attribute in ${ATTRIBUTES} ; do |
| 17 | 20 |
| 18 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 21 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 19 --prefix=Subzero_ \ | 22 --prefix=Subzero_ \ |
| 20 --target=x8632 \ | 23 --target=x8632 \ |
| 21 --dir="${OUTDIR}" \ | 24 --dir="${OUTDIR}" \ |
| 22 --test=simple_loop.c \ | 25 --test=simple_loop.c \ |
| 23 --driver=simple_loop_main.c \ | 26 --driver=simple_loop_main.c \ |
| 24 --output=simple_loop_O${optlevel}_${attribute} | 27 --output=simple_loop_O${optlevel}_${attribute} |
| 25 | 28 |
| 26 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 29 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 27 --prefix=Subzero_ \ | 30 --prefix=Subzero_ \ |
| 28 --target=x8632 \ | 31 --target=x8632 \ |
| 29 --dir="${OUTDIR}" \ | 32 --dir="${OUTDIR}" \ |
| 30 --test=mem_intrin.cpp \ | 33 --test=mem_intrin.cpp \ |
| 31 --driver=mem_intrin_main.cpp \ | 34 --driver=mem_intrin_main.cpp \ |
| 32 --output=mem_intrin_O${optlevel}_${attribute} | 35 --output=mem_intrin_O${optlevel}_${attribute} |
| 33 | 36 |
| 34 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 37 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 35 --prefix=Subzero_ \ | 38 --prefix=Subzero_ \ |
| 36 --target=x8632 \ | 39 --target=x8632 \ |
| 37 --dir="${OUTDIR}" \ | 40 --dir="${OUTDIR}" \ |
| 38 --test=test_arith.cpp \ | 41 --test=test_arith.cpp \ |
| 39 --test=test_arith_frem.ll \ | 42 --test=test_arith_frem.ll \ |
| 40 --test=test_arith_sqrt.ll \ | 43 --test=test_arith_sqrt.ll \ |
| 41 --driver=test_arith_main.cpp \ | 44 --driver=test_arith_main.cpp \ |
| 42 --output=test_arith_O${optlevel}_${attribute} | 45 --output=test_arith_O${optlevel}_${attribute} |
| 43 | 46 |
| 44 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 47 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 45 --prefix=Subzero_ \ | 48 --prefix=Subzero_ \ |
| 46 --target=x8632 \ | 49 --target=x8632 \ |
| 47 --dir="${OUTDIR}" \ | 50 --dir="${OUTDIR}" \ |
| 48 --test=test_bitmanip.cpp --test=test_bitmanip_intrin.ll \ | 51 --test=test_bitmanip.cpp --test=test_bitmanip_intrin.ll \ |
| 49 --driver=test_bitmanip_main.cpp \ | 52 --driver=test_bitmanip_main.cpp \ |
| 50 --output=test_bitmanip_O${optlevel}_${attribute} | 53 --output=test_bitmanip_O${optlevel}_${attribute} |
| 51 | 54 |
| 52 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 55 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 53 --prefix=Subzero_ --target=x8632 \ | 56 --prefix=Subzero_ --target=x8632 \ |
| 54 --dir="${OUTDIR}" \ | 57 --dir="${OUTDIR}" \ |
| 55 --test=test_calling_conv.cpp \ | 58 --test=test_calling_conv.cpp \ |
| 56 --driver=test_calling_conv_main.cpp \ | 59 --driver=test_calling_conv_main.cpp \ |
| 57 --output=test_calling_conv_O${optlevel}_${attribute} | 60 --output=test_calling_conv_O${optlevel}_${attribute} |
| 58 | 61 |
| 59 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 62 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 60 --prefix=Subzero_ \ | 63 --prefix=Subzero_ \ |
| 61 --target=x8632 \ | 64 --target=x8632 \ |
| 62 --dir="${OUTDIR}" \ | 65 --dir="${OUTDIR}" \ |
| 63 --test=test_cast.cpp --test=test_cast_to_u1.ll \ | 66 --test=test_cast.cpp --test=test_cast_to_u1.ll \ |
| 64 --driver=test_cast_main.cpp \ | 67 --driver=test_cast_main.cpp \ |
| 65 --output=test_cast_O${optlevel}_${attribute} | 68 --output=test_cast_O${optlevel}_${attribute} |
| 66 | 69 |
| 67 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 70 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 68 --prefix=Subzero_ \ | 71 --prefix=Subzero_ \ |
| 69 --target=x8632 \ | 72 --target=x8632 \ |
| 70 --dir="${OUTDIR}" \ | 73 --dir="${OUTDIR}" \ |
| 71 --test=test_fcmp.pnacl.ll \ | 74 --test=test_fcmp.pnacl.ll \ |
| 72 --driver=test_fcmp_main.cpp \ | 75 --driver=test_fcmp_main.cpp \ |
| 73 --output=test_fcmp_O${optlevel}_${attribute} | 76 --output=test_fcmp_O${optlevel}_${attribute} |
| 74 | 77 |
| 75 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 78 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 76 --prefix=Subzero_ \ | 79 --prefix=Subzero_ \ |
| 77 --target=x8632 \ | 80 --target=x8632 \ |
| 78 --dir="${OUTDIR}" \ | 81 --dir="${OUTDIR}" \ |
| 79 --test=test_global.cpp \ | 82 --test=test_global.cpp \ |
| 80 --driver=test_global_main.cpp \ | 83 --driver=test_global_main.cpp \ |
| 81 --output=test_global_O${optlevel}_${attribute} | 84 --output=test_global_O${optlevel}_${attribute} |
| 82 | 85 |
| 83 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 86 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 84 --prefix=Subzero_ \ | 87 --prefix=Subzero_ \ |
| 85 --target=x8632 \ | 88 --target=x8632 \ |
| 86 --dir="${OUTDIR}" \ | 89 --dir="${OUTDIR}" \ |
| 87 --test=test_icmp.cpp --test=test_icmp_i1vec.ll \ | 90 --test=test_icmp.cpp --test=test_icmp_i1vec.ll \ |
| 88 --driver=test_icmp_main.cpp \ | 91 --driver=test_icmp_main.cpp \ |
| 89 --output=test_icmp_O${optlevel}_${attribute} | 92 --output=test_icmp_O${optlevel}_${attribute} |
| 90 | 93 |
| 91 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 94 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 92 --prefix=Subzero_ \ | 95 --prefix=Subzero_ \ |
| 93 --target=x8632 \ | 96 --target=x8632 \ |
| 94 --dir="${OUTDIR}" \ | 97 --dir="${OUTDIR}" \ |
| 95 --test=test_select.ll \ | 98 --test=test_select.ll \ |
| 96 --driver=test_select_main.cpp \ | 99 --driver=test_select_main.cpp \ |
| 97 --output=test_select_O${optlevel}_${attribute} | 100 --output=test_select_O${optlevel}_${attribute} |
| 98 | 101 |
| 99 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 102 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 100 --prefix=Subzero_ \ | 103 --prefix=Subzero_ \ |
| 101 --target=x8632 \ | 104 --target=x8632 \ |
| 102 --dir="${OUTDIR}" \ | 105 --dir="${OUTDIR}" \ |
| 103 --test=test_stacksave.c \ | 106 --test=test_stacksave.c \ |
| 104 --driver=test_stacksave_main.c \ | 107 --driver=test_stacksave_main.c \ |
| 105 --output=test_stacksave_O${optlevel}_${attribute} | 108 --output=test_stacksave_O${optlevel}_${attribute} |
| 106 | 109 |
| 107 # Compile the non-subzero object files straight from source | 110 # Compile the non-subzero object files straight from source |
| 108 # since the native LLVM backend does not understand how to | 111 # since the native LLVM backend does not understand how to |
| 109 # lower NaCl-specific intrinsics. | 112 # lower NaCl-specific intrinsics. |
| 110 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 113 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 111 --prefix=Subzero_ \ | 114 --prefix=Subzero_ \ |
| 112 --target=x8632 \ | 115 --target=x8632 \ |
| 113 --dir="${OUTDIR}" \ | 116 --dir="${OUTDIR}" \ |
| 114 --test=test_sync_atomic.cpp \ | 117 --test=test_sync_atomic.cpp \ |
| 115 --crosstest-bitcode=0 \ | 118 --crosstest-bitcode=0 \ |
| 116 --driver=test_sync_atomic_main.cpp \ | 119 --driver=test_sync_atomic_main.cpp \ |
| 117 --output=test_sync_atomic_O${optlevel}_${attribute} | 120 --output=test_sync_atomic_O${optlevel}_${attribute} |
| 118 | 121 |
| 119 ./crosstest.py -O${optlevel} --mattr ${attribute} \ | 122 crosstest.py -O${optlevel} --mattr ${attribute} \ |
| 120 --prefix=Subzero_ --target=x8632 \ | 123 --prefix=Subzero_ --target=x8632 \ |
| 121 --dir="${OUTDIR}" \ | 124 --dir="${OUTDIR}" \ |
| 122 --test=test_vector_ops.ll \ | 125 --test=test_vector_ops.ll \ |
| 123 --driver=test_vector_ops_main.cpp \ | 126 --driver=test_vector_ops_main.cpp \ |
| 124 --output=test_vector_ops_O${optlevel}_${attribute} | 127 --output=test_vector_ops_O${optlevel}_${attribute} |
| 125 | 128 |
| 126 done | 129 done |
| 127 done | 130 done |
| 128 | 131 |
| 129 for optlevel in ${OPTLEVELS} ; do | 132 for optlevel in ${OPTLEVELS} ; do |
| 130 for attribute in ${ATTRIBUTES}; do | 133 for attribute in ${ATTRIBUTES}; do |
| 131 "${OUTDIR}"/simple_loop_O${optlevel}_${attribute} | 134 "${OUTDIR}"/simple_loop_O${optlevel}_${attribute} |
| 132 "${OUTDIR}"/mem_intrin_O${optlevel}_${attribute} | 135 "${OUTDIR}"/mem_intrin_O${optlevel}_${attribute} |
| 133 "${OUTDIR}"/test_arith_O${optlevel}_${attribute} | 136 "${OUTDIR}"/test_arith_O${optlevel}_${attribute} |
| 134 "${OUTDIR}"/test_bitmanip_O${optlevel}_${attribute} | 137 "${OUTDIR}"/test_bitmanip_O${optlevel}_${attribute} |
| 135 "${OUTDIR}"/test_calling_conv_O${optlevel}_${attribute} | 138 "${OUTDIR}"/test_calling_conv_O${optlevel}_${attribute} |
| 136 "${OUTDIR}"/test_cast_O${optlevel}_${attribute} | 139 "${OUTDIR}"/test_cast_O${optlevel}_${attribute} |
| 137 "${OUTDIR}"/test_fcmp_O${optlevel}_${attribute} | 140 "${OUTDIR}"/test_fcmp_O${optlevel}_${attribute} |
| 138 "${OUTDIR}"/test_global_O${optlevel}_${attribute} | 141 "${OUTDIR}"/test_global_O${optlevel}_${attribute} |
| 139 "${OUTDIR}"/test_icmp_O${optlevel}_${attribute} | 142 "${OUTDIR}"/test_icmp_O${optlevel}_${attribute} |
| 140 "${OUTDIR}"/test_select_O${optlevel}_${attribute} | 143 "${OUTDIR}"/test_select_O${optlevel}_${attribute} |
| 141 "${OUTDIR}"/test_stacksave_O${optlevel}_${attribute} | 144 "${OUTDIR}"/test_stacksave_O${optlevel}_${attribute} |
| 142 "${OUTDIR}"/test_sync_atomic_O${optlevel}_${attribute} | 145 "${OUTDIR}"/test_sync_atomic_O${optlevel}_${attribute} |
| 143 "${OUTDIR}"/test_vector_ops_O${optlevel}_${attribute} | 146 "${OUTDIR}"/test_vector_ops_O${optlevel}_${attribute} |
| 144 done | 147 done |
| 145 done | 148 done |
| OLD | NEW |