alpha-bsd-tdep.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Common target dependent code Alpha BSD's.
  2. Copyright (C) 2000-2022 Free Software Foundation, Inc.
  3. This file is part of GDB.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. #include "defs.h"
  15. #include "regcache.h"
  16. #include "alpha-tdep.h"
  17. #include "alpha-bsd-tdep.h"
  18. /* Conviently, GDB uses the same register numbering as the
  19. ptrace register structure used by BSD on Alpha. */
  20. void
  21. alphabsd_supply_reg (struct regcache *regcache, const char *regs, int regno)
  22. {
  23. /* PC is at slot 32; UNIQUE not present. */
  24. alpha_supply_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
  25. }
  26. void
  27. alphabsd_fill_reg (const struct regcache *regcache, char *regs, int regno)
  28. {
  29. /* PC is at slot 32; UNIQUE not present. */
  30. alpha_fill_int_regs (regcache, regno, regs, regs + 31 * 8, NULL);
  31. }
  32. void
  33. alphabsd_supply_fpreg (struct regcache *regcache,
  34. const char *fpregs, int regno)
  35. {
  36. /* FPCR is at slot 33; slot 32 unused. */
  37. alpha_supply_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
  38. }
  39. void
  40. alphabsd_fill_fpreg (const struct regcache *regcache, char *fpregs, int regno)
  41. {
  42. /* FPCR is at slot 33; slot 32 unused. */
  43. alpha_fill_fp_regs (regcache, regno, fpregs, fpregs + 32 * 8);
  44. }