armemu.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* armemu.h -- ARMulator emulation macros: ARM6 Instruction Emulator.
  2. Copyright (C) 1994 Advanced RISC Machines Ltd.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  14. #pragma once
  15. #include "core/arm/skyeye_common/armdefs.h"
  16. // Flags for use with the APSR.
  17. enum : u32 {
  18. NBIT = (1U << 31U),
  19. ZBIT = (1 << 30),
  20. CBIT = (1 << 29),
  21. VBIT = (1 << 28),
  22. QBIT = (1 << 27),
  23. JBIT = (1 << 24),
  24. EBIT = (1 << 9),
  25. ABIT = (1 << 8),
  26. IBIT = (1 << 7),
  27. FBIT = (1 << 6),
  28. TBIT = (1 << 5),
  29. // Masks for groups of bits in the APSR.
  30. MODEBITS = 0x1F,
  31. INTBITS = 0x1C0,
  32. };
  33. // Different ways to start the next instruction.
  34. enum {
  35. SEQ = 0,
  36. NONSEQ = 1,
  37. PCINCEDSEQ = 2,
  38. PCINCEDNONSEQ = 3,
  39. PRIMEPIPE = 4,
  40. RESUME = 8
  41. };
  42. // Values for Emulate.
  43. enum {
  44. STOP = 0, // Stop
  45. CHANGEMODE = 1, // Change mode
  46. ONCE = 2, // Execute just one interation
  47. RUN = 3 // Continuous execution
  48. };
  49. #define FLUSHPIPE state->NextInstr |= PRIMEPIPE