summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/Utility/ARMUtils.h
AgeCommit message (Collapse)Author
2023-02-20[lldb] Use llvm::rotr (NFC)Kazu Hirata
2022-08-05 [LLDB] Missing break in a switch statement alters the execution flow.Slava Gurevich
Looks like a typo from the past code changes. Differential Revision: https://reviews.llvm.org/D131244
2020-02-17[lldb] Update header guards to be consistent and compliant with LLVM (NFC)Jonas Devlieghere
LLDB has a few different styles of header guards and they're not very consistent because things get moved around or copy/pasted. This patch unifies the header guards across LLDB and converts everything to match LLVM's style. Differential revision: https://reviews.llvm.org/D74743
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
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-11Remove comments after header includes.Jonas Devlieghere
This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone
*** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
2014-07-08Fix typos.Bruce Mitchener
llvm-svn: 212553
2012-07-17Ran the static analyzer on the codebase and found a few things.Greg Clayton
llvm-svn: 160338
2011-06-02When emulating an ill-formed instruction, we should bail out instead of ↵Johnny Chen
asserting and bringing down the whole process. llvm-svn: 132506
2011-06-02Remove asserts that will crash LLDB. These should be changed to returnGreg Clayton
true/false in an extra boolean parameter and not cause the the binary that us using the LLDB framework to crash. llvm-svn: 132501
2011-05-09While implementing unwind information using UnwindAssemblyInstEmulation I ranGreg Clayton
into some cleanup I have been wanting to do when reading/writing registers. Previously all RegisterContext subclasses would need to implement: virtual bool ReadRegisterBytes (uint32_t reg, DataExtractor &data); virtual bool WriteRegisterBytes (uint32_t reg, DataExtractor &data, uint32_t data_offset = 0); There is now a new class specifically designed to hold register values: lldb_private::RegisterValue The new register context calls that subclasses must implement are: virtual bool ReadRegister (const RegisterInfo *reg_info, RegisterValue &reg_value) = 0; virtual bool WriteRegister (const RegisterInfo *reg_info, const RegisterValue &reg_value) = 0; The RegisterValue class must be big enough to handle any register value. The class contains an enumeration for the value type, and then a union for the data value. Any integer/float values are stored directly in an appropriate host integer/float. Anything bigger is stored in a byte buffer that has a length and byte order. The RegisterValue class also knows how to copy register value bytes into in a buffer with a specified byte order which can be used to write the register value down into memory, and this does the right thing when not all bytes from the register values are needed (getting a uint8 from a uint32 register value..). All RegiterContext and other sources have been switched over to using the new regiter value class. llvm-svn: 131096
2011-03-24Fix small bug in ThumbExpandImm_C; arguments to a call to 'bits' wereCaroline Tice
in the wrong order. llvm-svn: 128237
2011-02-23Add emulation for "ADR" operations. Add a ThumbImm8Scaled() convenience ↵Johnny Chen
function and rename the original ThumbImmScaled() function to ThumbImm7Scaled(). llvm-svn: 126335
2011-02-22Add two convenience functions: DecodeImmShiftThumb() and DecodeImmShiftARM() ↵Johnny Chen
to ARMUtils.h. Use them within EmulateInstructionARM.cpp to save repetitive typing. llvm-svn: 126247
2011-02-17Move Align(val, alignment) utility function to ARMUtils.h.Johnny Chen
llvm-svn: 125753
2011-02-16Add emulation methods for ROR (immediate), ROR (register), and RRX.Johnny Chen
Turns out that they can be funneled through the helper methods EmulateShiftImm()/ EmulateShiftReg() as well. Modify EmulateShiftImm() to handle SRType_ROR and SRType_RRX. And fix a typo in the impl of utility Shift_C() in ARMUtils.h. llvm-svn: 125689
2011-02-16Add emulation methods for LSL (immediate), LSL (register), LSR (immediate), ↵Johnny Chen
and LSR (register). Create two helper methods EmulateShiftImm() and EmulateShiftReg() and have ASR, LSL, and LSR delegate to the helper methods which take an extra ARM_ShifterType parameter. The opcodes tables have not been updated yet to reflect these new entries. llvm-svn: 125633
2011-02-15Modify the various shift routines to handle cases where the shift amount comesJohnny Chen
from the bottom byte of a register. llvm-svn: 125606
2011-02-15A8.6.14 ASR (immediate)Johnny Chen
Add EmulateASRImm() Encodings T1, T2, and A1 to the opcodes tables. llvm-svn: 125592
2011-02-15Add a bunch of utilities and an enum (ARM_ShifterType) for shift and rotate ↵Johnny Chen
operations pertaining to: o A2.2.1 Pseudocode details of shift and rotate operations o A8.4.3 Pseudocode details of instruction-specified shifts and rotates llvm-svn: 125575
2011-02-14Add comment.Johnny Chen
llvm-svn: 125509
2011-02-14Enhanced the existing ARMExpandImm() and ThumbExpandImm() functions which expandJohnny Chen
an imm12 into imm32 for ARM or Thumb so that they now handle carry_in/carry_out. Funnel ARMExpandImm()/ThumbExpandImm() to the enhanced ARMExpandImm_C()/ThumbExpandImm_C() functions. llvm-svn: 125508
2011-01-26Move #define's out of ARMUtils.h and into a newly created file ARMDefines.h.Johnny Chen
llvm-svn: 124261
2011-01-26Move the generic instruction bits manipulation routines into a newly created ↵Johnny Chen
file named InstructionUtils.h and modify some existing code to use them. llvm-svn: 124259
2011-01-26Add Encoding T1 entry of emulate_sub_sp_imm to the g_thumb_opcodes table.Johnny Chen
Update emulate_sub_sp_imm to handle Encoding T1. llvm-svn: 124253
2011-01-25Add Encoding T2 & T3 entries of emulate_sub_sp_imm to the g_thumb_opcodes table.Johnny Chen
Update emulate_sub_sp_imm to handle Encoding T2 & T3. llvm-svn: 124248
2011-01-25Add an entry to the g_arm_opcodes table named emulate_sub_sp_imm which ↵Johnny Chen
corresponds to an operation to adjust the stack pointer (allocate space for local storage). llvm-svn: 124237
2011-01-24Move some #define's to the ARMUtils.h header file.Johnny Chen
llvm-svn: 124141
2011-01-24Add Encoding T2 & T3 of the PUSH instructions to the g_arm_opcodes table.Johnny Chen
Plus add an extra field ARMInstrSize to the table entry type 'ARMOpcode'. llvm-svn: 124140
2011-01-24Add an ARMUtils.h file to house utility functions for the ARM/Thumb ↵Johnny Chen
Instruction Set Architecture. llvm-svn: 124131