| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Convert a for loop to range bsaed form. NFC.
llvm-svn: 212684
|
| |
|
|
|
|
|
|
|
|
| |
This adds a utility method to access the WinCFI information in bulk and uses
that to iterate rather than requesting the count and individually iterating
them. This is in preparation for restructuring WinCFI handling to enable more
clear sharing across architectures to enable unwind information emission for
Windows on ARM.
llvm-svn: 212683
|
| |
|
|
|
|
| |
all new modules. The section contains a versioned data structure which represents essentially information to allow a program loader to determine the requirements of the application. This patch implements mips.abiflags section and provides test cases for it.
llvm-svn: 212519
|
| |
|
|
| |
llvm-svn: 212401
|
| |
|
|
|
|
|
|
|
|
| |
Use 0 for the invalid buffer instead of -1/~0 and switch to unsigned
representation to enable more idiomatic usage.
Also introduce a trivial SourceMgr::getMainFileID() instead of hard-coding 0/1
to identify the main file.
llvm-svn: 212398
|
| |
|
|
|
|
|
| |
This just lets us dump a const MCSymbolData object, no functionality
changed.
llvm-svn: 212365
|
| |
|
|
|
|
|
| |
No functionality changed, just make it so that the code _could_ be
uncommented.
llvm-svn: 212363
|
| |
|
|
|
|
| |
Switch a normal for-loop to a range-based for. No functionality changed.
llvm-svn: 212362
|
| |
|
|
|
|
|
|
|
| |
Now that we have a lib/MC/MCAnalysis, the dependency was there just because
of two helper classes. Move the two over to MC.
This will allow IRObjectFile to parse inline assembly.
llvm-svn: 212248
|
| |
|
|
| |
llvm-svn: 212210
|
| |
|
|
|
|
|
| |
The new library is 150KB on a Release+Asserts build, so it is quiet a bit of
code that regular users of MC don't need to link with now.
llvm-svn: 212209
|
| |
|
|
|
|
|
|
| |
This is a small targeted fix for pr20119. The code needs quiet a bit of
refactoring and I added some FIXMEs about it, but I want to get the testcase
passing first.
llvm-svn: 212101
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
seh_stackalloc 0 is not representable in Win64 SEH info, so emitting it
is a bug.
Reviewers: rnk
Differential Revision: http://reviews.llvm.org/D4334
Patch by Vadim Chugunov!
llvm-svn: 212081
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the routines to reflect the reality that they are more related to call
frame information than to Win64 EH. Although EH is implemented in an intertwined
manner by augmenting with an exception handler and an associated parameter, the
majority of these routines emit information required to unwind the frames. This
also helps identify that these routines are generic for most windows platforms
(they apply equally to nearly all architectures except x86) although the
encoding of the information is architecture dependent.
Unwinding data is emitted via EmitWinCFI* and exception handling information via
EmitWinEH*.
llvm-svn: 211994
|
| |
|
|
|
|
|
|
|
| |
COFF sections in MC were represented by a tuple of section-name and
COMDAT-name. This is not sufficient to represent a .text section
associated with another .text section; we need a way to distinguish
between the key section and the one marked associative.
llvm-svn: 211913
|
| |
|
|
|
|
| |
Temporarily back out commits r211749, r211752 and r211754.
llvm-svn: 211814
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string_ostream is a safe and efficient string builder that combines opaque
stack storage with a built-in ostream interface.
small_string_ostream<bytes> additionally permits an explicit stack storage size
other than the default 128 bytes to be provided. Beyond that, storage is
transferred to the heap.
This convenient class can be used in most places an
std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair
would previously have been used, in order to guarantee consistent access
without byte truncation.
The patch also converts much of LLVM to use the new facility. These changes
include several probable bug fixes for truncated output, a programming error
that's no longer possible with the new interface.
llvm-svn: 211749
|
| |
|
|
|
|
| |
This completes the refactoring of RecordStreamer.
llvm-svn: 211727
|
| |
|
|
|
|
| |
Remove the duplicate from MCRecordStreamer. No functionality change.
llvm-svn: 211714
|
| |
|
|
| |
llvm-svn: 211707
|
| |
|
|
| |
llvm-svn: 211701
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ignore SEH pseudo ops in X86 JIT emitter.
--
This patch enables LLVM to emit Win64-native unwind info rather than
DWARF CFI. It handles all corner cases (I hope), including stack
realignment.
Because the unwind info is not flexible enough to describe stack frames
with a gap of unknown size in the middle, such as the one caused by
stack realignment, I modified register spilling code to place all spills
into the fixed frame slots, so that they can be accessed relative to the
frame pointer.
Patch by Vadim Chugunov!
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D4081
llvm-svn: 211691
|
| |
|
|
| |
llvm-svn: 211668
|
| |
|
|
|
|
|
| |
The method was empty in the null streamer but I mistakenly replaced it with
the aborting one in MCStreamer.
llvm-svn: 211666
|
| |
|
|
|
|
|
|
|
|
|
| |
unreachable in MCStreamer.cpp.
void EmitCOFFSecRel32(MCSymbol const *Symbol) override {}
void EmitGPRel32Value(const MCExpr *Value) override {}
It should fix crash like "llc -mtriple=i686-cygwin -filetype=null".
llvm-svn: 211664
|
| |
|
|
|
|
| |
This saves some duplicated boilerplate in RecordStreamer and NullStreamer.
llvm-svn: 211653
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 211651
|
| |
|
|
|
|
|
| |
All the "real" streamers were already calling to MCStreamer::EmitLabel
to do part of the work.
llvm-svn: 211646
|
| |
|
|
|
|
|
|
|
|
|
| |
In assembly the expression a=b is parsed as an assignment, so it should be
printed as one.
This remove a truly horrible hack for producing a label with "a=.". It would
be used by codegen but would never be reached by the asm parser. Sorry I
missed this when it was first committed.
llvm-svn: 211639
|
| |
|
|
|
|
| |
This is possible now that we don't produce .eh symbols. This fixes pr19430.
llvm-svn: 211502
|
| |
|
|
|
|
|
|
|
|
| |
According Nick Kledzik (http://llvm.org/bugs/show_bug.cgi?id=19430#c2):
"... mach-o no longer needs names in the __eh_frame section (and has not for
years)."
Iain Sandoe confirms it is also unnecessary for their old darwin support.
llvm-svn: 211500
|
| |
|
|
|
|
|
|
|
| |
Utilize range based for-loops to simplify some code.
Use insert() instead of a loop for simplicity/efficiency.
No functionality change.
llvm-svn: 211486
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`. Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.
When we encounter a .section directive, a new section is constructed. This may
be a text segment. In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.
Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill. Simply depend on the target
triple. Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed. If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.
llvm-svn: 211481
|
| |
|
|
|
|
| |
It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.
llvm-svn: 211480
|
| |
|
|
|
|
|
|
|
|
|
|
| |
User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;
This patch converts an assertion to error report for better user
experience.
Differential Revision: http://reviews.llvm.org/D4199
llvm-svn: 211455
|
| |
|
|
|
|
| |
Fixes pr19185.
llvm-svn: 211423
|
| |
|
|
|
|
| |
Another step in fixing pr19185.
llvm-svn: 211416
|
| |
|
|
|
|
| |
No functionality change.
llvm-svn: 211415
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables LLVM to emit Win64-native unwind info rather than
DWARF CFI. It handles all corner cases (I hope), including stack
realignment.
Because the unwind info is not flexible enough to describe stack frames
with a gap of unknown size in the middle, such as the one caused by
stack realignment, I modified register spilling code to place all spills
into the fixed frame slots, so that they can be accessed relative to the
frame pointer.
Patch by Vadim Chugunov!
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D4081
llvm-svn: 211399
|
| |
|
|
| |
llvm-svn: 211307
|
| |
|
|
|
|
|
|
|
|
| |
Use the MCStreamer base implementations for file ID tracking instead of
overriding them as no-ops.
Avoids assertions when streaming Dwarf debug info, and fixes ASM parsing of loc
and file directives.
llvm-svn: 211282
|
| |
|
|
|
|
|
|
| |
Currently, when using llvm as an assembler, DWARF debug information is only
generated for the .text section. This patch modifies this so that DWARF info
is emitted for all executable sections.
llvm-svn: 211273
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, llvm always emits a DWARF CIE with a version of 1, even when emitting
DWARF 3 or 4, which both support CIE version 3. This patch makes it emit the
newer CIE version when we are emitting DWARF 3 or 4. This will not reduce
compatibility, as we already emit other DWARF3/4 features, and is worth doing as
the DWARF3 spec removed some ambiguities in the interpretation of call frame
information.
It also fixes a minor bug where the "return address" field of the CIE was
encoded as a ULEB128, which is only valid when the CIE version is 3. There are
no test changes for this, because (as far as I can tell) none of the platforms
that we test have a return address register with a DWARF register number >127.
llvm-svn: 211272
|
| |
|
|
|
|
|
| |
used by all of the MC level tools and codegen. Fix up all uses
in the compiler to use this and set it on the context accordingly.
llvm-svn: 211257
|
| |
|
|
|
|
| |
the assert.
llvm-svn: 211254
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We would get confused by '@' characters in symbol names, we would
mistake the text following them for the variant kind.
When an identifier a string, the variant kind will never show up inside
of it. Instead, check to see if there is a variant following the
string.
This fixes PR19965.
llvm-svn: 211249
|
| |
|
|
|
|
|
|
| |
Fixes macros with varargs if the macro instantiation has a trailing comment.
Patch by Janne Grunau!
llvm-svn: 211219
|
| |
|
|
|
|
| |
Patch by Janne Grunau!
llvm-svn: 211218
|
| |
|
|
|
|
|
|
|
|
|
| |
ARMTargetStreamer implements ConstantPool and AssmeblerConstantPools
to keep track of assembler-generated constant pools that are used for
ldr-pseudo.
When implementing ldr-pseudo for AArch64, these two classes can be reused.
So this patch factors them out from ARM target to the general MC lib.
llvm-svn: 211198
|
| |
|
|
|
|
| |
value in place
llvm-svn: 210978
|