aboutsummaryrefslogtreecommitdiff
path: root/test/NaCl/ARM
AgeCommit message (Collapse)Author
2013-07-19Simplify the test by removing unnecessary function body.Eli Bendersky
Suggested in review: https://codereview.chromium.org/19705002/ BUG=None R=jvoung@chromium.org Review URL: https://codereview.chromium.org/19774012
2013-07-18Port new tests from origin/masterEli Bendersky
2013-07-16Fixing make check errors...Eli Bendersky
2013-07-09PNaCl: Fix negative relocation addends on x86-32Mark Seaborn
Disable an assertion. This assertion made the behaviour on x86-32 inconsistent with x86-64 and ARM. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3548 TEST=*.ll tests + PNaCl toolchain trybots Review URL: https://codereview.chromium.org/18261008
2013-06-10Change NaCl-specific tests from llc to pnacl-llcEli Bendersky
BUG=None R=dschuff@chromium.org Review URL: https://codereview.chromium.org/16273014
2013-05-31Apply LLVM upstream: r182877 - Enable FastISel on ARM for Linux and NaClJF Bastien
This also pulls in a TargetMachine.h change from r176986 and changes NaCl's intrinsics-bitmanip.ll test to account for register spills at O0. FastISel was only enabled for iOS ARM and Thumb2, this patch enables it for ARM (not Thumb2) on Linux and NaCl. Thumb2 support needs a bit more work, mainly around register class restrictions. The patch punts to SelectionDAG when doing TLS relocation on non-Darwin targets. I will fix this and other FastISel-to-SelectionDAG failures in a separate patch. The patch also forces FastISel to retain frame pointers: iOS always keeps them for backtracking (so emitted code won't change because of this), but Linux was getting much worse code that was incorrect when using big frames (such as test-suite's lencod). I'll also fix this in a later patch, it will probably require a peephole so that FastISel doesn't rematerialize frame pointers back-to-back. The test changes are straightforward, similar to: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130513/174279.html They also add a vararg test that got dropped in that change. I ran all of test-suite on A15 hardware with --optimize-option=-O0 and all the tests pass. R=dschuff@chromium.org, jvoung@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3120 Review URL: https://codereview.chromium.org/15671004
2013-05-28Add two passes that implement conversions from PNaCl's specific intrinsicsEli Bendersky
to external function calls during the translation stage (llc). One of the passes is a ModulePass that adds the appropriate function declarations to the module. The other is a FunctionPass that performs the actual call replacement. This split exists because of bitcode streaming. Initially the passes handle the llvm.nacl.{set|long}jmp intrinsics. In the future they may handle additional intrinsics that are part of the PNaCl stable bitcode ABI. This CL also removes the previous approach to handling this conversion (in SelectionDAGBuilder.cpp). That ended up not working - more details in issue 3429. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3429 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/16047002
2013-05-09Support @llvm.nacl.{set|long}jmp intrinsics by translating them to library callsEli Bendersky
This is similar to the way @llvm.{set|long}jmp are handled. The previously defined nacl-specific intrinsics are no longer used and are overridden. For the library call, call setjmp/longjmp without a preceding underscore as these symbols exist in our runtime support code (pnacl/support/setjmp_XXX.S) BUG=https://code.google.com/p/nativeclient/issues/detail?id=3429 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/14715018
2013-05-09Add a llvm lit test for NaCl ARM/X86 support for bswap i16, i32, i64.Jan Voung
Slowly trying to promote "dev" intrinsics that are being tested to be accepted. Luckily, bswap is supported without compiler_rt for ARM and x86 at least. Test at default level and -O0. Also tested by gcc/testsuite/gcc.dg/builtin-bswap-[1,2,3,4,5].c, and a couple of other gcc tests. We may want to blacklist odd argument sizes like i8, and i1, which the x86 backend won't handle. The i16 case is also interesting, however, it's easy to do if you have an i32 bswap. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3378 R=eliben@chromium.org Review URL: https://codereview.chromium.org/14971004
2013-05-08Insert denominator zero checks for NaClDavid Sehr
This IR pass for ARM inserts a comparison and a branch to trap if the denominator of a DIV or REM instruction is zero. This makes ARM fault identically to x86 in this case. BUG= https://code.google.com/p/nativeclient/issues/detail?id=2833 R=eliben@chromium.org Review URL: https://codereview.chromium.org/14607004
2013-03-20Apply after-merge fixes to return to working state.Eli Bendersky
2013-01-04Move VLD cases properly into IsDangerousLoad and update tests that had ↵Eli Bendersky
incorrect -sfi-<xx> flags BUG=none Review URL: https://codereview.chromium.org/11759018
2012-11-26Add more tests for sandboxing on ARMEli Bendersky
* Stack modifications * Calls and returns * Bundling * bx lr * Indirect blx BUG=none Review URL: https://codereview.chromium.org/11280129
2012-11-20Remove tabsEli Bendersky
2012-11-20Add tests for auto-updating version of vld[1-4]Eli Bendersky
2012-11-15Sandboxing of VLD instructionsEli Bendersky
BUG=nativeclient:3124 Review URL: https://codereview.chromium.org/11413019
2012-11-14Fix nacl.read.tp() intrinsic to not generate "addl %gs:0, %REG"Mark Seaborn
NaCl only allows using "mov" with a %gs prefix. The fix requires generating the mov instruction using a custom inserter that calls BuildMI(). Also convert the intrinsic's tests to use -filetype=asm rather than -filetype=obj. This avoids some limitations of llvm-objdump and is the more normal way to write LLVM tests. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2837 TEST="llvm-lit test/NaCl" Review URL: https://codereview.chromium.org/11410058
2012-11-14Implement sandboxing of NEON store instructionsEli Bendersky
BUG=http://code.google.com/p/nativeclient/issues/detail?id=3124 Review URL: https://codereview.chromium.org/11361249
2012-11-12Add a test and rename a couple of others.Eli Bendersky
Adding a test with some simple SP arithmetic, verifying that sandboxing guards are inserted correctly. Also renaming two tests to follow the test naming convention. BUG=none Review URL: https://codereview.chromium.org/11369164
2012-11-08Add @nacl.read.tp() intrinsic, a fast version of NaCl's tls_get() IRT interfaceMark Seaborn
This is in preparation for adding an LLVM pass that will expand out TLS (thread_local) variable accesses into calls to nacl.read.tp. On ARM, there is already an arm.thread.pointer intrinsic. We reuse the code for that. On x86, we have to add an implementation. The added code is based on x86's LowerToTLSExecModel() for the %gs:0 case, and on NaCl-MIPS' LowerGlobalTLSAddress() for the __nacl_read_tp() case. (In contrast, X86NaClRewritePass.cpp inserts a __nacl_read_tp() call at the lower MI level; we don't use that approach here.) We convert LowerINTRINSIC_WO_CHAIN() into a method in order to access the Subtarget member. This is consistent with other x86 Lower methods and with the ARM version. BUG=https://code.google.com/p/nativeclient/issues/detail?id=2837 TEST="llvm-lit test/NaCl" Review URL: https://codereview.chromium.org/11383002
2012-11-07Adding a simple test for sandboxing loads and storesEli Bendersky
BUG=none Review URL: https://codereview.chromium.org/11362146
2012-11-06Clean up the CHECK lines to be less pedanticEli Bendersky
BUG=none Review URL: https://codereview.chromium.org/11359078
2012-11-06Adding sandboxing testEli Bendersky
Make sure that llc -sfi-store sandboxes a vstr instruction on Nacl The test could be made prettier but some limitations of FileCheck and llvm-objdump get in the way. Review URL: https://codereview.chromium.org/11293131