Remove auxiliary scripts related to text-based spec.

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

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11831 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Make all sections in targeted tests required.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3487
TEST= validator targeted tests, on bots
R=halyavin@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11832 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Grab the address space lock before calling to Vmmap in mprotect

Invoking NaClVmmapCheckExistingMapping without holding the
address space lock can lead to a potential race condition
since NaClVmmapCheckExistingMapping may reorder the Vmmap
entries.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3585
TESTS= small_tests
R=bsy@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11833 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Roll binutils revision to pull in updated objdump
- https://chromiumcodereview.appspot.com/19803007/

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

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11834 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update NaCl perf expecations for nacl-gcc (from change at 11467).

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=stichnot@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11835 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update PNaCl from 11755 to 11829.

Also fix the "objdump" binary name for check_tls.gypi
since for PNacl it renamed to le32-nacl-objdump.

r11829 | Update LLVM revision in pnacl/DEPS. Pulls in:
    a70a76d Unbreak the Windows/Cygwin toolchain build after the 3.3 merge. [eliben@chromium.org]
    87de224b Cherrypick upstream ARM FastISel ext patches [jfb@chromium.org]
    0b41f88 Enable ability to have multiple PNaCl wire format versions. [kschimpf@google.com]

r11827 | Update PNaCl LLVM DEPS revision

    208b40e Fix default cases for printing instructions/constants in PNaCl wire
    format.

r11826 | Roll pnacl llvm rev.

    b88a634 Remove module info records not allowed by PNaCl from the bitcode.

r11825 | LLVM-nightly: Remove expected failure "aha" for x86-64.
r11824 | Update PNaCl LLVM DEPS revision.

    9b29428 Disallow dev/private intrinsics by default (only llvm.nacl.target.arch remains)
    1856bd7 Remove prefetch
    58dfde7 Switch to the upstream way to measure IR parsing time, since we have 3.3 now
    41207d5 Clean up a debug printout left in by mistake during the 3.3 merge
    08a2153 Simplify the test by removing unnecessary function body.

r11816 | Rename clang_rev to pnacl_clang_rev in pnacl/DEPS
r11814 | Update LLVM and Clang revisions in pnacl/DEPS
r11811 | Less strict matching of libLLVM*.so in translate-sb-tool.
r11810 | Add PNaCl driver support for -M.
r11785 | Make the PNaCl driver accept additional arguments.
r11776 | PNaCl: rename binutils host binaries to le32-nacl-<tool>
r11774 | PNaCl: Change x86-64 setjmp() to avoid revealing the sandbox base address
r11772 | Do not run PNaCl driver tests from scons
r11768 | PNaCl: Support -Ttext and --section-start flags in the native linker
r11762 | Update LLVM revision in pnacl/DEPS. Pulls in:

    dceeed3 Run the LLVM IR verifier just once in pnacl-llc. [eliben@chromium.org]

r11761 | Revert "PNaCl: rename binutils host binaries to le32-nacl-<tool>"
r11759 | PNaCl: rename binutils host binaries to le32-nacl-<tool>

