[Lldb-commits] [PATCH] D140615: [LLDB][LoongArch] Delete the s9 register alias definition

2023-01-12 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D140615#4047171 , @lh03061238 wrote: > In D140615#4047069 , @xen0n wrote: > >> BTW do we have a way of fixing the bug while preserving the alias? > > The register information

[Lldb-commits] [PATCH] D140615: [LLDB][LoongArch] Delete the s9 register alias definition

2023-01-12 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D140615#4047069 , @xen0n wrote: > BTW do we have a way of fixing the bug while preserving the alias? The register information defined in registerinfos_longarch64.h contains only one alias. So far, no other way has been

[Lldb-commits] [PATCH] D140615: [LLDB][LoongArch] Delete the s9 register alias definition

2023-01-12 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D140615#4047069 , @xen0n wrote: > BTW do we have a way of fixing the bug while preserving the alias? The register iscurrently corresponds to only an alias in RegisterInfos_loongarch64.h. So far, no other way has been

[Lldb-commits] [PATCH] D141245: [LLDB][LoongArch] ObjectFile: add a case for `EM_LOONGARCH`

2023-01-08 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, seehearfeel, DavidSpickett. Herald added a subscriber: emaste. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a

[Lldb-commits] [PATCH] D140759: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2023-01-02 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 485900. lh03061238 added a comment. Modified the EncodeBCZcondType function CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140759/new/ https://reviews.llvm.org/D140759 Files:

