Update rev of pnacl binutils branch.

Fix up PNaCl sandboxed linker headers after headers moved.
https://gerrit.chromium.org/gerrit/gitweb?p=native_client/nacl-binutils.git;a=commit;h=760c9df

BUG=https://code.google.com/p/nativeclient/issues/detail?id=2832

Review URL: https://codereview.chromium.org/16206010

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11463 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Revert ARM pnacl-translate driver setting for -global-merge=0.

I'm assuming that the LLVM change fixes the problem:
6aea8b4: Fix FlattenGlobals to correctly handle implicitly-aligned variables

If so, we can make the commandline tools be back in sync
with the in-browser translator settings.

This reverts nacl revs 11363 and 11365.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3437
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/16335019

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11464 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/DEPS

This pulls in the following LLVM changes:

b32a697: (jvoung@chromium.org) PNaCl gep expansion: avoid mul by 1 for i8 arrays.
012feeb: (mseaborn@chromium.org) PNaCl ABI checker: Check for normal form introduced by ReplacePtrsWithInts

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=PNaCl toolchain trybots

Review URL: https://codereview.chromium.org/15993015

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11465 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Disabling sandbox for mac coverage runs.

Coverage runs on mac require writing out results file to disk.
The outer sandbox prevents this, disabling in coverage mode.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3333
TEST=trybots
R=bsy@google.com, jfb@chromium.org

Review URL: https://codereview.chromium.org/15927018

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11466 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Rudimentary support for running Spec2k under Asm.js.

A new setup "SetupEmcc" is added for using Emscripten to generate
Asm.js code and for using Firefox to run it.

First, a list of the limitations of this framework:

Spec2k uses a lot of file I/O (stdin/stdout, reading files, writing
files) which doesn't really work in JavaScript.  Emscripten deals with
this by providing the --embed-file and --preload-file options to
package input files into a virtual in-memory file system.  Using
--embed-file allows input files, stdin, and stdout to work in the
standalone js shell, except that initialization of the file system is
extremely slow and ruins any attempt to get reasonable timings.  Using
--preload-file works reasonably fast, but does not work in the
standalone js shell and must be run in the browser, and stdin is not
usable.

As such, the following Spec2k components do not work due to their use
of stdin: 183.equake, 186.crafty, 188.ammp, 197.parser, 253.perlbmk,
and 254.gap.  In addition, 254.gap and 176.gcc do not (yet) work
because Emscripten does not support setjmp.  That leaves 9 out of 16
components that do work.

The other file I/O related problem is that it is not possible for the
harness to inspect output files (which are only represented
in-memory), so validation is only possible by looking at stdout which
is displayed on the browser page.

As for getting timings, ideally we would want the JavaScript code to
close the tab/window/browser after it completes.  There is
easily-found JavaScript code to do this, but it isn't reliable on
Firefox when closing the last tab.  As a result, one has to "babysit"
the tests and manually close the browser as each test completes.  This
means that one needs to use the user+system time, not the wall-clock
time, in reporting results.

For the "train" versus "ref" runs, the run scripts generally copy or
symlink files from the appropriate input directory into the current
directory before running the binary.  This approach doesn't work for
Emscripten, where the files need to be prepackaged at build time.  The
prepackaging is done by concatenating all the files into one big file,
and embedding offsets and lengths into the JavaScript code.  This
means we have to build separate versions for "train" and "ref".  To
avoid duplication, the input file preparation is refactored into a new
prepare_input.sh script in each Spec2k component directory.

That covers the framework limitations.

The emcc command must be part of $PATH.  To build Emscripten, get the
source via "git clone git://github.com/kripken/emscripten.git".  There
is a nice tutorial at
https://github.com/kripken/emscripten/wiki/Tutorial .  Emscripten
requires Clang+LLVM 3.2, it is convenient to download a prebuilt
package, e.g.
http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-linux-ubuntu-12.04.tar.gz

At this writing, Asm.js is only supported in the Firefox nightly
builds.  It may be necessary to enable javascript.options.asmjs in
about:config.  It is also useful to set dom.max_script_run_time=0 to
disable the "unresponsive script" popups.

BUG= none
R=dschuff@chromium.org, jvoung@chromium.org

Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=34808ab

Review URL: https://codereview.chromium.org/15772007

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11467 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Fix build failure in irt_manifest.c

This file is built only in the chromium tree, so a nit introduced
in r11458 went unnoticed.  Later we'll clean things up to move
this code to the repository where it's actually used.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2832
TEST= none
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/16123013

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11468 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Support arm-nacl-gcc -fPIC TLS

