Commit Graph

212049 Commits

Author SHA1 Message Date
Daniel Sanders d245267be0 [mips][disassembler] Merged disassembler tests into the corresponding ISA/ASE subdirectories.
llvm-svn: 249384
2015-10-06 10:02:35 +00:00
Daniel Sanders 31bfdb5a82 [mips][disassembler] Moved DSP tests into proper place and corrected formatting.
llvm-svn: 249383
2015-10-06 09:28:48 +00:00
Vasileios Kalintiris 0943a95f46 [builtins] Enable building of the builtins library for MIPS targets.
Reviewers: howard.hinnant, samsonov

Subscribers: samsonov, dsanders, llvm-commits

Differential Revision: http://reviews.llvm.org/D13098

llvm-svn: 249382
2015-10-06 09:02:38 +00:00
Bhushan D. Attarde f55a0a47cf [MIPS] Emulate microMIPS instructions
SUMMARY:
    This patch includes:

    1. Emulation of prologue/epilogue and branch instructions for microMIPS.
    2. Setting up alternate disassembler (to be used for microMIPS).
       So there will be two disassembler instances, one for microMIPS and other for MIPS.
       Appropriate disassembler will be used based on the address class of instruction address.

    3. Some of the branch instructions does not have fixed sized delay slot, that means delay slot instruction can be of 2-byte or 4-byte.
       For this "m_next_inst_size" has been introduced which stores the size of next instruction (i.e size of delay slot instruction in case of branch).
       This can be used wherever the size of next instruction is required.

    4. A minor change to use mips32 register names instead of mips64 names.
    
    Reviewers: clayborg, tberghammer
    Subscribers: mohit.bhakkad, sagar, jaydeep, nitesh.jain, lldb-commits
    Differential Revision: http://reviews.llvm.org/D13282 

llvm-svn: 249381
2015-10-06 08:52:08 +00:00
Ewan Crawford 15f2bd9549 RenderScript command for printing allocation information
This patch adds a new command 'language renderscript allocation list' for printing the details of all loaded RS allocations.

In order to work out this information lldb JITs the runtime for the data it wants.
This has a penalty of a couple seconds latency, so is only done once for each allocation and the results cached.

If the user later wants to recalculate this information however, they can force lldb to do so with the --refresh flag.


Reviewed by: jingham, clayborg
Subscribers: lldb-commits, ADodds, domipheus, dean, tberghammer, danalbert, srhines 
Differential Revision: http://reviews.llvm.org/D13247

llvm-svn: 249380
2015-10-06 08:42:32 +00:00
Abhishek Aggarwal 2f00005cd7 Bug 25050: X87 FPU Special Purpose Registers
Summary:
  - For x86_64-FreeBSD Platform:
    -- LLDB now provides correct values of X87 FPU
       Special Purpose Registers like fstat, ftag, fctrl etc..

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: emaste, mikesart, clayborg

Subscribers: emaste

Differential Revision: http://reviews.llvm.org/D13434

