2
0

memory_ldst.h.inc 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Physical memory access templates
  3. *
  4. * Copyright (c) 2003 Fabrice Bellard
  5. * Copyright (c) 2015 Linaro, Inc.
  6. * Copyright (c) 2016 Red Hat, Inc.
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifdef TARGET_ENDIANNESS
  22. uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL,
  23. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  24. uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL,
  25. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  26. uint64_t glue(address_space_ldq, SUFFIX)(ARG1_DECL,
  27. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  28. void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL,
  29. hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
  30. void glue(address_space_stw, SUFFIX)(ARG1_DECL,
  31. hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
  32. void glue(address_space_stl, SUFFIX)(ARG1_DECL,
  33. hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
  34. void glue(address_space_stq, SUFFIX)(ARG1_DECL,
  35. hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
  36. #else
  37. uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL,
  38. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  39. uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL,
  40. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  41. uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL,
  42. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  43. uint32_t glue(address_space_ldl_le, SUFFIX)(ARG1_DECL,
  44. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  45. uint32_t glue(address_space_ldl_be, SUFFIX)(ARG1_DECL,
  46. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  47. uint64_t glue(address_space_ldq_le, SUFFIX)(ARG1_DECL,
  48. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  49. uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL,
  50. hwaddr addr, MemTxAttrs attrs, MemTxResult *result);
  51. void glue(address_space_stb, SUFFIX)(ARG1_DECL,
  52. hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result);
  53. void glue(address_space_stw_le, SUFFIX)(ARG1_DECL,
  54. hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
  55. void glue(address_space_stw_be, SUFFIX)(ARG1_DECL,
  56. hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result);
  57. void glue(address_space_stl_le, SUFFIX)(ARG1_DECL,
  58. hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
  59. void glue(address_space_stl_be, SUFFIX)(ARG1_DECL,
  60. hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result);
  61. void glue(address_space_stq_le, SUFFIX)(ARG1_DECL,
  62. hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
  63. void glue(address_space_stq_be, SUFFIX)(ARG1_DECL,
  64. hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result);
  65. #endif
  66. #undef ARG1_DECL
  67. #undef ARG1
  68. #undef SUFFIX
  69. #undef TARGET_ENDIANNESS