Skip to content

[lldb] Remove mips64 support for FreeBSD#179582

Merged
DavidSpickett merged 4 commits intollvm:mainfrom
mchoo7:mips64
Feb 5, 2026
Merged

[lldb] Remove mips64 support for FreeBSD#179582
DavidSpickett merged 4 commits intollvm:mainfrom
mchoo7:mips64

Conversation

@mchoo7
Copy link
Copy Markdown
Contributor

@mchoo7 mchoo7 commented Feb 4, 2026

The last FreeBSD version supporting mips64 is FreeBSD 13 which will be EOLed on April 30th. LLVM 23.1.0 release is expected to be August 25th according to the LLVM calendar. The usage of mips64 is less noticeable so it's hard to know if it is properly working, and even if it works, it is hard to test new features on FreeBSD mips64.

Thus, remove support for mips64 on FreeBSD.

@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Feb 4, 2026

@llvm/pr-subscribers-lldb

@llvm/pr-subscribers-backend-mips

Author: Minsoo Choo (mchoo7)

Changes

The last FreeBSD version supporting mips64 is FreeBSD 13 which will be EOLed on April 30th. LLVM 23.1.0 release is expected to be August 25th according to the LLVM calendar. The usage of mips64 is less noticeable so it's hard to know if it is properly working, and even if it works, it is hard to test new features on FreeBSD mips64.

Thus, remove support for mips64 on FreeBSD.


Patch is 23.58 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/179582.diff