BUG=some
R=eliben@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11836 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Test no-read uses of synchronization primitives

 Expand the synchronization test so that it also has code which doesn't read results. This should generate different code, and cause the x86-32 validator to disallow yet more instructions:

 On PNaCl:
    ./scons run_synchronization_test --verbose bitcode=1 platform=x86-32
    objdump -Sd scons-out/nacl-x86-32-pnacl-pexe-clang/obj/tests/toolchain/synchronization.nexe > scons-out/nacl-x86-32-pnacl-pexe-clang/obj/tests/toolchain/synchronization.nexe.dump
    ./scons-out/opt-linux-x86-32/obj/src/trusted/validator/driver/ncval_new scons-out/nacl-x86-32-pnacl-pexe-clang/obj/tests/toolchain/synchronization.nexe | cut -d: -f1 | xargs -I{} -n1 -P1 grep {} scons-out/nacl-x86-32-pnacl-pexe-clang/obj/tests/toolchain/synchronization.nexe.dump | cut -d: -f2 | sort -u
        75 e9                        jne    204f0 <__unnamed_2+0x3d0>
        75 e9                        jne    20e30 <__unnamed_2+0xd10>
        75 e9                        jne    217f0 <__unnamed_2+0x16d0>
        75 e9                        jne    221f0 <__unnamed_2+0x20d0>
        75 e9                        jne    22bf0 <__unnamed_2+0x2ad0>
        8a 91 f0 21 02 10            mov    0x100221f0(%ecx),%dl
        c7 04 24 c0 17 02 10         movl   $0x100217c0,(%esp)
        f0 66 0f b1 0a               lock cmpxchg %cx,(%edx)
        f0 66 0f b1 0c 16            lock cmpxchg %cx,(%esi,%edx,1)
        f0 66 0f b1 0d aa 2d         lock cmpxchg %cx,0x10032daa
        f0 66 0f b1 4a 02            lock cmpxchg %cx,0x2(%edx)
        f0 66 0f b1 4a 06            lock cmpxchg %cx,0x6(%edx)
        f0 66 0f b1 4a 08            lock cmpxchg %cx,0x8(%edx)
        f0 66 0f b1 4a 0c            lock cmpxchg %cx,0xc(%edx)
        f0 66 0f b1 4a 0e            lock cmpxchg %cx,0xe(%edx)
        f0 66 0f b1 4c 24 34         lock cmpxchg %cx,0x34(%esp)
        f0 66 0f b1 4c 24 44         lock cmpxchg %cx,0x44(%esp)
        f0 66 0f b1 4c 24 54         lock cmpxchg %cx,0x54(%esp)
        f0 66 0f b1 4c 24 64         lock cmpxchg %cx,0x64(%esp)
        f0 66 0f c1 44 24 74         lock xadd %ax,0x74(%esp)
        f0 66 0f c1 74 24 74         lock xadd %si,0x74(%esp)
        f0 66 0f c1 84 24 84         lock xadd %ax,0x84(%esp)
        f0 66 0f c1 b4 24 84         lock xadd %si,0x84(%esp)
        f0 66 83 00 29               lock addw $0x29,(%eax)
        f0 66 83 04 01 29            lock addw $0x29,(%ecx,%eax,1)
        f0 66 83 05 aa 2d 03         lock addw $0x29,0x10032daa
        f0 66 83 08 29               lock orw $0x29,(%eax)
        f0 66 83 0c 01 29            lock orw $0x29,(%ecx,%eax,1)
        f0 66 83 0d aa 2d 03         lock orw $0x29,0x10032daa
        f0 66 83 20 29               lock andw $0x29,(%eax)
        f0 66 83 24 01 29            lock andw $0x29,(%ecx,%eax,1)
        f0 66 83 25 aa 2d 03         lock andw $0x29,0x10032daa
        f0 66 83 28 29               lock subw $0x29,(%eax)
        f0 66 83 2c 01 29            lock subw $0x29,(%ecx,%eax,1)
        f0 66 83 2d aa 2d 03         lock subw $0x29,0x10032daa
        f0 66 83 30 29               lock xorw $0x29,(%eax)
        f0 66 83 34 01 29            lock xorw $0x29,(%ecx,%eax,1)
        f0 66 83 35 aa 2d 03         lock xorw $0x29,0x10032daa
        f0 66 83 40 02 29            lock addw $0x29,0x2(%eax)
        f0 66 83 40 08 29            lock addw $0x29,0x8(%eax)
        f0 66 83 40 0c 29            lock addw $0x29,0xc(%eax)
        f0 66 83 48 02 29            lock orw $0x29,0x2(%eax)
        f0 66 83 48 08 29            lock orw $0x29,0x8(%eax)
        f0 66 83 48 0c 29            lock orw $0x29,0xc(%eax)
        f0 66 83 60 02 29            lock andw $0x29,0x2(%eax)
        f0 66 83 60 08 29            lock andw $0x29,0x8(%eax)
        f0 66 83 60 0c 29            lock andw $0x29,0xc(%eax)
        f0 66 83 68 02 29            lock subw $0x29,0x2(%eax)
        f0 66 83 68 08 29            lock subw $0x29,0x8(%eax)
        f0 66 83 68 0c 29            lock subw $0x29,0xc(%eax)
        f0 66 83 70 02 29            lock xorw $0x29,0x2(%eax)
        f0 66 83 70 08 29            lock xorw $0x29,0x8(%eax)
        f0 66 83 70 0c 29            lock xorw $0x29,0xc(%eax)

 On GCC:
    ./scons run_synchronization_test --verbose platform=x86-32
    objdump -Sd scons-out/nacl-x86-32/obj/tests/toolchain/synchronization.nexe > scons-out/nacl-x86-32/obj/tests/toolchain/synchronization.nexe.dump
    ./scons-out/opt-linux-x86-32/obj/src/trusted/validator/driver/ncval_new scons-out/nacl-x86-32/obj/tests/toolchain/synchronization.nexe | cut -d: -f1 | xargs -I{} -n1 -P1 grep {} scons-out/nacl-x86-32/obj/tests/toolchain/synchronization.nexe.dump | cut -d: -f2 | sort -u
        66 f0 0f b1 1a               lock cmpxchg %bx,(%edx)
        66 f0 0f b1 35 e2 06         lock cmpxchg %si,0x100406e2
        66 f0 0f b1 54 24 4e         lock cmpxchg %dx,0x4e(%esp)
        66 f0 0f b1 5c 24 4e         lock cmpxchg %bx,0x4e(%esp)
        66 f0 0f b1 74 24 4e         lock cmpxchg %si,0x4e(%esp)
        66 f0 0f b1 7c 24 4e         lock cmpxchg %di,0x4e(%esp)
        66 f0 0f c1 5c 24 4e         lock xadd %bx,0x4e(%esp)
        66 f0 0f c1 74 24 4e         lock xadd %si,0x4e(%esp)
        81 ff 85 2d 02 10            cmp    $0x10022d85,%edi

