mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 18:11:19 +00:00
Remove an x86-ism from RegisterInfoInterface
Summary: While adding FPR support to x86 elf core files (D26300), we ended up adding a very x86-specific function to the general RegisterInfoInterface class, which I didn't catch in review. This removes that function. The only reason we needed it was to find the offset of the FXSAVE area. This is the same as the offset of the first register within that area, so we might as well use that. Reviewers: clayborg, dvlahovski Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D27222 llvm-svn: 288236
This commit is contained in:
parent
e6ba5efa80
commit
27469faaa7
@ -111,10 +111,6 @@ RegisterContextLinux_i386::RegisterContextLinux_i386(
|
||||
|
||||
size_t RegisterContextLinux_i386::GetGPRSize() const { return sizeof(GPR); }
|
||||
|
||||
size_t RegisterContextLinux_i386::GetFXSAVEOffset() const {
|
||||
return (LLVM_EXTENSION offsetof(UserArea, i387));
|
||||
}
|
||||
|
||||
const RegisterInfo *RegisterContextLinux_i386::GetRegisterInfo() const {
|
||||
switch (m_target_arch.GetMachine()) {
|
||||
case llvm::Triple::x86:
|
||||
|
@ -18,8 +18,6 @@ public:
|
||||
|
||||
size_t GetGPRSize() const override;
|
||||
|
||||
size_t GetFXSAVEOffset() const override;
|
||||
|
||||
const lldb_private::RegisterInfo *GetRegisterInfo() const override;
|
||||
|
||||
uint32_t GetRegisterCount() const override;
|
||||
|
@ -179,11 +179,6 @@ RegisterContextLinux_x86_64::RegisterContextLinux_x86_64(
|
||||
|
||||
size_t RegisterContextLinux_x86_64::GetGPRSize() const { return sizeof(GPR); }
|
||||
|
||||
size_t RegisterContextLinux_x86_64::GetFXSAVEOffset() const {
|
||||
return (LLVM_EXTENSION offsetof(UserArea, fpr) +
|
||||
LLVM_EXTENSION offsetof(FPR, xstate));
|
||||
}
|
||||
|
||||
const std::vector<lldb_private::RegisterInfo> *
|
||||
RegisterContextLinux_x86_64::GetDynamicRegisterInfoP() const {
|
||||
return &d_register_infos;
|
||||
|
@ -18,8 +18,6 @@ public:
|
||||
|
||||
size_t GetGPRSize() const override;
|
||||
|
||||
size_t GetFXSAVEOffset() const override;
|
||||
|
||||
const lldb_private::RegisterInfo *GetRegisterInfo() const override;
|
||||
|
||||
uint32_t GetRegisterCount() const override;
|
||||
|
@ -420,7 +420,7 @@ size_t RegisterContextPOSIX_x86::GetGPRSize() {
|
||||
}
|
||||
|
||||
size_t RegisterContextPOSIX_x86::GetFXSAVEOffset() {
|
||||
return m_register_info_ap->GetFXSAVEOffset();
|
||||
return GetRegisterInfo()[m_reg_info.first_fpr].byte_offset;
|
||||
}
|
||||
|
||||
const RegisterInfo *RegisterContextPOSIX_x86::GetRegisterInfo() {
|
||||
|
@ -29,8 +29,6 @@ public:
|
||||
|
||||
virtual size_t GetGPRSize() const = 0;
|
||||
|
||||
virtual size_t GetFXSAVEOffset() const { return 0; }
|
||||
|
||||
virtual const lldb_private::RegisterInfo *GetRegisterInfo() const = 0;
|
||||
|
||||
// Returns the number of registers including the user registers and the
|
||||
|
Loading…
Reference in New Issue
Block a user