summaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-2076-33262/+0
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* Merge commit f596f4507 from llvm git (by Sam Elliott):Dimitry Andric2019-11-074-19/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [RISCV] Add Custom Parser for Atomic Memory Operands Summary: GCC Accepts both (reg) and 0(reg) for atomic instruction memory operands. These instructions do not allow for an offset in their encoding, so in the latter case, the 0 is silently dropped. Due to how we have structured the RISCVAsmParser, the easiest way to add support for parsing this offset is to add a custom AsmOperand and parser. This parser drops all the parens, and just keeps the register. This commit also adds a custom printer for these operands, which matches the GCC canonical printer, printing both `(a0)` and `0(a0)` as `(a0)`. Reviewers: asb, lewis-revill Reviewed By: asb Subscribers: s.egerton, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65205 llvm-svn: 367553 Merge commit f596f4507 from llvm git (by Sam Elliott): [RISCV] Add FreeBSD targets Reviewers: asb Reviewed By: asb Subscribers: simoncook, s.egerton, lenary, psnobl, benna, mhorne, emaste, kito-cheng, shiva0217, rogfer01, rkruppe, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57795 Patch by James Clarke (jrtc27) llvm-svn: 367557 Merge commit f596f4507 from llvm git (by Hsiangkai Wang): [DebugInfo] Generate fixups as emitting DWARF .debug_frame/.eh_frame. It is necessary to generate fixups in .debug_frame or .eh_frame as relaxation is enabled due to the address delta may be changed after relaxation. There is an opcode with 6-bits data in debug frame encoding. So, we also need 6-bits fixup types. Differential Revision: https://reviews.llvm.org/D58335 llvm-svn: 366524 Merge commit f596f4507 from llvm git (by Hsiangkai Wang): [DebugInfo] Some fields do not need relocations even relax is enabled. In debug frame information, some fields, e.g., Length in CIE/FDE and Offset in FDE are attributes to describe the structure of CIE/FDE. They are not related to the relaxed code. However, these attributes are symbol differences. So, in current design, these attributes will be filled as zero and LLVM generates relocations for them. We only need to generate relocations for symbols in executable sections. So, if the symbols are not located in executable sections, we still evaluate their values under relaxation. Differential Revision: https://reviews.llvm.org/D61584 llvm-svn: 366531 Merge commit f596f4507 from llvm git (by Alex Bradbury): [RISCV] Don't force absolute FK_Data_X fixups to relocs The current behavior of shouldForceRelocation forces relocations for the majority of fixups when relaxation is enabled. This makes sense for fixups which incorporate symbols but is unnecessary for simple data fixups where the fixup target is already resolved to an absolute value. Differential Revision: https://reviews.llvm.org/D63404 Patch by Edward Jones. llvm-svn: 369257 Merge commit f596f4507 from llvm git (by Alex Bradbury): [RISCV] Implement getExprForFDESymbol to ensure RISCV_32_PCREL is used for the FDE location Follow binutils in using RISCV_32_PCREL for the FDE initial location. As explained in the relevant binutils commit <https://github.com/riscv/riscv-binutils-gdb/commit/a6cbf936e3dce68114d28cdf60d510a3f78a6d40>, the ADD/SUB pair of relocations is problematic in the presence of linker relaxation. This patch has the same end goal as D64715 but includes test changes and avoids adding a new global VariantKind to MCExpr.h (preferring RISCVMCExpr VKs like the rest of the RISC-V backend). Differential Revision: https://reviews.llvm.org/D66419 llvm-svn: 369375 This series of merges will permit riscv64 kernels and riscv64sf worlds to build with clang instead of gcc (but still using the bfd linker). Requested by: jhb Obtained from: https://github.com/freebsd/freebsd/compare/master...bsdjhb:riscv_clang MFC after: 1 month X-MFC-With: r353358 Notes: svn path=/head/; revision=354469
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmpDimitry Andric2019-09-022-1/+9
| | | | | | | release_90 branch r369369, and update version numbers. Notes: svn path=/projects/clang900-import/; revision=351708
* Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-08-2176-915/+1520
| | | | Notes: svn path=/projects/clang900-import/; revision=351344
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++,Dimitry Andric2019-06-123-2/+9
| | | | | | | | | | | libunwind and openmp to the upstream release_80 branch r363030 (effectively, 8.0.1 rc2). The 8.0.1 release should follow this within a week or so. MFC after: 2 weeks Notes: svn path=/head/; revision=349004
* Merge ^/head r343956 through r344177.Dimitry Andric2019-02-151-6/+12
|\ | | | | | | Notes: svn path=/projects/clang800-import/; revision=344178
| * Pull in r353907 from upstream llvm trunk (by Reid Kleckner):Dimitry Andric2019-02-131-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [MC] Make symbol version errors non-fatal We stil don't have a source location, which is pretty lame, but at least we won't tell the user to file a clang bug report anymore. Fixes PR40712 This will make errors for symbols with @@ versions that are not defined non-fatal. For example: void f(void) { __asm__(".symver foo,bar@@baz"); } will now result in: error: versioned symbol bar@@baz must be defined instead of clang crashing with a diagnostic report. PR: 234671 Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=40712 MFC after: 3 days Notes: svn path=/head/; revision=344112
* | Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branchDimitry Andric2019-02-153-15/+24
| | | | | | | | | | | | | | r354130, resolve conflicts, and bump version numbers. Notes: svn path=/projects/clang800-import/; revision=344177
* | Merge llvm release_80 branch r351543, and resolve conflicts.Dimitry Andric2019-01-221-2/+50
| | | | | | | | Notes: svn path=/projects/clang800-import/; revision=343313
* | Merge llvm trunk r351319, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-01-2035-616/+1363
|/ | | | Notes: svn path=/projects/clang800-import/; revision=343210
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-12-091-0/+5
| | | | | | | | | | r348686 (effectively 7.0.1 rc3), resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=341763
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-09-111-8/+8
| | | | | | | | | r341916, resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=338597
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-08-292-15/+25
| | | | | | | | | r340910, resolve conflicts, and bump version numbers. PR: 230240, 230355 Notes: svn path=/projects/clang700-import/; revision=338391
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-08-111-36/+16
| | | | | | | r339355, resolve conflicts, and bump version numbers. Notes: svn path=/projects/clang700-import/; revision=337645
* Merge llvm trunk r338150 (just before the 7.0.0 branch point), andDimitry Andric2018-08-0210-18/+115
| | | | | | | resolve conflicts. Notes: svn path=/projects/clang700-import/; revision=337149
* Merge llvm trunk r338150, and resolve conflicts.Dimitry Andric2018-07-3044-1843/+3389
| | | | Notes: svn path=/projects/clang700-import/; revision=336916
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-06-291-0/+2
| | | | | | | | | | 6.0.1 release (upstream r335540). Relnotes: yes MFC after: 2 weeks Notes: svn path=/head/; revision=335799
* Pull in r327101 from upstream llvm trunk (by Rafael Espindola):Dimitry Andric2018-03-225-62/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't treat .symver as a regular alias definition. This patch starts simplifying the handling of .symver. For now it just moves the responsibility for creating an alias down to the streamer. With that the asm streamer can pass a .symver unchanged, which is nice since gas cannot parse "foo@bar = zed". In a followup I hope to move the handling down to the writer so that we don't need special hacks for avoiding breaking names with @@@ on windows. Pull in r327160 from upstream llvm trunk (by Rafael Espindola): Delay creating an alias for @@@. With this we only create an alias for @@@ once we know if it should use @ or @@. This avoids last minutes renames and hacks to handle MS names. This only handles the ELF writer. LTO still has issues with @@@ aliases. Pull in r327928 from upstream llvm trunk (by Vitaly Buka): Object: Move attribute calculation into RecordStreamer. NFC Summary: Preparation for D44274 Reviewers: pcc, espindola Subscribers: hiraditya Differential Revision: https://reviews.llvm.org/D44276 Pull in r327930 from upstream llvm trunk (by Vitaly Buka): Object: Fix handling of @@@ in .symver directive Summary: name@@@nodename is going to be replaced with name@@nodename if symbols is defined in the assembled file, or name@nodename if undefined. https://sourceware.org/binutils/docs/as/Symver.html Fixes PR36623 Reviewers: pcc, espindola Subscribers: mehdi_amini, hiraditya Differential Revision: https://reviews.llvm.org/D44274 Together, these changes fix handling of @@@ in .symver directives when doing Link Time Optimization. Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC after: 3 months X-MFC-With: r327952 Notes: svn path=/head/; revision=331366
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-02-161-51/+5
| | | | | | | | | | | 6.0.0 (branches/release_60 r325330). MFC after: 3 months X-MFC-With: r327952 PR: 224669 Notes: svn path=/head/; revision=329410
* Pull in r322131 from upstream llvm trunk (by Rafael Espíndola):Ed Maste2018-01-303-16/+18
| | | | | | | | | | | | Use a MCExpr for the size of MCFillFragment. This allows the size to be found during ralaxation. This fixes [LLVM] pr35858. Requested by: royger Notes: svn path=/head/; revision=328596
* Pull in r322123 from upstream llvm trunk (by Rafael Espíndola):Ed Maste2018-01-302-32/+15
| | | | | | | | | Don't create MCFillFragment directly. Instead use higher level APIs that take care of most bookkeeping. Notes: svn path=/head/; revision=328595
* Pull in r322108 from upstream llvm trunk (by Rafael Espíndola):Ed Maste2018-01-303-21/+8
| | | | | | | | | Make one of the emitFill methods non virtual. NFC. This is just preparatory work to fix [LLVM] PR35858. Notes: svn path=/head/; revision=328594
* Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ toDimitry Andric2018-01-241-0/+69
| | | | | | | | | | | 6.0.0 (branches/release_60 r323338). MFC after: 3 months X-MFC-With: r327952 PR: 224669 Notes: svn path=/head/; revision=328381
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788,Dimitry Andric2018-01-061-1/+1
| | | | | | | update build glue and version numbers. Notes: svn path=/projects/clang600-import/; revision=327657
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,Dimitry Andric2017-12-292-4/+8
| | | | | | | | update build glue and version numbers, add new intrinsics headers, and update OptionalObsoleteFiles.inc. Notes: svn path=/projects/clang600-import/; revision=327330
* Merge llvm trunk r321414 to contrib/llvm.Dimitry Andric2017-12-243-56/+87
| | | | Notes: svn path=/projects/clang600-import/; revision=327134
* Merge llvm trunk r321017 to contrib/llvm.Dimitry Andric2017-12-2037-985/+2206
| | | | Notes: svn path=/projects/clang600-import/; revision=327023
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and updateDimitry Andric2017-07-135-98/+102
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320970
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and updateDimitry Andric2017-07-022-10/+20
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320572
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306325, and updateDimitry Andric2017-06-278-172/+249
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320397
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and updateDimitry Andric2017-06-173-18/+29
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320041
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and updateDimitry Andric2017-06-1045-239/+218
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319799
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304659, and updateDimitry Andric2017-06-031-410/+496
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319547
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304460, and updateDimitry Andric2017-06-011-1/+1
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319479
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304222, and updateDimitry Andric2017-05-301-3/+3
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319250
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and updateDimitry Andric2017-05-291-18/+16
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319164
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and updateDimitry Andric2017-05-162-0/+26
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=318384
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and updateDimitry Andric2017-05-082-4/+49
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=317969
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and updateDimitry Andric2017-05-038-34/+88
| | | | | | | build glue (preliminary, not all option combinations work yet). Notes: svn path=/projects/clang500-import/; revision=317778
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and updateDimitry Andric2017-04-262-7/+8
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=317472
* Merge llvm, clang, lld and lldb trunk r300890, and update build glue.Dimitry Andric2017-04-202-12/+13
| | | | Notes: svn path=/projects/clang500-import/; revision=317230
* Merge llvm trunk r300422 and resolve conflicts.Dimitry Andric2017-04-1660-1173/+3063
| | | | Notes: svn path=/projects/clang500-import/; revision=317029
* Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branchDimitry Andric2017-02-111-6/+6
| | | | | | | r294803, and update build glue. Notes: svn path=/projects/clang400-import/; revision=313643
* Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branchDimitry Andric2017-02-011-1/+2
| | | | | | | r293807, and update build glue. Notes: svn path=/projects/clang400-import/; revision=313067
* Update llvm to trunk r290819 and resolve conflicts.Dimitry Andric2017-01-0239-1094/+1853
| | | | Notes: svn path=/projects/clang400-import/; revision=311142
* Update llvm to release_39 branch r276489, and resolve conflicts.Dimitry Andric2016-08-1648-1360/+2600
| | | | Notes: svn path=/projects/clang390-import/; revision=304240
* Update llvm, clang and lldb to trunk r257626, and update build glue.Dimitry Andric2016-01-144-9/+12
| | | | Notes: svn path=/projects/clang380-import/; revision=294024
* Update llvm to trunk r256945.Dimitry Andric2016-01-064-35/+24
| | | | Notes: svn path=/projects/clang380-import/; revision=293265
* Update llvm to trunk r256633.Dimitry Andric2015-12-3042-1426/+1815
| | | | Notes: svn path=/projects/clang380-import/; revision=292941
* Upgrade our copies of clang and llvm to 3.7.1 release. This is aDimitry Andric2015-12-251-0/+1
| | | | | | | | | | bugfix-only release, with no new features. Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information. Notes: svn path=/head/; revision=292735