Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: src/trusted/validator_mips/testdata/compile_tests.sh

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebased patch, conflict resolved. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_mips/testdata/compile_tests.sh
diff --git a/src/trusted/validator_mips/testdata/compile_tests.sh b/src/trusted/validator_mips/testdata/compile_tests.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d8a8df158a6f0add0193df74ae08d7092dc0ac7a
--- /dev/null
+++ b/src/trusted/validator_mips/testdata/compile_tests.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+# Copyright 2012 The Native Client Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can
+# be found in the LICENSE file.
+
+set -eu
+
+# Get the path to the Mips cross-compiler.
+
+dir=$(pwd)
+cd ../../../..
+topdir=$(pwd)
+tools="$topdir/toolchain/pnacl_linux_x86_64/pkg/binutils/mipsel-pc-nacl/bin"
+cd $dir
+
+readonly MIPSEL_LD="$tools/ld"
+readonly MIPSEL_AS="$tools/as"
+
+
+for test_file in *.S ; do
+ object_file=${test_file%.*}.o
+ mipsel_nexe_file=${test_file%.*}.nexe
+ special_link_options="--section-start .text=0xFFFA000"
+
+ echo "compiling (MIPS32) $test_file -> $mipsel_nexe_file"
+ ${MIPSEL_AS} -mips32r2 -EL -mdsp\
+ $test_file -o $object_file
+ if [ $test_file == "test_invalid_dest.S" ]
+ then
+ ${MIPSEL_LD} $special_link_options -static -nodefaultlibs -nostdlib \
+ -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file
+ else
+ ${MIPSEL_LD} -static -nodefaultlibs -nostdlib \
+ -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file
+ fi
+ rm $object_file
+done
+
« no previous file with comments | « src/trusted/validator_mips/ncval.cc ('k') | src/trusted/validator_mips/testdata/test_forbidden_instructions.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698