summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Change memcpy/memset/memmove to have dest and source alignments."Pete Cooper2015-11-191-2/+2
| | | | | | | | | | This reverts commit r253511. This likely broke the bots in http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202 http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787 llvm-svn: 253543
* Change memcpy/memset/memmove to have dest and source alignments.Pete Cooper2015-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html These intrinsics currently have an explicit alignment argument which is required to be a constant integer. It represents the alignment of the source and dest, and so must be the minimum of those. This change allows source and dest to each have their own alignments by using the alignment attribute on their arguments. The alignment argument itself is removed. There are a few places in the code for which the code needs to be checked by an expert as to whether using only src/dest alignment is safe. For those places, they currently take the minimum of src/dest alignments which matches the current behaviour. For example, code which used to read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 500, i32 8, i1 false) will now read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %dest, i8* align 8 %src, i32 500, i1 false) For out of tree owners, I was able to strip alignment from calls using sed by replacing: (call.*llvm\.memset.*)i32\ [0-9]*\,\ i1 false\) with: $1i1 false) and similarly for memmove and memcpy. I then added back in alignment to test cases which needed it. A similar commit will be made to clang which actually has many differences in alignment as now IRBuilder can generate different source/dest alignments on calls. In IRBuilder itself, a new argument was added. Instead of calling: CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, /* isVolatile */ false) you now call CreateMemCpy(Dst, Src, getInt64(Size), DstAlign, SrcAlign, /* isVolatile */ false) There is a temporary class (IntegerAlignment) which takes the source alignment and rejects implicit conversion from bool. This is to prevent isVolatile here from passing its default parameter to the source alignment. Note, changes in future can now be made to codegen. I didn't change anything here, but this change should enable better memcpy code sequences. Reviewed by Hal Finkel. llvm-svn: 253511
* ELFYAML: Add support for parsing AMDGPU section attribute flagsTom Stellard2015-11-131-1/+16
| | | | | | | | | | Reviewers: silvas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14444 llvm-svn: 253052
* Tests: be slightly more specific to avoid conflict with path.Tim Northover2015-10-261-1/+1
| | | | llvm-svn: 251290
* [AVR] Add ELF constants to headersDylan McKay2015-10-232-0/+62
| | | | | | | | Also adds a 'trivial' ELF file. This was generated by assembling and linking a file with the symbol main which contains a single return instruction. llvm-svn: 251096
* Fix printing of 64 bit values and make test more strict.Rafael Espindola2015-10-011-12/+26
| | | | llvm-svn: 249043
* Avoid SEGFAULT if a requested symbol section is absent.Rafael Espindola2015-09-211-0/+2
| | | | | | Patch by Igor Kudrin! llvm-svn: 248194
* Fixup r248096, commit the *correct* test.Davide Italiano2015-09-191-2/+2
| | | | llvm-svn: 248097
* [obj2yaml] Fix "time of check to time of use" bug. Add a test.Davide Italiano2015-09-191-0/+3
| | | | llvm-svn: 248096
* [opaque pointer type] Add textual IR support for explicit type parameter for ↵David Blaikie2015-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | global aliases update.py: import fileinput import sys import re alias_match_prefix = r"(.*(?:=|:|^)\s*(?:external |)(?:(?:private|internal|linkonce|linkonce_odr|weak|weak_odr|common|appending|extern_weak|available_externally) )?(?:default |hidden |protected )?(?:dllimport |dllexport )?(?:unnamed_addr |)(?:thread_local(?:\([a-z]*\))? )?alias" plain = re.compile(alias_match_prefix + r" (.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|addrspacecast|\[\[[a-zA-Z]|\{\{).*$)") cast = re.compile(alias_match_prefix + r") ((?:bitcast|inttoptr|addrspacecast)\s*\(.* to (.*?)(| addrspace\(\d+\) *)\*\)\s*(?:;.*)?$)") gep = re.compile(alias_match_prefix + r") ((?:getelementptr)\s*(?:inbounds)?\s*\((?P<type>.*), (?P=type)(?:\s*addrspace\(\d+\)\s*)?\* .*\)\s*(?:;.*)?$)") def conv(line): m = re.match(cast, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(gep, line) if m: return m.group(1) + " " + m.group(3) + ", " + m.group(2) m = re.match(plain, line) if m: return m.group(1) + ", " + m.group(2) + m.group(3) + "*" + m.group(4) + "\n" return line for line in sys.stdin: sys.stdout.write(conv(line)) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh llvm-svn: 247378
* Object: Fix COFF import file's symbols.Rui Ueyama2015-09-011-3/+3
| | | | | | | If a symbol is marked as "data", the symbol should be exported with __imp_ prefix. Previously, the symbol was exported as-is. llvm-svn: 246532
* Re-apply r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-283-0/+10
| | | | | | | | | | | short import files This patch includes a fix for a llvm-readobj test. With this patch, the tool does no longer print out COFF headers for the short import file, but that's probably desirable because the header for the short import file is dummy. llvm-svn: 246283
* Rollback r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-283-10/+0
| | | | | | | | short import files This change caused a test for llvm-readobj to fail. llvm-svn: 246277
* Object: Teach llvm-ar to create symbol table for COFF short import files.Rui Ueyama2015-08-283-0/+10
| | | | | | | | | | | | | COFF short import files are special kind of files that contains only DLL-exported symbol names. That's different from object files because it has no data except symbol names. This change implements a SymbolicFile interface for the short import files so that symbol names can be accessed through that interface. llvm-ar is now able to read the file and create symbol table entries for short import files. llvm-svn: 246276
* Report an error if a SHT_SYMTAB_SHNDX section has the wrong size.Rafael Espindola2015-08-242-0/+4
| | | | llvm-svn: 245873
* Add a test showing that objdump (and so ObjectFIle) can handle shndx.Rafael Espindola2015-08-102-0/+8
| | | | | | It was already passing, we were just not testing the code. llvm-svn: 244504
* add missing tests filesRafael Espindola2015-08-071-0/+0
| | | | llvm-svn: 244323
* Add dynamic_table iterators back to ELF.h.Rafael Espindola2015-08-072-0/+14
| | | | | | | | | In tree they are only used by llvm-readobj, but it is also used by https://github.com/mono/CppSharp. While at it, add some missing error checking. llvm-svn: 244320
* Move to llvm-readobj code that is only used there.Rafael Espindola2015-08-061-1/+1
| | | | | | | | | | lld might end up using a small part of this, but it will be in a much refactored form. For now this unblocks avoiding the full section scan in the ELFFile constructor. This also has a (very small) error handling improvement. llvm-svn: 244282
* Update comments.Rui Ueyama2015-08-061-2/+2
| | | | llvm-svn: 244259
* [COFF] Return symbol VAs instead of RVAs for PE filesReid Kleckner2015-07-313-0/+31
| | | | | | | | This makes llvm-nm consistent with binutils nm on executables and DLLs. For a vanilla hello world executable, the address of main should include the default image base of 0x400000. llvm-svn: 243755
* ELFYAML: Enable parsing of EM_AMDGPUTom Stellard2015-07-311-0/+12
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11263 llvm-svn: 243724
* Support printing relocations in files with no section table.Rafael Espindola2015-07-232-0/+12
| | | | llvm-svn: 242998
* Refactor duplicated code and check for invalid symbol table size.Rafael Espindola2015-07-232-0/+4
| | | | llvm-svn: 242981
* Force the gnu archive format to fix the test on darwin.Rafael Espindola2015-07-221-1/+1
| | | | llvm-svn: 242949
* Fix fetching the symbol table of a thin archive.Rafael Espindola2015-07-221-0/+11
| | | | | | We were trying to read it as an external file. llvm-svn: 242926
* Identify thin archives as archives.Rafael Espindola2015-07-221-0/+9
| | | | llvm-svn: 242921
* [Object][ELF] Handle files with no section header string table.Michael J. Spencer2015-07-212-0/+10
| | | | llvm-svn: 242839
* Simplify iterating over the dynamic section and report broken ones.Rafael Espindola2015-07-202-0/+6
| | | | llvm-svn: 242712
* Remove Elf_Rela_Iter and Elf_Rel_Iter.Rafael Espindola2015-07-202-0/+7
| | | | | | Use just the pointers and check for invalid relocation sections. llvm-svn: 242700
* Report errors an invalid virtual addresses.Rafael Espindola2015-07-202-0/+6
| | | | llvm-svn: 242676
* Simplify iterating over program headers and detect corrupt ones.Rafael Espindola2015-07-202-0/+6
| | | | | | We now use a simple pointer and have range loops. llvm-svn: 242669
* llvm-readobj: Handle invalid references to the string table.Rafael Espindola2015-07-202-0/+7
| | | | llvm-svn: 242658
* Move CHECKs closer to the RUN line.Rafael Espindola2015-07-201-6/+9
| | | | llvm-svn: 242657
* llvm-readobj: call exit(1) on error.Rafael Espindola2015-07-201-1/+0
| | | | | | | | | llvm-readobj exists for testing llvm. We can safely stop the program the first time we know the input in corrupted. This is in preparation for making it handle a few more broken files. llvm-svn: 242656
* Trying to fix the windows bots.Rafael Espindola2015-07-161-4/+4
| | | | llvm-svn: 242367
* Fix handling of relative paths in thin archives.Rafael Espindola2015-07-161-3/+18
| | | | | | The member has to end up with a path relative to the archive. llvm-svn: 242362
* llvm-ar: Don't write the directory in the string table.Rafael Espindola2015-07-151-3/+12
| | | | | | | We were already doing the right thing for short file names, but not long ones. llvm-svn: 242354
* Handle the error of trying to convert a regular archive to a thin one.Rafael Espindola2015-07-151-0/+14
| | | | | | While at it, test that we can add to a thin archive. llvm-svn: 242330
* Initial support for writing thin archives.Rafael Espindola2015-07-151-0/+11
| | | | llvm-svn: 242269
* Accept lower case to handle windows error messages.Rafael Espindola2015-07-141-1/+1
| | | | llvm-svn: 242236
* Add support for reading members out of thin archives.Rafael Espindola2015-07-141-0/+6
| | | | | | | | | | For now the Archive owns the buffers of the thin archive members. This makes for a simple API, but all the buffers are destructed only when the archive is destructed. This should be fine since we close the files after mmap so we should not hit an open file limit. llvm-svn: 242215
* llvm-ar: Don't try to extract from thin archives.Rafael Espindola2015-07-141-0/+3
| | | | | | This matches the gnu ar behavior. llvm-svn: 242162
* Sleep for 2.1 seconds to see if that makes the test stable on windows.Rafael Espindola2015-07-141-2/+3
| | | | | | Might fix pr24106. llvm-svn: 242158
* llvm-ar: print an error when the requested member is not found.Rafael Espindola2015-07-141-0/+4
| | | | llvm-svn: 242156
* Rename a test. NFC.Rafael Espindola2015-07-141-2/+0
| | | | llvm-svn: 242151
* Add missing file.Rafael Espindola2015-07-131-0/+0
| | | | | | Sorry about that. llvm-svn: 242083
* Fix reading archive members with / in the name.Rafael Espindola2015-07-131-0/+6
| | | | | | This is important for thin archives. llvm-svn: 242082
* Add support deterministic output in llvm-ar and make it the default.Rafael Espindola2015-07-134-20/+20
| | | | llvm-svn: 242061
* [Object][ELF] Handle the dynamic string table in files without a section table.Michael J. Spencer2015-07-101-1/+29
| | | | llvm-svn: 241937
OpenPOWER on IntegriCloud