It looks like the validator reports jumps to invalid instructions as invalid. In the cases above the destination is indeed flagged as invalid.

 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3579
 BUG= https://code.google.com/p/nativeclient/issues/detail?id=2981
 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475
 TEST= ./scons run_synchronization_test --verbose bitcode=1 platform=x86-32
 TEST= ./scons run_synchronization_test --verbose bitcode=1 platform=x86-64
 TEST= ./scons run_synchronization_test --verbose bitcode=1 platform=arm
 TEST= ./scons run_synchronization_test --verbose platform=x86-32
 TEST= ./scons run_synchronization_test --verbose platform=x86-64
 TEST= ./scons run_synchronization_test --verbose platform=arm
R=jvoung@chromium.org

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

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

Split the tests: they were getting big, and I'm going to add C11 and C++11 tests. These also didn't need to be C++, so make them straight C.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3579
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2981
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475

TEST= ./scons run_synchronization_sync_test --verbose bitcode=1 platform=x86-32
TEST= ./scons run_synchronization_sync_test --verbose bitcode=1 platform=x86-64
TEST= ./scons run_synchronization_sync_test --verbose bitcode=1 platform=arm
TEST= ./scons run_synchronization_sync_test --verbose platform=x86-32
TEST= ./scons run_synchronization_sync_test --verbose platform=x86-64
TEST= ./scons run_synchronization_sync_test --verbose platform=arm
TEST= ./scons run_synchronization_volatile_test --verbose bitcode=1 platform=x86-32
TEST= ./scons run_synchronization_volatile_test --verbose bitcode=1 platform=x86-64
TEST= ./scons run_synchronization_volatile_test --verbose bitcode=1 platform=arm
TEST= ./scons run_synchronization_volatile_test --verbose platform=x86-32
TEST= ./scons run_synchronization_volatile_test --verbose platform=x86-64
TEST= ./scons run_synchronization_volatile_test --verbose platform=arm

