cpu-defs.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * common defines for all CPUs
  3. *
  4. * Copyright (c) 2003 Fabrice Bellard
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef CPU_DEFS_H
  20. #define CPU_DEFS_H
  21. #ifndef COMPILING_PER_TARGET
  22. #error cpu.h included from common code
  23. #endif
  24. #include "cpu-param.h"
  25. #ifndef TARGET_LONG_BITS
  26. # error TARGET_LONG_BITS must be defined in cpu-param.h
  27. #endif
  28. #ifndef TARGET_PHYS_ADDR_SPACE_BITS
  29. # error TARGET_PHYS_ADDR_SPACE_BITS must be defined in cpu-param.h
  30. #endif
  31. #ifndef TARGET_VIRT_ADDR_SPACE_BITS
  32. # error TARGET_VIRT_ADDR_SPACE_BITS must be defined in cpu-param.h
  33. #endif
  34. #ifndef TARGET_PAGE_BITS
  35. # ifdef TARGET_PAGE_BITS_VARY
  36. # ifndef TARGET_PAGE_BITS_MIN
  37. # error TARGET_PAGE_BITS_MIN must be defined in cpu-param.h
  38. # endif
  39. # else
  40. # error TARGET_PAGE_BITS must be defined in cpu-param.h
  41. # endif
  42. #endif
  43. #include "exec/target_long.h"
  44. #endif