summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] Initial version of PPC64 InstEmulationPavel Labath2018-02-271-672/+0
| | | | | | | | | | | | | | | Summary: Supports common prologue/epilogue instructions. Reviewers: clayborg, labath Reviewed By: clayborg, labath Subscribers: davide, anajuliapc, alexandreyy, lbianc, nemanjai, mgorny, kbarton Differential Revision: https://reviews.llvm.org/D43345 Author: Leandro Lupori <leandro.lupori@gmail.com> llvm-svn: 326224
* Fix memory leaks in TestArm64InstEmulationRaphael Isemann2018-01-221-10/+10
| | | | | | | | | | | | | | Summary: We never delete the created instances, so those test fail with the memory sanitizer. Reviewers: jasonmolenda Reviewed By: jasonmolenda Subscribers: aemerson, javed.absar, kristof.beyls, lldb-commits Differential Revision: https://reviews.llvm.org/D42336 llvm-svn: 323076
* Move ArchSpec to the Utility modulePavel Labath2017-11-131-1/+1
| | | | | | | | | | | | | The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module. This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h. llvm-svn: 318048
* Invert ArchSpec<->Platform dependencyPavel Labath2017-10-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: ArchSpec::SetTriple was taking a Platform as an argument, and used it to fill in missing pieces of the specified triple. I invert the dependency by moving this code to other classes. For this purpose, I've created three new functions. - HostInfo::GetAugmentedArchSpec: fills in the triple using the host platform (this used to be implemented by passing a null platform pointer). By putting this code in the Host module, we can provide a way to anyone who does not have a platform instance (lldb-server) an easy way to get Host data. - Platform::GetAugmentedArchSpec: if you have a platform instance, you can call this to let it fill in the triple. - static Platform::GetAugmentedArchSpec: implements the "if platform == 0 then use_host() else use_platform()" part. Reviewers: zturner, jingham, clayborg Subscribers: mgorny, javed.absar, lldb-commits Differential Revision: https://reviews.llvm.org/D39387 llvm-svn: 316987
* Fix a bug where the EmulateInstructionARM64 handling of STP/LDP instructionsJason Molenda2016-11-011-53/+215
| | | | | | | | | | | | | | | for floating point registers was not recording them correctly. I needed to change the EmulateInstructionARM64 unwind plans from using the DWARF register numbering scheme to using the LLDB register numbering scheme (because dwarf doesn't define register numbers for the 64-bit "d" registers). Updated the EmulateInstructionARM64 unit tests to work with the LLDB register numbering scheme and added a unit test to check the floating point register spills & restores are correctly recorded. https://reviews.llvm.org/D25864 <rdar://problem/28745483> llvm-svn: 285662
* unittests: Specify types in a bunch of unittest EXPECT'sJustin Bogner2016-10-171-17/+17
| | | | | | | The EXPECT and ASSERT macros in gtest don't do the usual arithmetic conversions. Specify types in several of them to fix -Werror. llvm-svn: 284405
* Add an arm64 unit test where the function saves x20 in theJason Molenda2016-10-121-1/+101
| | | | | | | | | prologue, then loads & stores x20 on the stack from a different location in the middle of the function, and then restores the reg in the epilogue. The saving/restoring of x20 in the middle of the function should be ignored. llvm-svn: 283969
* Add a simple frameless function test case to the arm64 unwind unit testsJason Molenda2016-10-121-2/+99
| | | | | | with return statements in the body of the function. llvm-svn: 283966
* Fix Arm64InstEmulation tests for windowsPavel Labath2016-10-111-15/+4
| | | | | | | | MSVC does not like the declaration of a terminate() function (I guess it looks too much like std::terminate()). While I'm there, move the setup/teardown code into the functions gtest provides for that purpose. llvm-svn: 283870
* Add a second, more complicated, arm64 example program toJason Molenda2016-10-111-11/+169
| | | | | | the arm64 assembly unwind tests. llvm-svn: 283849
* Add a first unit test for the arm64 instruction profiled unwindJason Molenda2016-10-111-0/+166
plan generator. Fix a small bug in EmulateInstructionARM64::GetFramePointerRegister which was returning the stack pointer reg instead of fp, prevented the unwinder from recognizing the switch to using the fp in a function. (<rdar://problem/28663117>) Add a new eContextRestoreStackPointer context hint so that the arm64 emulator can flag when the frame pointer value is copied back in to the stack pointer and that should be used to compute the canonical frame address again in an epilogue sequence. (<rdar://problem/28704862>) Small changes to UnwindAssemblyInstEmulation to have a method we can call without a live process/thread/etc for unit tests. <rdar://problem/28663117> <rdar://problem/28704862> <rdar://problem/28509178> llvm-svn: 283847
OpenPOWER on IntegriCloud