R=jvoung@chromium.org

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

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

Pull in 'Cherrypick upstream volatile _Complex alignment patches', to fix torture tests.

BUG= failing torture tests
TEST= torture tests
R=sehr@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11839 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update TOOL_REVISIONS for PNaCl 11829->11839

Command-line specified PNaCl change:
  git svn id:       11839
  hash:             7d992ae203569eca2a6d40b42247d803fec73ab2
  author:           jfb@chromium.org
  date:             2013-07-24 00:11:00 +0000
  subject:          Update Clang DEPS
  bug:              failing torture tests
  test:             torture tests
  review url:       https://codereview.chromium.org/19647016
  reviewers:        sehr@chromium.org
  body:
  ============================================================================
  Pull in 'Cherrypick upstream volatile _Complex alignment patches', to fix torture tests.
  ============================================================================

TOOL_REVISIONS update points at PNaCl version:
  git svn id:       11829
  hash:             2d3a39e6a4ab0b4cafe05922cab166777726967a
  date:             2013-07-23 00:22:01 +0000
  subject:          Update LLVM revision in pnacl/DEPS. Pulls in:
  commits since:    11

Most recent TOOL_REVISIONS update:
  hash:             933c6c91141d11e4549dfd3eed34e03e6560916f
  author:           jvoung@google.com
  date:             2013-07-23 19:23:09 +0000
  subject:          Update PNaCl from 11755 to 11829.
  commits since:    4

R= sehr@chromium.org, jfb@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11840 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Change prefix handling in text-based validator spec.

In particular, disallow addr prefix at byte level and intorduce whitelist of allowed prefixes.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3453
TEST= validator targeted tests
TEST= ./scons dfacheckvalidator
R=halyavin@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11841 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Split 0f18 validator targeted test into nicer chunks.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3487
TEST= this, on bots
R=halyavin@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11842 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Bump TOOL_REVISIONS to reflect update to nacl-objdump

Along the way, regenerate validator targeted tests and remove TODOs related to outdated objdump.

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

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11843 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Rename gyp_compile_ragel build step to gyp_compile_NOragel.

R=khim@chromium.org

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11844 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Remove REXW prefix from validator targeted test that exposes DATA16+REP bug.

Because it masks the bug.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3487
TEST= this, on bots
R=halyavin@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11845 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Disallow REP prefixes except in string instructions in text-based validator spec.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3453
TEST= validator targeted tests, on bots
TEST= ./scons dfacheckvalidator
R=halyavin@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11846 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Update NaClDesc flags in subclass ctor instead of overwriting them

Since NaClDesc*SubclassCtor runs after NaClDescInternalizeCtor,
by (re)setting the flags, we overwrite the flags set by the parent
class. Instead, we should set the flags only in NaClDesc*Ctor and
rely on NaClDescInternalizeCtor to deserialize the flags when
descriptor is being transfered.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=895
TESTS= small_tests
R=bsy@google.com

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11847 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Make inttypes.h and similar macro usage C++11-friendly.

"foo"PRIuS is a user-defined literal in C++11. Add spaces around these macros.

BUG=chromium:263960
Review URL: https://codereview.chromium.org/20132004/



git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11848 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
Cleanup: Remove the "minimal x86-64 test" Buildbot step for Mac OS X

We've had bots dedicated to testing x86-64 Mac for a while, so this
step is no longer needed.  The new bots run all the tests, not just a
subset.

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

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

git-svn-id: svn://svn.chromium.org/native_client/trunk/src/native_client@11849 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
command_tester.py: Remove clause for x86-32 Windows that is no longer used

The Windows 'signal handler' code (which used Vectored Exception
Handling insecurely) was removed a while ago.

We no longer set using_nacl_signal_handler=1 on Windows, so this code
always runs with expected_sigtype = 'normal'.

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

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

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