11 Files Affected:

  • (modified) lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt (-1)
  • (modified) lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp (-4)
  • (modified) lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h (-2)
  • (removed) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp (-240)
  • (removed) lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h (-75)
  • (modified) lldb/source/Plugins/Process/Utility/CMakeLists.txt (-1)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp (-179)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h (-30)
  • (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp (-13)
  • (modified) lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h (-4)
  • (modified) lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp (-4)
diff --git a/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt b/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt
index 4c11d21b3e5ae..8574df58b4ada 100644
--- a/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/FreeBSD/CMakeLists.txt
@@ -3,7 +3,6 @@ add_lldb_library(lldbPluginProcessFreeBSD
   NativeRegisterContextFreeBSD.cpp
   NativeRegisterContextFreeBSD_arm.cpp
   NativeRegisterContextFreeBSD_arm64.cpp
-  NativeRegisterContextFreeBSD_mips64.cpp
   NativeRegisterContextFreeBSD_powerpc.cpp
   NativeRegisterContextFreeBSD_x86_64.cpp
   NativeThreadFreeBSD.cpp
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
index c434a3a91ffe3..7dd3d807d2096 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
@@ -996,10 +996,6 @@ Status NativeProcessFreeBSD::ReinitializeThreads() {
   return error;
 }
 
-bool NativeProcessFreeBSD::SupportHardwareSingleStepping() const {
-  return !m_arch.IsMIPS();
-}
-
 void NativeProcessFreeBSD::MonitorClone(::pid_t child_pid, bool is_vfork,
                                         NativeThreadFreeBSD &parent_thread) {
   Log *log = GetLog(POSIXLog::Process);
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
index a6ecc5ce3ca16..fb7372817265d 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
@@ -90,8 +90,6 @@ class NativeProcessFreeBSD : public NativeProcessELF,
   static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr,
                               int data = 0, int *result = nullptr);
 
-  bool SupportHardwareSingleStepping() const;
-
   llvm::Expected<std::string> SaveCore(llvm::StringRef path_hint) override;
 
 protected:
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
deleted file mode 100644
index 2e0f5b707884f..0000000000000
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.cpp
+++ /dev/null
@@ -1,240 +0,0 @@
-//===-- NativeRegisterContextFreeBSD_mips64.cpp ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#if defined(__mips64__)
-
-#include "NativeRegisterContextFreeBSD_mips64.h"
-
-#include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Status.h"
-
-#include "Plugins/Process/FreeBSD/NativeProcessFreeBSD.h"
-#include "Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h"
-
-// clang-format off
-#include <sys/param.h>
-#include <sys/ptrace.h>
-#include <sys/types.h>
-// clang-format on
-#include <optional>
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace lldb_private::process_freebsd;
-
-NativeRegisterContextFreeBSD *
-NativeRegisterContextFreeBSD::CreateHostNativeRegisterContextFreeBSD(
-    const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread) {
-  return new NativeRegisterContextFreeBSD_mips64(target_arch, native_thread);
-}
-
-NativeRegisterContextFreeBSD_mips64::NativeRegisterContextFreeBSD_mips64(
-    const ArchSpec &target_arch, NativeThreadFreeBSD &native_thread)
-    : NativeRegisterContextRegisterInfo(
-          native_thread, new RegisterContextFreeBSD_mips64(target_arch)) {}
-
-RegisterContextFreeBSD_mips64 &
-NativeRegisterContextFreeBSD_mips64::GetRegisterInfo() const {
-  return static_cast<RegisterContextFreeBSD_mips64 &>(
-      *m_register_info_interface_up);
-}
-
-uint32_t NativeRegisterContextFreeBSD_mips64::GetRegisterSetCount() const {
-  return GetRegisterInfo().GetRegisterSetCount();
-}
-
-const RegisterSet *
-NativeRegisterContextFreeBSD_mips64::GetRegisterSet(uint32_t set_index) const {
-  return GetRegisterInfo().GetRegisterSet(set_index);
-}
-
-uint32_t NativeRegisterContextFreeBSD_mips64::GetUserRegisterCount() const {
-  uint32_t count = 0;
-  for (uint32_t set_index = 0; set_index < GetRegisterSetCount(); ++set_index)
-    count += GetRegisterSet(set_index)->num_registers;
-  return count;
-}
-
-std::optional<NativeRegisterContextFreeBSD_mips64::RegSetKind>
-NativeRegisterContextFreeBSD_mips64::GetSetForNativeRegNum(
-    uint32_t reg_num) const {
-  switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
-  case llvm::Triple::mips64:
-    if (reg_num >= k_first_gpr_mips64 && reg_num <= k_last_gpr_mips64)
-      return GPRegSet;
-    if (reg_num >= k_first_fpr_mips64 && reg_num <= k_last_fpr_mips64)
-      return FPRegSet;
-    break;
-  default:
-    llvm_unreachable("Unhandled target architecture.");
-  }
-
-  llvm_unreachable("Register does not belong to any register set");
-}
-
-Status NativeRegisterContextFreeBSD_mips64::ReadRegisterSet(RegSetKind set) {
-  switch (set) {
-  case GPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(PT_GETREGS, m_thread.GetID(),
-                                               m_reg_data.data());
-  case FPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(
-        PT_GETFPREGS, m_thread.GetID(),
-        m_reg_data.data() + GetRegisterInfo().GetGPRSize());
-  }
-  llvm_unreachable("NativeRegisterContextFreeBSD_mips64::ReadRegisterSet");
-}
-
-Status NativeRegisterContextFreeBSD_mips64::WriteRegisterSet(RegSetKind set) {
-  switch (set) {
-  case GPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(PT_SETREGS, m_thread.GetID(),
-                                               m_reg_data.data());
-  case FPRegSet:
-    return NativeProcessFreeBSD::PtraceWrapper(
-        PT_SETFPREGS, m_thread.GetID(),
-        m_reg_data.data() + GetRegisterInfo().GetGPRSize());
-  }
-  llvm_unreachable("NativeRegisterContextFreeBSD_mips64::WriteRegisterSet");
-}
-
-Status
-NativeRegisterContextFreeBSD_mips64::ReadRegister(const RegisterInfo *reg_info,
-                                                  RegisterValue &reg_value) {
-  Status error;
-
-  if (!reg_info) {
-    error = Status::FromErrorString("reg_info NULL");
-    return error;
-  }
-
-  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
-
-  if (reg == LLDB_INVALID_REGNUM)
-    return Status("no lldb regnum for %s", reg_info && reg_info->name
-                                               ? reg_info->name
-                                               : "<unknown register>");
-
-  std::optional<RegSetKind> opt_set = GetSetForNativeRegNum(reg);
-  if (!opt_set) {
-    // This is likely an internal register for lldb use only and should not be
-    // directly queried.
-    error = Status::FromErrorStringWithFormat(
-        "register \"%s\" is in unrecognized set", reg_info->name);
-    return error;
-  }
-
-  RegSetKind set = *opt_set;
-  error = ReadRegisterSet(set);
-  if (error.Fail())
-    return error;
-
-  assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size());
-  reg_value.SetBytes(m_reg_data.data() + reg_info->byte_offset,
-                     reg_info->byte_size, endian::InlHostByteOrder());
-  return error;
-}
-
-Status NativeRegisterContextFreeBSD_mips64::WriteRegister(
-    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
-  Status error;
-
-  if (!reg_info)
-    return Status("reg_info NULL");
-
-  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
-
-  if (reg == LLDB_INVALID_REGNUM)
-    return Status("no lldb regnum for %s", reg_info && reg_info->name
-                                               ? reg_info->name
-                                               : "<unknown register>");
-
-  std::optional<RegSetKind> opt_set = GetSetForNativeRegNum(reg);
-  if (!opt_set) {
-    // This is likely an internal register for lldb use only and should not be
-    // directly queried.
-    error = Status::FromErrorStringWithFormat(
-        "register \"%s\" is in unrecognized set", reg_info->name);
-    return error;
-  }
-
-  RegSetKind set = *opt_set;
-  error = ReadRegisterSet(set);
-  if (error.Fail())
-    return error;
-
-  assert(reg_info->byte_offset + reg_info->byte_size <= m_reg_data.size());
-  ::memcpy(m_reg_data.data() + reg_info->byte_offset, reg_value.GetBytes(),
-           reg_info->byte_size);
-
-  return WriteRegisterSet(set);
-}
-
-Status NativeRegisterContextFreeBSD_mips64::ReadAllRegisterValues(
-    lldb::WritableDataBufferSP &data_sp) {
-  Status error;
-
-  error = ReadRegisterSet(GPRegSet);
-  if (error.Fail())
-    return error;
-
-  error = ReadRegisterSet(FPRegSet);
-  if (error.Fail())
-    return error;
-
-  data_sp.reset(new DataBufferHeap(m_reg_data.size(), 0));
-  uint8_t *dst = data_sp->GetBytes();
-  ::memcpy(dst, m_reg_data.data(), m_reg_data.size());
-
-  return error;
-}
-
-Status NativeRegisterContextFreeBSD_mips64::WriteAllRegisterValues(
-    const lldb::DataBufferSP &data_sp) {
-  Status error;
-
-  if (!data_sp) {
-    error = Status::FromErrorStringWithFormat(
-        "NativeRegisterContextFreeBSD_mips64::%s invalid data_sp provided",
-        __FUNCTION__);
-    return error;
-  }
-
-  if (data_sp->GetByteSize() != m_reg_data.size()) {
-    error = Status::FromErrorStringWithFormat(
-        "NativeRegisterContextFreeBSD_mips64::%s data_sp contained mismatched "
-        "data size, expected %" PRIu64 ", actual %" PRIu64,
-        __FUNCTION__, m_reg_data.size(), data_sp->GetByteSize());
-    return error;
-  }
-
-  const uint8_t *src = data_sp->GetBytes();
-  if (src == nullptr) {
-    error = Status::FromErrorStringWithFormat(
-        "NativeRegisterContextFreeBSD_mips64::%s "
-        "DataBuffer::GetBytes() returned a null "
-        "pointer",
-        __FUNCTION__);
-    return error;
-  }
-  ::memcpy(m_reg_data.data(), src, m_reg_data.size());
-
-  error = WriteRegisterSet(GPRegSet);
-  if (error.Fail())
-    return error;
-
-  return WriteRegisterSet(FPRegSet);
-}
-
-llvm::Error NativeRegisterContextFreeBSD_mips64::CopyHardwareWatchpointsFrom(
-    NativeRegisterContextFreeBSD &source) {
-  return llvm::Error::success();
-}
-
-#endif // defined (__mips64__)
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
deleted file mode 100644
index 286b4fd8d8b99..0000000000000
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_mips64.h
+++ /dev/null
@@ -1,75 +0,0 @@
-//===-- NativeRegisterContextFreeBSD_mips64.h -------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#if defined(__mips64__)
-
-#ifndef lldb_NativeRegisterContextFreeBSD_mips64_h
-#define lldb_NativeRegisterContextFreeBSD_mips64_h
-
-// clang-format off
-#include <sys/types.h>
-#include <machine/reg.h>
-// clang-format on
-
-#include "Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h"
-#include "Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h"
-
-#include <array>
-#include <optional>
-
-namespace lldb_private {
-namespace process_freebsd {
-
-class NativeProcessFreeBSD;
-
-class NativeRegisterContextFreeBSD_mips64
-    : public NativeRegisterContextFreeBSD {
-public:
-  NativeRegisterContextFreeBSD_mips64(const ArchSpec &target_arch,
-                                      NativeThreadFreeBSD &native_thread);
-
-  uint32_t GetRegisterSetCount() const override;
-
-  uint32_t GetUserRegisterCount() const override;
-
-  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
-
-  Status ReadRegister(const RegisterInfo *reg_info,
-                      RegisterValue &reg_value) override;
-
-  Status WriteRegister(const RegisterInfo *reg_info,
-                       const RegisterValue &reg_value) override;
-
-  Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;
-
-  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
-
-  llvm::Error
-  CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) override;
-
-private:
-  enum RegSetKind {
-    GPRegSet,
-    FPRegSet,
-  };
-  std::array<uint8_t, sizeof(reg) + sizeof(fpreg)> m_reg_data;
-
-  std::optional<RegSetKind> GetSetForNativeRegNum(uint32_t reg_num) const;
-
-  Status ReadRegisterSet(RegSetKind set);
-  Status WriteRegisterSet(RegSetKind set);
-
-  RegisterContextFreeBSD_mips64 &GetRegisterInfo() const;
-};
-
-} // namespace process_freebsd
-} // namespace lldb_private
-
-#endif // #ifndef lldb_NativeRegisterContextFreeBSD_mips64_h
-
-#endif // defined (__mips64__)
diff --git a/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
index b1e326ec064e4..e69193a47bbd4 100644
--- a/lldb/source/Plugins/Process/Utility/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
@@ -27,7 +27,6 @@ add_lldb_library(lldbPluginProcessUtility
   RegisterContextDarwin_x86_64.cpp
   RegisterContextDummy.cpp
   RegisterContextFreeBSD_i386.cpp
-  RegisterContextFreeBSD_mips64.cpp
   RegisterContextFreeBSD_powerpc.cpp
   RegisterContextFreeBSD_x86_64.cpp
   RegisterContextHistory.cpp
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp
deleted file mode 100644
index 1f52c09df12e7..0000000000000
--- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-//===-- RegisterContextFreeBSD_mips64.cpp ---------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===---------------------------------------------------------------------===//
-
-#include "RegisterContextFreeBSD_mips64.h"
-#include "RegisterContextPOSIX_mips64.h"
-#include "lldb-mips-freebsd-register-enums.h"
-#include <vector>
-
-using namespace lldb_private;
-using namespace lldb;
-
-static const uint32_t g_gp_regnums_mips64[] = {
-    gpr_zero_mips64,    gpr_r1_mips64,    gpr_r2_mips64,    gpr_r3_mips64,
-    gpr_r4_mips64,      gpr_r5_mips64,    gpr_r6_mips64,    gpr_r7_mips64,
-    gpr_r8_mips64,      gpr_r9_mips64,    gpr_r10_mips64,   gpr_r11_mips64,
-    gpr_r12_mips64,     gpr_r13_mips64,   gpr_r14_mips64,   gpr_r15_mips64,
-    gpr_r16_mips64,     gpr_r17_mips64,   gpr_r18_mips64,   gpr_r19_mips64,
-    gpr_r20_mips64,     gpr_r21_mips64,   gpr_r22_mips64,   gpr_r23_mips64,
-    gpr_r24_mips64,     gpr_r25_mips64,   gpr_r26_mips64,   gpr_r27_mips64,
-    gpr_gp_mips64,      gpr_sp_mips64,    gpr_r30_mips64,   gpr_ra_mips64,
-    gpr_sr_mips64,      gpr_mullo_mips64, gpr_mulhi_mips64, gpr_badvaddr_mips64,
-    gpr_cause_mips64,   gpr_pc_mips64,    gpr_ic_mips64,    gpr_dummy_mips64,
-    LLDB_INVALID_REGNUM // register sets need to end with this flag
-};
-
-static_assert((sizeof(g_gp_regnums_mips64) / sizeof(g_gp_regnums_mips64[0])) -
-                      1 ==
-                  k_num_gpr_registers_mips64,
-              "g_gp_regnums_mips64 has wrong number of register infos");
-
-const uint32_t g_fp_regnums_mips64[] = {
-    fpr_f0_mips64,      fpr_f1_mips64,  fpr_f2_mips64,  fpr_f3_mips64,
-    fpr_f4_mips64,      fpr_f5_mips64,  fpr_f6_mips64,  fpr_f7_mips64,
-    fpr_f8_mips64,      fpr_f9_mips64,  fpr_f10_mips64, fpr_f11_mips64,
-    fpr_f12_mips64,     fpr_f13_mips64, fpr_f14_mips64, fpr_f15_mips64,
-    fpr_f16_mips64,     fpr_f17_mips64, fpr_f18_mips64, fpr_f19_mips64,
-    fpr_f20_mips64,     fpr_f21_mips64, fpr_f22_mips64, fpr_f23_mips64,
-    fpr_f24_mips64,     fpr_f25_mips64, fpr_f26_mips64, fpr_f27_mips64,
-    fpr_f28_mips64,     fpr_f29_mips64, fpr_f30_mips64, fpr_f31_mips64,
-    fpr_fcsr_mips64,    fpr_fir_mips64,
-    LLDB_INVALID_REGNUM // register sets need to end with this flag
-};
-
-static_assert((sizeof(g_fp_regnums_mips64) / sizeof(g_fp_regnums_mips64[0])) -
-                      1 ==
-                  k_num_fpr_registers_mips64,
-              "g_fp_regnums_mips64 has wrong number of register infos");
-
-// Number of register sets provided by this context.
-constexpr size_t k_num_register_sets = 2;
-
-static const RegisterSet g_reg_sets_mips64[k_num_register_sets] = {
-    {"General Purpose Registers", "gpr", k_num_gpr_registers_mips64,
-     g_gp_regnums_mips64},
-    {"Floating Point Registers", "fpu", k_num_fpr_registers_mips64,
-     g_fp_regnums_mips64},
-};
-
-// http://svnweb.freebsd.org/base/head/sys/mips/include/regnum.h
-typedef struct _GPR {
-  uint64_t zero;
-  uint64_t r1;
-  uint64_t r2;
-  uint64_t r3;
-  uint64_t r4;
-  uint64_t r5;
-  uint64_t r6;
-  uint64_t r7;
-  uint64_t r8;
-  uint64_t r9;
-  uint64_t r10;
-  uint64_t r11;
-  uint64_t r12;
-  uint64_t r13;
-  uint64_t r14;
-  uint64_t r15;
-  uint64_t r16;
-  uint64_t r17;
-  uint64_t r18;
-  uint64_t r19;
-  uint64_t r20;
-  uint64_t r21;
-  uint64_t r22;
-  uint64_t r23;
-  uint64_t r24;
-  uint64_t r25;
-  uint64_t r26;
-  uint64_t r27;
-  uint64_t gp;
-  uint64_t sp;
-  uint64_t r30;
-  uint64_t ra;
-  uint64_t sr;
-  uint64_t mullo;
-  uint64_t mulhi;
-  uint64_t badvaddr;
-  uint64_t cause;
-  uint64_t pc;
-  uint64_t ic;
-  uint64_t dummy;
-} GPR_freebsd_mips;
-
-typedef struct _FPR {
-  uint64_t f0;
-  uint64_t f1;
-  uint64_t f2;
-  uint64_t f3;
-  uint64_t f4;
-  uint64_t f5;
-  uint64_t f6;
-  uint64_t f7;
-  uint64_t f8;
-  uint64_t f9;
-  uint64_t f10;
-  uint64_t f11;
-  uint64_t f12;
-  uint64_t f13;
-  uint64_t f14;
-  uint64_t f15;
-  uint64_t f16;
-  uint64_t f17;
-  uint64_t f18;
-  uint64_t f19;
-  uint64_t f20;
-  uint64_t f21;
-  uint64_t f22;
-  uint64_t f23;
-  uint64_t f24;
-  uint64_t f25;
-  uint64_t f26;
-  uint64_t f27;
-  uint64_t f28;
-  uint64_t f29;
-  uint64_t f30;
-  uint64_t f31;
-  uint64_t fcsr;
-  uint64_t fir;
-} FPR_freebsd_mips;
-
-// Include RegisterInfos_mips64 to declare our g_register_infos_mips64
-// structure.
-#define DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-#include "RegisterInfos_mips64.h"
-#undef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
-
-RegisterContextFreeBSD_mips64::RegisterContextFreeBSD_mips64(
-    const ArchSpec &target_arch)
-    : RegisterInfoInterface(target_arch) {}
-
-size_t RegisterContextFreeBSD_mips64::GetGPRSize() const {
-  return sizeof(GPR_freebsd_mips);
-}
-
-const RegisterSet *
-RegisterContextFreeBSD_mips64::GetRegisterSet(size_t set) const {
-  // Check if RegisterSet is available
-  if (set < k_num_register_sets)
-    return &g_reg_sets_mips64[set];
-  return nullptr;
-}
-
-size_t RegisterContextFreeBSD_mips64::GetRegisterSetCount() const {
-  return k_num_register_sets;
-}
-
-const RegisterInfo *RegisterContextFreeBSD_mips64::GetRegisterInfo() const {
-  assert(GetTargetArchitecture().GetCore() == ArchSpec::eCore_mips64);
-  return g_register_infos_mips64;
-}
-
-uint32_t RegisterContextFreeBSD_mips64::GetRegisterCount() const {
-  return static_cast<uint32_t>(sizeof(g_register_infos_mips64) /
-                               sizeof(g_register_infos_mips64[0]));
-}
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h b/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
deleted file mode 100644
index 39968eacf4755..0000000000000
--- a/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_mips64.h
+++ /dev/null
@@ -1,30 +0,0 @@
-//===-- RegisterContextFreeBSD_mips64.h -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTFREEBSD_MIPS64_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTFR...
[truncated]

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 4, 2026

🐧 Linux x64 Test Results

  • 33306 tests passed
  • 508 tests skipped

✅ The build succeeded and all tests passed.

@mchoo7 mchoo7 marked this pull request as draft February 4, 2026 00:44
@mchoo7 mchoo7 marked this pull request as ready for review February 4, 2026 00:48
@mchoo7 mchoo7 marked this pull request as draft February 4, 2026 00:48
@mchoo7 mchoo7 marked this pull request as ready for review February 4, 2026 00:50
@mchoo7
Copy link
Copy Markdown
Contributor Author

mchoo7 commented Feb 4, 2026

ping @emaste

@mchoo7
Copy link
Copy Markdown
Contributor Author

mchoo7 commented Feb 4, 2026

Is the test failure related to my change?

@DavidSpickett
Copy link
Copy Markdown
Collaborator

Is the test failure related to my change?

No, the DAP tests have stability problems.

Copy link
Copy Markdown
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about this myself but wasn't connected enough to FreeBSD to know if it was worth doing yet. I leave the review up to the FreeBSD experts.

In an ideal world we would have had a release note that said "this will be the last version to support...." for 22.x and then here we'd have "support for ... has been removed".

Please add the latter release note to this PR, and if the reviewers approve the PR, I think we have time to get a release note into 22.x to say that it's the last version with this support in it.

(to do that you make a PR as normal, but based on the 22.x branch)

The release notes are a section in the llvm release notes, https://github.com/llvm/llvm-project/blob/main/llvm/docs/ReleaseNotes.md.

@DavidSpickett
Copy link
Copy Markdown
Collaborator

Also I think you'll be able to add reviewers yourself now that you are a "contributor".

@mchoo7
Copy link
Copy Markdown
Contributor Author

mchoo7 commented Feb 4, 2026

Please add the latter release note to this PR, and if the reviewers approve the PR, I think we have time to get a release note into 22.x to say that it's the last version with this support in it.

Done.

Also I think you'll be able to add reviewers yourself now that you are a "contributor".

I don't see add button next to Reviewers section. I'll request for commit access once enough PRs are merged so I can do more triage/reviewers assignment for FreeBSD-related PRs and issues.

@DavidSpickett
Copy link
Copy Markdown
Collaborator

I don't see add button next to Reviewers section. I'll request for commit access once enough PRs are merged so I can do more triage/reviewers assignment for FreeBSD-related PRs and issues.

Oh right of course. Commit access is basically write access and that includes PR and issue properties. Sorry about that, always hard to tell what Github shows other people.

@DavidSpickett
Copy link
Copy Markdown
Collaborator

I'm going to wait for a FreeBSD specific reviewer approval here, to confirm the project's intent. The code changes are fine though.

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
@mchoo7
Copy link
Copy Markdown
Contributor Author

mchoo7 commented Feb 5, 2026

@DavidSpickett : @emaste approved but I rebased (sorry I should've merged) to resolve merge conflict. Can we merge?

@DavidSpickett
Copy link
Copy Markdown
Collaborator

Merge is preferred yes but rebase is usually fine once the review is done and it hasn't been complex with lots of comments.

I will merge this now.

@DavidSpickett DavidSpickett merged commit 427bb1c into llvm:main Feb 5, 2026
11 checks passed
@mchoo7 mchoo7 deleted the mips64 branch February 5, 2026 15:13
@emaste
Copy link
Copy Markdown
Member

emaste commented Feb 5, 2026

I started writing this comment but didn't submit before the merge.

My typical approach is to be a bit more conservative, and if I was making this change I would have waited until it after 13.x is EOL. But I have no objection to doing it earlier (hence the change approval). There has been basically no activity in FreeBSD/mips for quite some time, and it's not going to make a material difference if this happens now or in several months.

@llvm-ci
Copy link
Copy Markdown

llvm-ci commented Feb 5, 2026

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building lldb,llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/19981

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
PASS: LLVM :: CodeGen/RISCV/attributes.ll (106325 of 106335)
PASS: Clang :: Preprocessor/riscv-target-features.c (106326 of 106335)
PASS: LLVM :: tools/llvm-readobj/ELF/file-header-machine-types.test (106327 of 106335)
PASS: lit :: verbosity.py (106328 of 106335)
PASS: LLVM :: CodeGen/ARM/build-attributes.ll (106329 of 106335)
PASS: lit :: shtest-define.py (106330 of 106335)
PASS: Clang :: Driver/clang_f_opts.c (106331 of 106335)
PASS: Clang :: Preprocessor/init.c (106332 of 106335)
PASS: LLVM :: tools/llvm-readobj/ELF/AMDGPU/elf-headers.test (106333 of 106335)
PASS: Clang :: Driver/arm-cortex-cpus-2.c (106334 of 106335)
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=7564.501892

mchoo7 added a commit to mchoo7/llvm-project that referenced this pull request Feb 6, 2026
Result of llvm#179582 and llvm#179587

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
rishabhmadan19 pushed a commit to rishabhmadan19/llvm-project that referenced this pull request Feb 9, 2026
The last FreeBSD version supporting mips64 is FreeBSD 13 which will be
EOLed on April 30th. LLVM 23.1.0 release is expected to be August 25th
according to the LLVM calendar. The usage of mips64 is less noticeable
so it's hard to know if it is properly working, and even if it works, it
is hard to test new features on FreeBSD mips64.

Thus, remove support for mips64 on FreeBSD.

---------

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
c-rhodes pushed a commit that referenced this pull request Feb 11, 2026
Result of #179582 and #179587

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants