sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 1 | |
| 2 | /*---------------------------------------------------------------*/ |
| 3 | /*--- ---*/ |
| 4 | /*--- This file (libvex_guest_arm.h) is ---*/ |
| 5 | /*--- Copyright (c) 2004 OpenWorks LLP. All rights reserved. ---*/ |
| 6 | /*--- ---*/ |
| 7 | /*---------------------------------------------------------------*/ |
| 8 | |
| 9 | /* |
| 10 | This file is part of LibVEX, a library for dynamic binary |
| 11 | instrumentation and translation. |
| 12 | |
| 13 | Copyright (C) 2004 OpenWorks, LLP. |
| 14 | |
| 15 | This program is free software; you can redistribute it and/or modify |
| 16 | it under the terms of the GNU General Public License as published by |
| 17 | the Free Software Foundation; Version 2 dated June 1991 of the |
| 18 | license. |
| 19 | |
| 20 | This program is distributed in the hope that it will be useful, |
| 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or liability |
| 23 | for damages. See the GNU General Public License for more details. |
| 24 | |
| 25 | Neither the names of the U.S. Department of Energy nor the |
| 26 | University of California nor the names of its contributors may be |
| 27 | used to endorse or promote products derived from this software |
| 28 | without prior written permission. |
| 29 | |
| 30 | You should have received a copy of the GNU General Public License |
| 31 | along with this program; if not, write to the Free Software |
| 32 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 33 | USA. |
| 34 | */ |
| 35 | |
| 36 | #ifndef __LIBVEX_PUB_GUEST_ARM_H |
| 37 | #define __LIBVEX_PUB_GUEST_ARM_H |
| 38 | |
| 39 | #include "libvex_basictypes.h" |
| 40 | |
sewardj | 2a9ad02 | 2004-11-25 02:46:58 +0000 | [diff] [blame^] | 41 | |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 42 | /*---------------------------------------------------------------*/ |
| 43 | /*--- Vex's representation of the ARM CPU state. ---*/ |
| 44 | /*---------------------------------------------------------------*/ |
| 45 | |
sewardj | 2a9ad02 | 2004-11-25 02:46:58 +0000 | [diff] [blame^] | 46 | /* R13 traditionally used as the stack pointer ? */ |
| 47 | |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 48 | typedef |
| 49 | struct { |
| 50 | UInt guest_R0; |
| 51 | UInt guest_R1; |
| 52 | UInt guest_R2; |
| 53 | UInt guest_R3; |
| 54 | UInt guest_R4; |
| 55 | UInt guest_R5; |
| 56 | UInt guest_R6; |
| 57 | UInt guest_R7; |
| 58 | UInt guest_R8; |
| 59 | UInt guest_R9; |
| 60 | UInt guest_R10; |
| 61 | UInt guest_R11; |
| 62 | UInt guest_R12; |
| 63 | UInt guest_R13; |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 64 | |
sewardj | 2a9ad02 | 2004-11-25 02:46:58 +0000 | [diff] [blame^] | 65 | /* aka the link register */ |
| 66 | UInt guest_R14; |
| 67 | |
| 68 | /* Program counter. */ |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 69 | UInt guest_R15; |
| 70 | |
sewardj | 2a9ad02 | 2004-11-25 02:46:58 +0000 | [diff] [blame^] | 71 | /* System call number copied in here from swi insn literal |
| 72 | field. */ |
sewardj | e77b88b | 2004-11-24 11:22:31 +0000 | [diff] [blame] | 73 | UInt guest_SYSCALLNO; |
| 74 | |
sewardj | 2a9ad02 | 2004-11-25 02:46:58 +0000 | [diff] [blame^] | 75 | /* 3-word thunk used to calculate N(sign) Z(zero) C(carry, |
| 76 | unsigned overflow) and V(signed overflow) flags. */ |
| 77 | UInt guest_CC_OP; |
| 78 | UInt guest_CC_DEP1; |
| 79 | UInt guest_CC_DEP2; |
| 80 | |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 81 | /* Padding to make it have an 8-aligned size */ |
| 82 | /* UInt padding; */ |
| 83 | } |
| 84 | VexGuestARMState; |
| 85 | |
| 86 | |
sewardj | d584f8f | 2004-11-22 16:02:34 +0000 | [diff] [blame] | 87 | #endif /* ndef __LIBVEX_PUB_GUEST_ARM_H */ |
| 88 | |
| 89 | /*---------------------------------------------------------------*/ |
| 90 | /*--- libvex_guest_arm.h ---*/ |
| 91 | /*---------------------------------------------------------------*/ |