[Lldb-commits] [PATCH] D140759: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2023-01-02 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp:154 + opcode = opcode >> 2; + return opcode << 26 | offs15_0 << 10 | bcxxz << 8 | cj << 5 | offs20_16; +} SixWeining wrote: > Seems you can use `opcode

[Lldb-commits] [PATCH] D140759: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2022-12-30 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 485680. lh03061238 added a comment. 1、Modify BCEQZ/BCNEZ instruction opcode and mask 2、Separate BCEQZ and BCNEZ 3、Use "Bits32(inst, 7, 5) + fpr_fcc0_loongarch" to calculate cj CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140759/new/

[Lldb-commits] [PATCH] D140759: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2022-12-30 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp:42 "bnez rj, offs21"}, + {0xfc00, 0x4800, ::EmulateBCXXZ, + "bceqz/bcnez cj, offs21"}, SixWeining wrote: > It

[Lldb-commits] [PATCH] D140759: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2022-12-29 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, seehearfeel, DavidSpickett. Herald added a subscriber: StephenFan. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a

[Lldb-commits] [PATCH] D140386: [LLDB][LoongArch] Add unittests for EmulateInstructionLoongArch

2022-12-29 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/unittests/Instruction/LoongArch/TestLoongArchEmulator.cpp:1-2 +//===-- TestLoongArchEmulator.cpp +//-===// +// SixWeining wrote: > Merge these lines into one. It has

[Lldb-commits] [PATCH] D140386: [LLDB][LoongArch] Add unittests for EmulateInstructionLoongArch

2022-12-29 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 485586. lh03061238 added a comment. Modify the first two lines in TestLoongArchEmulator.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140386/new/ https://reviews.llvm.org/D140386 Files:

[Lldb-commits] [PATCH] D140386: [LLDB][LoongArch] Add unittests for EmulateInstructionLoongArch

2022-12-28 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 485565. lh03061238 retitled this revision from "[LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch" to "[LLDB][LoongArch] Add unittests for EmulateInstructionLoongArch". lh03061238 edited the summary of this revision. lh03061238

[Lldb-commits] [PATCH] D140386: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2022-12-28 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D140386#4007705 , @DavidSpickett wrote: > Please split this patch into 2: > > - the cleanup of the existing branch instructions > - the addition of the new ones > > The changes look good but let's keep each commit to doing

[Lldb-commits] [PATCH] D140616: [LLDB][LoongArch] Optimize EmulateInstructionLoongArch related code

2022-12-23 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 485178. lh03061238 added a comment. Change (IsLoongArch64()) to IsLoongArch64() in some functions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140616/new/ https://reviews.llvm.org/D140616 Files:

[Lldb-commits] [PATCH] D140616: [LLDB][LoongArch] Optimize EmulateInstructionLoongArch related code

2022-12-23 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp:202 bool EmulateInstructionLoongArch::EmulateBEQZ(uint32_t inst) { - if (IsLoongArch64()) -return EmulateBEQZ64(inst); - else -return false; +

[Lldb-commits] [PATCH] D140616: [LLDB][LoongArch] Optimize EmulateInstructionLoongArch related code

2022-12-23 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, seehearfeel, DavidSpickett. Herald added a subscriber: StephenFan. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a

[Lldb-commits] [PATCH] D140615: [LLDB][LoongArch] Delete the s9 register alias definition

2022-12-23 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, seehearfeel, DavidSpickett. Herald added subscribers: jeroen.dobbelaere, StephenFan. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project:

[Lldb-commits] [PATCH] D140386: [LLDB][LoongArch] Add FP branch instructions for EmulateInstructionLoongArch

2022-12-20 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, DavidSpickett, seehearfeel. Herald added a subscriber: StephenFan. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a

[Lldb-commits] [PATCH] D139833: [LLDB][LoongArch] Add branch instructions for EmulateInstructionLoongArch

2022-12-15 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D139833#3997386 , @DavidSpickett wrote: > Is the further work in the commit message work you intended to include in > this patch? I appreciate the status update might be useful for some but > commit messages are for

[Lldb-commits] [PATCH] D139833: [LLDB][LoongArch] Add branch instructions for EmulateInstructionLoongArch

2022-12-14 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 482790. lh03061238 edited the summary of this revision. lh03061238 added a comment. (1) distinguish between LoongArch64 and LoongArch32 operations in EmulateInstructionLoongArch (2) check the return values of some functions CHANGES SINCE LAST ACTION

[Lldb-commits] [PATCH] D139833: [LLDB][LoongArch] Add branch instructions for EmulateInstructionLoongArch

2022-12-14 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.cpp:205 +bool EmulateInstructionLoongArch::EmulateBEQZ(uint32_t inst) { + uint64_t next_pc, imm_sign_extend; + bool success = false; SixWeining

[Lldb-commits] [PATCH] D139833: [LLDB][LoongArch] Add branch instructions for EmulateInstructionLoongArch

2022-12-14 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D139833#3990635 , @SixWeining wrote: > 1. Does the directory `lldb/source/Plugins/Instruction/LoongArch/` target > both `LoongArch64` and `LoongArch32`? Yes, both LoongArch64 and LoongArch32 are supported in

[Lldb-commits] [PATCH] D139833: [LLDB][LoongArch] Add branch instructions for EmulateInstructionLoongArch

2022-12-12 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, DavidSpickett, seehearfeel. Herald added a subscriber: StephenFan. Herald added a project: All. lh03061238 requested review of this revision. Herald added a project: LLDB. Herald added a

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-06 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added inline comments. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h:58 + uint32_t reg_num) override; + lldb::addr_t ReadPC(bool *success); + bool WritePC(lldb::addr_t pc);

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-06 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D139158#3974801 , @DavidSpickett wrote: > Looks mechanically fine. These classes are all a bit of a copy paste job > right now, so if you were going to take inspiration riscv is your best bet. > > On the subject of coding

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-05 Thread Hui Li via Phabricator via lldb-commits
lh03061238 updated this revision to Diff 480297. lh03061238 edited the summary of this revision. lh03061238 added a comment. (1) Use sort alphabetically in the following file lldb/source/Plugins/Instruction/CMakeLists.txt lldb/source/Plugins/Instruction/LoongArch/CMakeLists.txt

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-05 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. Comment at: lldb/source/Plugins/Instruction/LoongArch/EmulateInstructionLoongArch.h:66 + uint32_t reg_num) override; + lldb::addr_t ReadPC(bool *success); + bool WritePC(lldb::addr_t pc);

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-02 Thread Hui Li via Phabricator via lldb-commits
lh03061238 added a comment. In D139158#3965478 , @jingham wrote: > Note that the two most common uses of single step in lldb are 1) stepping > over the instruction under a breakpoint (which may be a branch) and 2) > stepping to the next instruction

[Lldb-commits] [PATCH] D139158: [LLDB][LoongArch] Make software single stepping work

2022-12-01 Thread Hui Li via Phabricator via lldb-commits
lh03061238 created this revision. lh03061238 added reviewers: SixWeining, wangleiat, xen0n, xry111, MaskRay, DavidSpickett. Herald added subscribers: StephenFan, s.egerton, simoncook. Herald added a project: All. lh03061238 requested review of this revision. Herald added subscribers: