blob: 4ab746377d6549a46a1fdde7fbf27d1319d3eb2d [file] [log] [blame]
sewardjd584f8f2004-11-22 16:02:34 +00001
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
sewardj2a9ad022004-11-25 02:46:58 +000041
sewardjd584f8f2004-11-22 16:02:34 +000042/*---------------------------------------------------------------*/
43/*--- Vex's representation of the ARM CPU state. ---*/
44/*---------------------------------------------------------------*/
45
sewardj2a9ad022004-11-25 02:46:58 +000046/* R13 traditionally used as the stack pointer ? */
47
sewardjd584f8f2004-11-22 16:02:34 +000048typedef
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;
sewardjd584f8f2004-11-22 16:02:34 +000064
sewardj2a9ad022004-11-25 02:46:58 +000065 /* aka the link register */
66 UInt guest_R14;
67
68 /* Program counter. */
sewardjd584f8f2004-11-22 16:02:34 +000069 UInt guest_R15;
70
sewardj2a9ad022004-11-25 02:46:58 +000071 /* System call number copied in here from swi insn literal
72 field. */
sewardje77b88b2004-11-24 11:22:31 +000073 UInt guest_SYSCALLNO;
74
sewardj2a9ad022004-11-25 02:46:58 +000075 /* 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
sewardjd584f8f2004-11-22 16:02:34 +000081 /* Padding to make it have an 8-aligned size */
82 /* UInt padding; */
83 }
84 VexGuestARMState;
85
86
sewardjd584f8f2004-11-22 16:02:34 +000087#endif /* ndef __LIBVEX_PUB_GUEST_ARM_H */
88
89/*---------------------------------------------------------------*/
90/*--- libvex_guest_arm.h ---*/
91/*---------------------------------------------------------------*/