On ARM, unlike x86, the __tls_get_addr calls generated in -fPIC code
are not optimized away by the linker for static linking.  So the C
library must provide the function.

The existing TLS test matrix is expanded to test all its variants
under -fPIC too.

BUG= http://code.google.com/p/nativeclient/issues/detail?id=3470
TEST= trybots
R=mseaborn@chromium.org, sbc@chromium.org

Review URL: https://codereview.chromium.org/16376003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11469 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update PNaCl toolchain to get r11466: Enable ABI check for ReplacePtrsWithInts

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=trybots

Review URL: https://codereview.chromium.org/16077011

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11470 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/DEPS

This pulls in the following LLVM changes:

a4dba98: (mseaborn@chromium.org) PNaCl ABI checker: Reject the "addrspace" attribute
51c0650: (mseaborn@chromium.org) PNaCl: Enable RewritePNaClLibraryCalls and fix it to remove unused decls

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3343
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3429
TEST=PNaCl toolchain trybots
TBR=dschuff@chromium.org

Review URL: https://codereview.chromium.org/16309005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11471 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/DEPS

This pulls in the following LLVM changes:

70fa5e7: (mseaborn@chromium.org) PNaCl ABI checker: Reject functions that are declared but not defined

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3339
TEST=PNaCl toolchain trybots
TBR=dschuff@chromium.org

Review URL: https://codereview.chromium.org/16418002

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11472 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
NaClDesc-based exe/irt loading.  This does not attempt to mmap if validator permits.

This has also been tested by patching into Chrome LKGR's checkout of NaCl and playing Don't Starve on Windows and Linux.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3422
TEST= load/run any/all existing sel_ldr tests
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/15716005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11473 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add stub spec test runner.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3452
TEST= ./scons run_spec_test    (manually)
R=halyavin@google.com, khim@chromium.org

Review URL: https://codereview.chromium.org/16154028

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11474 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Produce rudimentary spec_val output.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3452
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3453
TEST= ./scons run_spec_val_test
R=halyavin@google.com

Review URL: https://codereview.chromium.org/15769009

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11475 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Copy rdfa targeted test runner to validator_ragel.


BUG= https://code.google.com/p/nativeclient/issues/detail?id=3452
TEST= ./scons run_rdfa_targeted_tests_32
TEST= ./scons run_rdfa_targeted_tests_64
R=halyavin@google.com

Review URL: https://codereview.chromium.org/16455003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11476 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Add a PNaCl test to check that division by zero always faults

This required adding a SIGILL and SIGFPE exit code definition, because
ARM will execute an illegal instruction, while x86 will generate SIGFPE in
hardware.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=2833
TEST=run_div_by_zero_test
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/15619005

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11477 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update spec perf expectations.

Commit r11467 (rudimentary asm.js support) refactored the setup of
the input files into a python script.  This setup is actually
measured as part of the timing.  It appears that in some cases
this leads to a noticeable runtime increase and pushes the runtimes
to the boundaries of the perf expectations.

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/16392003

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11478 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Roll pnacl llvm rev to 69a8e32d4f4451e11cda6d48b318ba4f7e01c683

69a8e32 Change CL flag -pnacl-freeze to -bitcode-format={llvm,pnacl}.

Review CL: https://codereview.chromium.org/16295014

R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/15793015

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11479 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
PNaCl: Update LLVM revision in pnacl/DEPS

This pulls in the following LLVM changes:

c0d9b33: (mseaborn@chromium.org) PNaCl ABI: Strip out attributes on functions and function calls

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3415
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2346
TEST=PNaCl toolchain trybots
TBR=dschuff@chromium.org

Review URL: https://codereview.chromium.org/16279007

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11480 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Remove barebones_stack_alignment16 test

Remove the test, because:

- it is not clear what it is supposed to be testing,
- it uses a function that will not be part of PNaCl's stable ABI, and
- it fails on MIPS since it returns different value due to different
  stack alignment on MIPS architecture.

BUG= none
TEST= run smoke tests

Review URL: https://chromiumcodereview.appspot.com/16212011

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11481 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Factor out common code for running targeted tests on different sections.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3452
TEST= ./scons run_spec_val_test run_rdfa_targeted_tests_32 run_rdfa_targeted_tests_64
R=halyavin@google.com

Review URL: https://codereview.chromium.org/16123021

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11482 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2