aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCExpr.cpp
AgeCommit message (Collapse)AuthorFilesLines
2022-04-17[NVPTX] Disable parens for identifiers starting with '$'Andrew Savonichev1-2/+3
ptxas fails to parse such syntax: mov.u64 %rd1, ($str); fatal : Parsing error near '$str': syntax error A new MCAsmInfo option was added because InParens parameter of MCExpr::print is not sufficient to disable parens completely. MCExpr::print resets it to false for a recursive call in case of unary or binary expressions. Targets that require parens around identifiers that start with '$' should always pass MCAsmInfo to MCExpr::print. Therefore 'operator<<(raw_ostream &, MCExpr&)' should be avoided because it calls MCExpr::print with nullptr MAI. Differential Revision: https://reviews.llvm.org/D123702
2022-04-14Revert "[NVPTX] Disable parens for identifiers starting with '$'"Andrew Savonichev1-3/+2
This reverts commit 78d70a1c976934587e6d4c5698c348b8f09d9d96. Failed on Mips32: https://lab.llvm.org/buildbot#builders/109/builds/36628 # CHECK: # fixup A - offset: 0, value: ($tmp0), kind: fixup_Mips_26 <stdin>:580:2: note: possible intended match here # fixup A - offset: 0, value: $tmp0, kind: fixup_Mips_26
2022-04-14[NVPTX] Disable parens for identifiers starting with '$'Andrew Savonichev1-2/+3
ptxas fails to parse such syntax: mov.u64 %rd1, ($str); fatal : Parsing error near '$str': syntax error A new MCAsmInfo option was added because InParens parameter of MCExpr::print is not sufficient to disable parens completely. MCExpr::print resets it to false for a recursive call in case of unary or binary expressions. Differential Revision: https://reviews.llvm.org/D123702
2022-02-09Cleanup LLVMMC headersserge-sans-paille1-1/+0
There's a few relevant forward declarations in there that may require downstream adding explicit includes: llvm/MC/MCContext.h no longer includes llvm/BinaryFormat/ELF.h, llvm/MC/MCSubtargetInfo.h, llvm/MC/MCTargetOptions.h llvm/MC/MCObjectStreamer.h no longer include llvm/MC/MCAssembler.h llvm/MC/MCAssembler.h no longer includes llvm/MC/MCFixup.h, llvm/MC/MCFragment.h Counting preprocessed lines required to rebuild llvm-project on my setup: before: 1052436830 after: 1049293745 Which is significant and backs up the change in addition to the usual benefits of decreasing coupling between headers and compilation units. Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119244
2021-11-19[X86] Selective relocation relaxation for +tagged-globalsMatt Morehouse1-0/+2
For tagged-globals, we only need to disable relaxation for globals that we actually tag. With this patch function pointer relocations, which we do not instrument, can be relaxed. This patch also makes tagged-globals work properly with LTO, as -Wa,-mrelax-relocations=no doesn't work with LTO. Reviewed By: pcc Differential Revision: https://reviews.llvm.org/D113220
2021-09-14[WebAssembly] Allow import and export of TLS symbols between DSOsSam Clegg1-0/+2
We previously had a limitation that TLS variables could not be exported (and therefore could also not be imported). This change removed that limitation. Differential Revision: https://reviews.llvm.org/D108877
2021-06-17RISCV: adjust handling of relocation emission for RISCVSaleem Abdulrasool1-23/+2
This re-architects the RISCV relocation handling to bring the implementation closer in line with the implementation in binutils. We would previously aggressively resolve the relocation. With this restructuring, we always will emit a paired relocation for any symbolic difference of the type of S±T[±C] where S and T are labels and C is a constant. GAS has a special target hook controlled by `RELOC_EXPANSION_POSSIBLE` which indicates that a fixup may be expanded into multiple relocations. This is used by the RISCV backend to always emit a paired relocation - either ADD[WIDTH] + SUB[WIDTH] for text relocations or SET[WIDTH] + SUB[WIDTH] for a debug info relocation. Irrespective of whether linker relaxation support is enabled, symbolic difference is always emitted as a paired relocation. This change also sinks the target specific behaviour down into the target specific area rather than exposing it to the shared relocation handling. In the process, we also sink the "special" handling for debug information down into the RISCV target. Although this improves the path for the other targets, this is not necessarily entirely ideal either. The changes in the debug info emission could be done through another type of hook as this functionality would be required by any other target which wishes to do linker relaxation. However, as there are no other targets in LLVM which currently do this, this is a reasonable thing to do until such time as the code needs to be shared. Improve the handling of the relocation (and add a reduced test case from the Linux kernel) to ensure that we handle complex expressions for symbolic difference. This ensures that we correct relocate symbols with the adddends normalized and associated with the addition portion of the paired relocation. This change also addresses some review comments from Alex Bradbury about the relocations meant for use in the DWARF CFA being named incorrectly (using ADD6 instead of SET6) in the original change which introduced the relocation type. This resolves the issues with the symbolic difference emission sufficiently to enable building the Linux kernel with clang+IAS+lld (without linker relaxation). Resolves PR50153, PR50156! Fixes: ClangBuiltLinux/linux#1023, ClangBuiltLinux/linux#1143 Reviewed By: nickdesaulniers, maskray Differential Revision: https://reviews.llvm.org/D103539
2021-04-29[AIX][TLS] Add ASM portion changes to support TLSGD relocations to XCOFF objectsVictor Huang1-0/+4
- Add new variantKinds for the symbol's variable offset and region handle - Print the proper relocation specifier @gd in the asm streamer when emitting the TC Entry for the variable offset for the symbol - Fix the switch section failure between the TC Entry of variable offset and region handle - Put .__tls_get_addr symbol in the ProgramCodeSects with XTY_ER property Reviewed by: sfertile Differential Revision: https://reviews.llvm.org/D100956
2021-02-10[AVR] Fix global references to function symbolsDylan McKay1-0/+1
References to functions are in program memory and need a `pm()` fixup. This should fix trait objects for Rust on AVR. Differential Revision: https://reviews.llvm.org/D87631 Patch by Alex Mikhalev.
2020-12-01[X86] Support modifier @PLTOFF for R_X86_64_PLTOFF64Fangrui Song1-0/+2
`gcc -mcmodel=large` can emit @PLTOFF. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D92294
2020-11-18MCExpr::evaluateAsRelocatableImpl : allow evaluation of non-VK_None ↵Fangrui Song1-1/+18
MCSymbolRefExpr when MCAsmLayout is available https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4acf8c78e659833be8be047ba2f8561386a11d4b (1994) introduced this behavior: if a fixup symbol is equated to an expression with an undefined symbol, convert the fixup to be against the target symbol. glibc relies on this behavior to perform assembly level indirection ``` asm("memcpy = __GI_memcpy"); // from sysdeps/generic/symbol-hacks.h ... // call memcpy@PLT // The relocation references __GI_memcpy in GNU as, but memcpy in MC (without the patch) memcpy (...); ``` (1) It complements `extern __typeof(memcpy) memcpy asm("__GI_memcpy");` The frontend asm label does not redirect synthesized memcpy in the middle-end. (See D88712 for details) (2) `asm("memcpy = __GI_memcpy");` is in every translation unit, but the memcpy declaration may not be visible in the translation unit where memcpy is synthesized. MC already redirects `memcpy = __GI_memcpy; call memcpy` but not `memcpy = __GI_memcpy; call memcpy@plt`. This patch fixes the latter by allowing MCExpr::evaluateAsRelocatableImpl to evaluate a non-VK_None MCSymbolRefExpr, which is only done after the layout is available. GNU as allows `memcpy = __GI_memcpy+1; call memcpy@PLT` which seems nonsensical, so we don't allow it. `MC/PowerPC/pr38945.s` `NUMBER = 0x6ffffff9; cmpwi 8,NUMBER@l` requires the `symbol@l` form in AsmMatcher, so evaluation needs to be deferred. This is the place whether future simplification may be possible. Note, if we suppress the VM_None evaluation when MCAsmLayout is nullptr, we may lose the `invalid reassignment of non-absolute variable` diagnostic (`ARM/thumb_set-diagnostics.s` and `MC/AsmParser/variables-invalid.s`). We know that this diagnostic is troublesome in some cases (https://github.com/ClangBuiltLinux/linux/issues/1008), so we can consider making simplification in the future. Reviewed By: jyknight Differential Revision: https://reviews.llvm.org/D88625
2020-11-13[WebAssembly] Add new relocation type for TLS data symbolsSam Clegg1-0/+2
These relocations represent offsets from the __tls_base symbol. Previously we were just using normal MEMORY_ADDR relocations and relying on the linker to select a segment-offset rather and absolute value in Symbol::getVirtualAddress(). Using an explicit relocation type allows allow us to clearly distinguish absolute from relative relocations based on the relocation information alone. One place this is useful is being able to reject absolute relocation in the PIC case, but still accept TLS relocations. Differential Revision: https://reviews.llvm.org/D91276
2020-10-01[MC] Inline MCExpr::printVariantKind & remove UseParensForSymbolVariantBitFangrui Song1-11/+8
Note, MAI may be nullptr in -show-encoding.
2020-09-23[PowerPC][PCRelative] Thread Local Storage Support for Local DynamicVictor Huang1-0/+3
This patch is the initial support for the Local Dynamic Thread Local Storage model to produce code sequence and relocation correct to the ABI for the model when using PC relative memory operations. Differential Revision: https://reviews.llvm.org/D87721
2020-09-09[MC] Resolve the difference of symbols in consecutive MCDataFragementsJian Cai1-33/+50
Try to resolve the difference of two symbols in consecutive MCDataFragments. This is important for an idiom like "foo:instr; .if . - foo; instr; .endif" (https://bugs.llvm.org/show_bug.cgi?id=43795). Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D69411
2020-08-21[PowerPC][PCRelative] Thread Local Storage Support for Initial ExecKamau Bridgeman1-0/+6
This patch is the initial support for the Intial Exec Thread Local Local Storage model to produce code sequence and relocations correct to the ABI for the model when using PC relative memory operations. Reviewed By: stefanp Differential Revision: https://reviews.llvm.org/D81947
2020-08-20[PowerPC][PCRelative] Thread Local Storage Support for General DynamicKamau Bridgeman1-0/+3
This patch is the initial support for the General Dynamic Thread Local Local Storage model to produce code sequence and relocations correct to the ABI for the model when using PC relative memory operations. Patch by: NeHuang Reviewed By: stefanp Differential Revision: https://reviews.llvm.org/D82315
2020-07-30[MC] Support infix operator !Fangrui Song1-0/+2
Disabled for Darwin mode. Also disabled for ARM which has compatible aliases (implied 'sp' operand in 'srs*' instructions like 'srsda #31!').
2020-07-22[PowerPC] Add linker opt for PC Relative GOT indirect accessesStefan Pintilie1-0/+1
A linker optimization is available on PowerPC for GOT indirect PCRelative loads. The idea is that we can mark a usual GOT indirect load: pld 3, vec@got@pcrel(0), 1 lwa 3, 4(3) With a relocation to say that if we don't need to go through the GOT we can let the linker further optimize this and replace a load with a nop. pld 3, vec@got@pcrel(0), 1 .Lpcrel1: .reloc .Lpcrel1-8,R_PPC64_PCREL_OPT,.-(.Lpcrel1-8) lwa 3, 4(3) This patch adds the logic that allows the compiler to add the R_PPC64_PCREL_OPT. Reviewers: nemanjai, lei, hfinkel, sfertile, efriedma, tstellar, grosbach Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D79864
2020-07-20[MC,NVPTX] Add MCAsmPrinter support for unsigned-only data directives.Artem Belevich1-0/+2
PTX does not support negative values in .bNN data directives and we must typecast such values to unsigned before printing them. MCAsmInfo can now specify whether such casting is necessary for particular target. Differential Revision: https://reviews.llvm.org/D83423
2020-07-07[VE] Support symbol with offset in assemblyKazushi (Jam) Marukawa1-0/+28
Summary: Change MCExpr to support Aurora VE's modifiers. Change asmparser to use existing MCExpr parser (parseExpression) to parse an expression contining symbols with modifiers and offsets. Also add several regression tests of MC layer. Reviewers: simoll, k-ishizaka Reviewed By: simoll Subscribers: hiraditya, llvm-commits Tags: #llvm, #ve Differential Revision: https://reviews.llvm.org/D83170
2020-06-25[MC] Fix PR45805: infinite recursion in assemblerThomas Preud'homme1-4/+11
Give up folding an expression if the fragment of one of the operands would require laying out a fragment already being laid out. This prevents hitting an infinite recursion when a fill size expression refers to a later fragment since computing the offset of that fragment would require laying out the fill fragment and thus computing its size expression. Reviewed By: echristo Differential Revision: https://reviews.llvm.org/D79570
2020-05-06[PowerPC] Fix missing GOT indirect variant kindStefan Pintilie1-0/+1
The function MCSymbolRefExpr::getVariantKindForName was missing the entry for VK_PPC_GOT_PCREL. This patch adds the missing entry. Differential Revision: https://reviews.llvm.org/D79015
2020-04-17[PowerPC][Future] More support for PCRel addressing for global valuesStefan Pintilie1-0/+2
Add initial support for PC Relative addressing for global values that require GOT indirect addressing. This patch adds PCRelative support for global addresses that may not be known at link time and may require access through the GOT. Differential Revision: https://reviews.llvm.org/D76064
2020-04-15[MC] Use subclass data for MCExpr to reduce memory usageNikita Popov1-4/+4
MCExpr has a bunch of free space that is currently going to waste. Repurpose it as 24 bits of subclass data, which is enough to reduce the size of all subclasses by 8 bytes. This gives us some respectable savings for debuginfo builds. Here are the max-rss reductions for the fat LTO link step: kc.link 238MiB 231MiB (-2.82%) sqlite3.link 258MiB 250MiB (-3.27%) consumer-typeset.link 152MiB 148MiB (-2.51%) bullet.link 197MiB 192MiB (-2.30%) tramp3d-v4.link 578MiB 567MiB (-1.92%) pairlocalalign.link 92MiB 90MiB (-1.98%) clamscan.link 230MiB 223MiB (-2.81%) lencod.link 242MiB 235MiB (-2.67%) SPASS.link 235MiB 230MiB (-2.23%) 7zip-benchmark.link 450MiB 435MiB (-3.25%) Differential Revision: https://reviews.llvm.org/D77939
2020-04-08[PowerPC][Future] Add Support For Functions That Do Not Use A TOC.Stefan Pintilie1-0/+2
On PowerPC most functions require a valid TOC pointer. This is the case because either the function itself needs to use this pointer to access the TOC or because other functions that are called from that function expect a valid TOC pointer in the register R2. The main exception to this is leaf functions that do not access the TOC since they are guaranteed not to need a valid TOC pointer. This patch introduces a feature that will allow more functions to not require a valid TOC pointer in R2. Differential Revision: https://reviews.llvm.org/D73664
2020-02-19[Hexagon][NFC] Rename VK_Hexagon_PCREL to VK_PCRELStefan Pintilie1-2/+2
On PowerPC we will soon need to use pcrel to indicate PC Relative addressing. Renamed the Hexagon specific variant kind to a non target specific VK so that it can be used on both Hexagon and PowerPC. Differential Revision: https://reviews.llvm.org/D74788
2020-02-07[AsmPrinter] Print FP constant in hexadecimal form insteadJinsong Ji1-3/+21
Printing floating point number in decimal is inconvenient for humans. Verbose asm output will print out floating point values in comments, it helps. But in lots of cases, users still need additional work to covert the decimal back to hex or binary to check the bit patterns, especially when there are small precision difference. Hexadecimal form is one of the supported form in LLVM IR, and easier for debugging. This patch try to print all FP constant in hex form instead. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D73566
2020-01-06[NFC] Fix trivial typos in commentsJames Henderson1-1/+1
Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D72143 Patch by Kazuaki Ishizaki.
2019-10-17[AIX] TOC pseudo expansion for 64bit large + 64bit small + 32bit large modelsXiangling Liao1-0/+4
This patch provides support for peudo ops including ADDIStocHA8, ADDIStocHA, LWZtocL, LDtoc, LDtocL for AIX, lowering them from MIR to assembly. Differential Revision: https://reviews.llvm.org/D68341 llvm-svn: 375113
2019-08-20[MC] Delete an overload of MCExpr::evaluateKnownAbsolute and its associated hackFangrui Song1-14/+7
The hack dated back to 2010 (r121076) and was documented by r122144: // FIXME: The use if InSet = Addrs is a hack. Setting InSet causes us // absolutize differences across sections and that is what the MachO writer // uses Addrs for. llvm-svn: 369337
2019-07-19[DebugInfo] Some fields do not need relocations even relax is enabled.Hsiangkai Wang1-2/+19
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
2019-07-17Changes to display code view debug info type records in hex formatNilanjana Basu1-5/+12
llvm-svn: 366390
2019-06-16AMDGPU: Prepare for explicit absolute relocations in code generationNicolai Haehnle1-0/+4
Summary: We will use absolute relocations for LDS symbols. Change-Id: I9a32795ed0ea835e433a787129cfe3c57ee9a325 Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61492 llvm-svn: 363517
2019-04-04[WebAssembly] Add new explicit relocation types for PIC relocationsSam Clegg1-2/+6
See https://github.com/WebAssembly/tool-conventions/pull/106 Differential Revision: https://reviews.llvm.org/D59907 llvm-svn: 357710
2019-02-22[WebAssembly] Remove unneeded MCSymbolRefExpr variantsSam Clegg1-6/+0
We record the type of the symbol (event/function/data/global) in the MCWasmSymbol and so it should always be clear how to handle a relocation based on the symbol itself. The exception is a function which still needs the special @TYPEINDEX then the relocation contains the signature rather than the address of the functions. Differential Revision: https://reviews.llvm.org/D58472 llvm-svn: 354697
2019-02-07[mips][micromips] Fix how values in .gcc_except_table are calculatedPetar Jovanovic1-0/+5
When a landing pad is calculated in a program that is compiled for micromips with -fPIC flag, it will point to an even address. Such an error will cause a segmentation fault, as the instructions in micromips are aligned on odd addresses. This patch sets the last bit of the offset where a landing pad is, to 1, which will effectively be an odd address and point to the instruction exactly. r344591 fixed this issue for -static compilation. Patch by Aleksandar Beserminji. Differential Revision: https://reviews.llvm.org/D57677 llvm-svn: 353480
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-11-14[WebAssembly] Add support for the event sectionHeejin Ahn1-0/+2
Summary: This adds support for the 'event section' specified in the exception handling proposal. (This was named 'exception section' first, but later renamed to 'event section' to take possibilities of other kinds of events into consideration. But currently we only store exception info in this section.) The event section is added between the global section and the export section. This is for ease of validation per request of the V8 team. This patch: - Creates the event symbol type, which is a weak symbol - Makes 'throw' instruction take the event symbol '__cpp_exception' - Adds relocation support for events - Adds WasmObjectWriter / WasmObjectFile (Reader) support - Adds obj2yaml / yaml2obj support - Adds '.eventtype' printing support Reviewers: dschuff, sbc100, aardappel Subscribers: jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54096 llvm-svn: 346825
2018-10-16[mips][micromips] Fix how values in .gcc_except_table are calculatedAleksandar Beserminji1-0/+5
When a landing pad is calculated in a program that is compiled for micromips, it will point to an even address. Such an error will cause a segmentation fault, as the instructions in micromips are aligned on odd addresses. This patch sets the last bit of the offset where a landing pad is, to 1, which will effectively be an odd address and point to the instruction exactly. Differential Revision: https://reviews.llvm.org/D52985 llvm-svn: 344591
2018-10-04[WebAssembly] Fixed missing "global" symbol type in AsmParser.Wouter van Oortmerssen1-0/+1
Summary: These are emitted by the wasm backend for e.g. __stack_pointer@GLOBAL which previously wasn't accepted by the assembler. Reviewers: aheejin, dschuff Subscribers: sbc100, jgravelle-google, llvm-commits, sunfish Differential Revision: https://reviews.llvm.org/D52911 llvm-svn: 343830
2018-08-16[MC] Cleanup noop default case spelling. NFC.Nirav Dave1-1/+1
llvm-svn: 339906
2018-08-16[MC][X86] Enhance X86 Register expression handling to more closely match GCC.Nirav Dave1-1/+15
Allow the comparison of x86 registers in the evaluation of assembler directives. This generalizes and simplifies the extension from r334022 to catch another case found in the Linux kernel. Reviewers: rnk, void Reviewed By: rnk Subscribers: hiraditya, nickdesaulniers, llvm-commits Differential Revision: https://reviews.llvm.org/D50795 llvm-svn: 339895
2018-08-03[WebAssembly] Cleanup of the way globals and global flags are handledNicholas Wilson1-0/+1
Differential Revision: https://reviews.llvm.org/D44030 llvm-svn: 338894
2018-06-15[PowerPC] Add support for high and higha symbol modifiers on tls modifers.Sean Fertile1-0/+8
Enables using the high and high-adjusted symbol modifiers on thread local storage modifers in powerpc assembly. Needed to be able to support 64 bit thread-pointer and dynamic-thread-pointer access sequences. Differential Revision: https://reviews.llvm.org/D47754 llvm-svn: 334856
2018-06-15[PPC64] Support "symbol@high" and "symbol@higha" symbol modifers.Sean Fertile1-0/+4
Add support for the "@high" and "@higha" symbol modifiers in powerpc64 assembly. The modifiers represent accessing the segment consiting of bits 16-31 of a 64-bit address/offset. Differential Revision: https://reviews.llvm.org/D47729 llvm-svn: 334855
2018-06-11AMDGPU: Add 64-bit relative variant kindKonstantin Zhuravlyov1-0/+2
Differential Revision: https://reviews.llvm.org/D47601 llvm-svn: 334443
2018-05-23[RISCV] Add symbol diff relocation support for RISC-VAlex Bradbury1-2/+7
For RISC-V it is desirable to have relaxation happen in the linker once addresses are known, and as such the size between two instructions/byte sequences in a section could change. For most assembler expressions, this is fine, as the absolute address results in the expression being converted to a fixup, and finally relocations. However, for expressions such as .quad .L2-.L1, the assembler folds this down to a constant once fragments are laid out, under the assumption that the difference can no longer change, although in the case of linker relaxation the differences can change at link time, so the constant is incorrect. One place where this commonly appears is in debug information, where the size of a function expression is in a form similar to the above. This patch extends the assembler to allow an AsmBackend to declare that it does not want the assembler to fold down this expression, and instead generate a pair of relocations that allow the linker to carry out the calculation. In this case, the expression is not folded, but when it comes to emitting a fixup, the generic FK_Data_* fixups are converted into a pair, one for the addition half, one for the subtraction, and this is passed to the relocation generating methods as usual. I have named these FK_Data_Add_* and FK_Data_Sub_* to indicate which half these are for. For RISC-V, which supports this via e.g. the R_RISCV_ADD64, R_RISCV_SUB64 pair of relocations, these are also set to always emit relocations relative to local symbols rather than section offsets. This is to deal with the fact that if relocations were calculated on e.g. .text+8 and .text+4, the result 12 would be stored rather than 4 as both addends are added in the linker. Differential Revision: https://reviews.llvm.org/D45181 Patch by Simon Cook. llvm-svn: 333079
2018-05-14Correct compatibility with the GNU Assembler's handling of comparison opsBill Wendling1-2/+20
GAS returns -1 for a comparison operator if the result is true and 0 if false. https://www.sourceware.org/binutils/docs-2.12/as.info/Infix-Ops.html#Infix%20Ops llvm-svn: 332215
2018-05-01Remove \brief commands from doxygen comments.Adrian Prantl1-2/+2
We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272