This is an archive of the discontinued LLVM Phabricator instance.

[MIPS] - Register Context for MIPS64
ClosedPublic

Authored by jaydeep on Mar 9 2015, 6:52 AM.

Details

Summary
  1. Add MIPS variants by parsing e_flags of the ELF
  2. Create RegisterInfoInterface and RegisterContext for MIPS64 and MIPS64EL

Diff Detail

Repository
rL LLVM

Event Timeline

jaydeep updated this revision to Diff 21484.Mar 9 2015, 6:52 AM
jaydeep retitled this revision from to [MIPS] - Register Context for MIPS64.
jaydeep updated this object.
jaydeep edited the test plan for this revision. (Show Details)
jaydeep added a reviewer: clayborg.
jaydeep set the repository for this revision to rL LLVM.
jaydeep added subscribers: Unknown Object (MLST), bhushan, slthakur, mohit.bhakkad.
clayborg requested changes to this revision.Mar 9 2015, 9:32 AM
clayborg edited edge metadata.

Set the generic registers numbers for the function arguments with LLDB_REGNUM_GENERIC_ARG* and you will be good to go.

source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
59–67 ↗(On Diff #21484)

You will want to set the generic registers flavors for LLDB_REGNUM_GENERIC_ARG1 up to LLDB_REGNUM_GENERIC_ARG8 for the argument registers on MIPS. Not sure what they are but I would guess R1 - R4?

This revision now requires changes to proceed.Mar 9 2015, 9:32 AM

The integration into NativeThread and NativeProcess looks good.

source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
100–112 ↗(On Diff #21484)

Please simplify it. I think it should be just a "return k_num_register_sets;"

jaydeep added inline comments.Mar 9 2015, 10:32 PM
source/Plugins/Process/Utility/RegisterContextLinux_mips64.cpp
59–67 ↗(On Diff #21484)

There are up to 8 integer (r4 to r11) and floating-point argument registers (fp12 to fp19) depending on ABI and availability of FPU. First four integer (r4 to r7) argument registers are ABI independent. We will provide generic register numbers for these registers.

jaydeep updated this revision to Diff 21548.Mar 9 2015, 10:35 PM
jaydeep updated this object.
jaydeep edited edge metadata.

Addressed review comments

clayborg accepted this revision.Mar 10 2015, 11:37 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Mar 10 2015, 11:37 AM
This revision was automatically updated to reflect the committed changes.