Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef _ONOFF_COMMON_H
  2. #define _ONOFF_COMMON_H
  3. /* onoff_common.h */
  4. /*****************************************************************************/
  5. /* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only                     */
  6. /*                                                                           */
  7. /* AS-Port                                                                   */
  8. /*                                                                           */
  9. /* ON/OFF flags used by several targets                                      */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12.  
  13. #define FPUAvailName     "HASFPU"     /* FPU-Befehle erlaubt */
  14. #define PMMUAvailName    "HASPMMU"    /* PMMU-Befehle erlaubt */
  15. #define FullPMMUName     "FULLPMMU"
  16. #define MaxModeSymName    "INMAXMODE"  /* CPU in maximum mode */
  17. #define MaxModeCmdName    "MAXMODE"
  18. #define SrcModeCmdName    "SRCMODE"
  19. #define SrcModeSymName    "INSRCMODE"  /* CPU im Quellcode-kompatiblen Modus */
  20. #define ExtModeCmdName    "EXTMODE"
  21. #define ExtModeSymName    "INEXTMODE"
  22. #define LWordModeCmdName  "LWORDMODE"
  23. #define LWordModeSymName  "INLWORDMODE"
  24. #define DSPCmdName        "DSP"
  25. #define DSPSymName        "HASDSP"
  26. #define CustomAvailCmdName "CUSTOM"
  27. #define CustomAvailSymName "CUSTOM"
  28. #define BranchExtCmdName  "BRANCHEXT"
  29. #define BranchExtSymName  "BRANCHEXT"
  30.  
  31. extern Boolean FPUAvail,
  32.                PMMUAvail,
  33.                SupAllowed,
  34.                MaxMode,
  35.                CompMode,
  36.                TargetBigEndian,
  37.                DoPadding,
  38.                Packing;
  39.  
  40. /* NOTE: will have to switch this to #define as soon as
  41.    everything up to 2**15 is used up - 16 bit compilers
  42.    silently limit enums to int range */
  43.  
  44. enum
  45. {
  46.   e_onoff_reg_fpu = 1 << 0,
  47.   e_onoff_reg_pmmu = 1 << 1,
  48.   e_onoff_reg_custom = 1 << 2,
  49.   e_onoff_reg_supmode = 1 << 3,
  50.   e_onoff_reg_maxmode = 1 << 4,
  51.   e_onoff_reg_extmode = 1 << 5,
  52.   e_onoff_reg_srcmode = 1 << 6,
  53.   e_onoff_reg_compmode = 1 << 7,
  54.   e_onoff_reg_lwordmode = 1 << 8,
  55.   e_onoff_reg_fullpmmu = 1 << 9,
  56.   e_onoff_reg_dsp = 1 << 10,
  57.   e_onoff_reg_packing = 1 << 11,
  58.   e_onoff_reg_bigendian = 1 << 12,
  59.   e_onoff_reg_branchext = 1 << 13,
  60.   e_onoff_reg_z80syntax = 1 << 14
  61. };
  62.  
  63. extern unsigned onoff_test_and_set(unsigned mask);
  64.  
  65. extern void onoff_fpu_add(void);
  66. extern void onoff_pmmu_add(void);
  67. extern void onoff_supmode_add(void);
  68. extern void onoff_maxmode_add(void);
  69. extern void onoff_compmode_add(void);
  70. extern void onoff_bigendian_add(void);
  71. extern void onoff_packing_add(Boolean def_value);
  72.  
  73. extern void onoff_common_init(void);
  74.  
  75. #endif /* _ONOFF_COMMON_H */
  76.