llvm-svn: 249379
2015-10-06 07:04:03 +00:00
Craig Topper 2c4068f409 [TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting, make sure regB has been updated to take into account the commute.
llvm-svn: 249378
2015-10-06 05:39:59 +00:00
Mohit K. Bhakkad acdff168e2 [LLDB][MIPS] Fix hit_count for mips watchpoints
Reviewers: clayborg, jingham.
Subscribers: jaydeep, bhushan, dsanders, sagar, nitesh.jain, zturner, jasonmolenda, lldb-commits.
Differential Revision: http://reviews.llvm.org/D13241

llvm-svn: 249377
2015-10-06 05:25:17 +00:00
Saleem Abdulrasool d2eb26c7f0 builtins: fix build
Unfortunately, int_utils.h needs to depend on int_lib for the common macro
definitions.  However, currently, int_utils.h is included by int_lib.h.  Reorder
the inclusion to work around this.

llvm-svn: 249376
2015-10-06 04:33:08 +00:00
Saleem Abdulrasool e6f9652a22 builtins: Use MSVC-equivalents of attributes
This allows us to build the builtins using MSVC.  NFC.

Patch by Tee Hao Wei!

llvm-svn: 249375
2015-10-06 04:33:05 +00:00
Saleem Abdulrasool 4c81f0a1be builtins: tweak constant spelling
Use 4294967296.f instead of 0x1p32f to fix MSVC.  NFC.

Patch by Tee Hao Wei!

llvm-svn: 249374
2015-10-06 04:33:02 +00:00
Saleem Abdulrasool 89a92b9fb2 builtins: tweak Windows build
Include Windows.h instead of winbase.h and windef.h

Patch by Tee Hao Wei!

llvm-svn: 249373
2015-10-06 04:32:59 +00:00
Eric Fiselier 5499f4a35e Add comments for LWG issues 2219 and 2367
llvm-svn: 249372
2015-10-06 04:12:30 +00:00
Alexei Starovoitov 4e01a38da0 [bpf] Avoid extra pointer arithmetic for stack access
For the program like below
struct key_t {
  int pid;
  char name[16];
};
extern void test1(char *);
int test() {
  struct key_t key = {};
  test1(key.name);
  return 0;
}
For key.name, the llc/bpf may generate the below code:
  R1 = R10  // R10 is the frame pointer
  R1 += -24 // framepointer adjustment
  R1 |= 4   // R1 is then used as the first parameter of test1
OR operation is not recognized by in-kernel verifier.

This patch introduces an intermediate FI_ri instruction and
generates the following code that can be properly verified:
  R1 = R10
  R1 += -20

Patch by Yonghong Song <yhs@plumgrid.com>

llvm-svn: 249371
2015-10-06 04:00:53 +00:00
Craig Topper 79dd1bf094 [X86] Teach constant hoisting that ANDs with 64-bit immediates in the range 0x80000000-0xffffffff can be handled cheaply and don't need to be hoisted.
Most importantly, this keeps constant hoisting from preventing instruction selections ability to turn an AND with 0xffffffff into a move into a 32-bit subregister.

llvm-svn: 249370
2015-10-06 02:50:24 +00:00
Craig Topper d69d495333 [X86] Remove unnecessary AddComplexity directive. The instruction is already wrapped in the equivalent earlier. NFC
llvm-svn: 249369
2015-10-06 02:50:21 +00:00
Michael J. Spencer 6e78d16b3b [elf2] Address style comments.
llvm-svn: 249368
2015-10-06 02:13:54 +00:00
Michael J. Spencer 95538ca99a [elf2] Add __preinit_array, and __fini_array start and end symbols.
llvm-svn: 249367
2015-10-06 01:16:17 +00:00
Enrico Granata 8a9a8f3940 Introduce a FormattersMatchData class which contains all the information that data formatters need in one place, and also allows for lazy computation of expensive chunks of information if need be
This is a NFC commit that is essentially plumbing the new currency through the system

llvm-svn: 249366
2015-10-06 01:02:47 +00:00
Michael J. Spencer 4c46f57a49 [elf2] Ignore __tls_get_addr when static linking.
llvm-svn: 249365
2015-10-06 00:45:42 +00:00
Dan Gohman e51c058ecc [WebAssembly] Switch to a more traditional assembly syntax
This new syntax is built around putting each instruction on its own line
in a "mnemonic op, op, op" like syntax. It also uses conventional data
section directives like ".byte" and so on rather than requiring everything
to be in hierarchical S-expression format. This is a more natural syntax
for a ".s" file format from the perspective of LLVM MC and related tools,
while remaining easy to translate into other forms as needed.

llvm-svn: 249364
2015-10-06 00:27:55 +00:00
Marshall Clow d77e802f07 Mark 2259 and 2473 as complete. Add some more notes
llvm-svn: 249363
2015-10-05 23:27:10 +00:00
Adrian Prantl d2793a030b dsymutil: Don't prune forward declarations inside of an imported TAG_module
if there exists not definition for the type.
For this to work, we need to clone the imported modules before building
the decl context chains of the DIEs in the non-skeleton CUs.

llvm-svn: 249362
2015-10-05 23:11:20 +00:00
Greg Clayton b3788eaf99 SBTarget::Attach(SBAttachInfo &) was changed to not be asynchronous back in February and this affected Xcode's abililty to cancel an attach to process by name.
Added the ability to specify if an attach by name should be synchronous or not in SBAttachInfo and ProcessAttachInfo.

<rdar://problem/22821480>

llvm-svn: 249361
2015-10-05 22:58:37 +00:00
Rafael Espindola 41127ad7af Fix R_X86_64_RELATIVE for local symbols that refer to other sections.
We were mixing up the relocated and target sections.

llvm-svn: 249360
2015-10-05 22:49:16 +00:00
Davide Italiano b4606e183e [ELF2/AArch64] Read the right amount of bytes.
This was clearly wrong (thanks Rui for spotting), and I honestly would 
like to get this tested so such mistakes won't repeat. Unfortunately, I
wasn't (easily) able to craft a test that exposes the bad behavior.
Ideally, we would like to get tests of this kind for all relocations, but
at the time of writing, this is not true. So, for now just fix this bug
and try to re-evaluate a way to test this in the future.

llvm-svn: 249359
2015-10-05 22:43:42 +00:00
Keno Fischer e16edb554f [compiler-rt] Properly detect lack of available system libraries for arch in clang_darwin.mk
Summary: This is the Makefile analog of r247833, except that the test also had to be changed such that clang actually attempts to link the program as opposed to just building it. Because of that change, I also switched the order to checking for ld/clang architecture support, because now lack of ld support would make the clang check fail. This fixes PR24776.

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13425

llvm-svn: 249358
2015-10-05 22:24:12 +00:00
Rafael Espindola 9c3e4d2af5 Handle a common symbol needing a R_X86_64_RELATIVE.
llvm-svn: 249357
2015-10-05 21:23:08 +00:00
Benjamin Kramer 808d2a070d Move helper classes into an anonymous namespace. NFC.
llvm-svn: 249356
2015-10-05 21:20:26 +00:00
Benjamin Kramer 737501c673 Remove duplicated default arguments. NFC.
llvm-svn: 249355
2015-10-05 21:20:19 +00:00
Marshall Clow 297d1c58b2 Mark 2380 and 2384 as complete; no changes needed
llvm-svn: 249354
2015-10-05 21:11:20 +00:00
Rafael Espindola 3c83e2bbfb Include existing addend when computing R_X86_64_RELATIVE.
llvm-svn: 249353
2015-10-05 21:09:37 +00:00
Marshall Clow 0dbf123f7b Patch for 2466 is ready
llvm-svn: 249352
2015-10-05 21:08:49 +00:00
Diego Novillo 91cbed84d9 Remove AutoFDO profile handling for GCC's LIPO. NFC.
Given the work we are doing on ThinLTO, we will never need to support
module groups and working sets in GCC's implementation of LIPO. These
are currently dead code, and will continue to be so.

llvm-svn: 249351
2015-10-05 21:08:05 +00:00
Rafael Espindola d75fbd221d Make this test a bit more strict.
Before the ADDR variables could match the empty string.

llvm-svn: 249350
2015-10-05 20:54:39 +00:00
Marshall Clow e652e4dae1 Fixed a possible overflow in a test of allocator::max_size().
llvm-svn: 249349
2015-10-05 20:50:25 +00:00
Marshall Clow 5fb7d5a9e3 Mark a couple more issues 'ready'
llvm-svn: 249348
2015-10-05 20:35:30 +00:00
Marshall Clow 3f11baf4c7 Mark 2072 as complete; we already do this
llvm-svn: 249347
2015-10-05 20:21:54 +00:00
Rafael Espindola b7ab187a5c Fix the MSVC build.
No idea what asymmetry MSVC is findind.

llvm-svn: 249346
2015-10-05 20:20:50 +00:00
Marshall Clow 1c2f0c439f Patch ready for 2127
llvm-svn: 249345
2015-10-05 20:16:30 +00:00
David Majnemer e4f9b09b51 [WinEH] Update CATCHRET's operand to match its successor
The CATCHRET operand did not match the MachineFunction's CFG.  This
mismatch happened because FrameLowering created a new MachineBasicBlock
and updated the CFG but forgot to update the CATCHRET operand.

Let's make sure this doesn't happen again by strengthing the funclet
membership analysis: it can now reason about the membership of all basic
blocks, not just those inside of funclets.

llvm-svn: 249344
2015-10-05 20:09:16 +00:00
Aaron Ballman 46bc30472b Adding a checker (cert-dcl50-cpp) that detects the definition of a C-style variadic function in C++ code. Corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/DCL50-CPP.+Do+not+define+a+C-style+variadic+function
llvm-svn: 249343
2015-10-05 20:08:59 +00:00
Richard Smith 42fd9efa38 Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of
that change turns out to not be reasonable: mutating the AST of a parsed
template during instantiation is not a sound thing to do, does not work across
chained PCH / modules builds, and is in any case a special-case workaround to a
more general problem that should be solved centrally.

llvm-svn: 249342
2015-10-05 20:05:21 +00:00
Aaron Ballman 478a8eb2b6 Adding an AST node matcher for NonTypeTemplateParmDecl objects.
llvm-svn: 249341
2015-10-05 19:44:42 +00:00
Rafael Espindola ae24400424 Create R_X86_64_RELATIVE when needed.
The dynamic relocation code needs refactoring, but it is probably better
to do it with this test passing.

llvm-svn: 249340
2015-10-05 19:30:12 +00:00
Eric Fiselier 9dbb5586b5 [libcxx] Reexport std::bad_array_length symbols from libc++abi on OS X.
Summary:
On OS X libc++ needs to reexport libc++abi's symbols in order for them to be provided. We explicitly list the symbols to reexport it libcxx/lib/libc++abi2.exp. This patch adds the symbols required by std::bad_array_length which have been missing for some time.

However there is a problem. std::bad_array_length was add to libc++abi in September of 2013 by commit r190479, about a year after everything else. Therefore I think older OS X version  have libc++abi versions without std::bad_array_length. On those systems
libc++ won't build with this change because we will try and export undefined symbols.

The workaround I would write to support older systems depends on the amount of people who would need it.   If only a small number of developers are affected it might be sufficient to provide a CMake switch like `LIBCPP_LIBCPPABI_HAS_BAD_ARRAY_LENGTH` which is
ON by default and can be disabled by those who need it. Otherwise I think we should try to automatically detect if the symbols are present in `/usr/lib/libc++abi.dylib` and configure accordingly. I would prefer the first solution because writing CMake sucks.




Reviewers: mclow.lists, aprantl

Subscribers: aprantl, cfe-commits

Differential Revision: http://reviews.llvm.org/D13445

llvm-svn: 249339
2015-10-05 19:28:48 +00:00
Adhemerval Zanella bffb20d0c2 [sanitizer] Enable lsan for AArch64
llvm-svn: 249338
2015-10-05 19:16:42 +00:00
Adhemerval Zanella 5ea8dcb8cf [lsan] [aarch64] Add support for AArch64
This patch add support for leak sanitizer for aarch64.  Similar to
MIPS it uses a SizeClassAllocator32 due VMA constraints (aarch64
currently supports 39 and 42-bit VMA).

llvm-svn: 249337
2015-10-05 19:16:09 +00:00
Adrian Prantl 9641ae3746 Re-introduce the unique_ptr removed in r249328 and just make
~CodeGenABITypes out-of-line, which should have the same effect.

Thanks to David Blaikie for pointing this out!

llvm-svn: 249336
2015-10-05 18:54:30 +00:00
Jakub Staszak 225d3ab801 Simplify code. No functionality change.
llvm-svn: 249335
2015-10-05 18:53:30 +00:00