1 | /*
|
---|
2 | * Host code generation
|
---|
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 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, write to the Free Software
|
---|
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
19 | */
|
---|
20 | #include <stdarg.h>
|
---|
21 | #include <stdlib.h>
|
---|
22 | #include <stdio.h>
|
---|
23 | #include <string.h>
|
---|
24 | #include <inttypes.h>
|
---|
25 |
|
---|
26 | #include "config.h"
|
---|
27 |
|
---|
28 | #if defined(VBOX)
|
---|
29 | void remR3PhysRead(RTGCPHYS SrcGCPhys, void *pvDst, unsigned cb);
|
---|
30 | uint8_t remR3PhysReadU8(RTGCPHYS SrcGCPhys);
|
---|
31 | int8_t remR3PhysReadS8(RTGCPHYS SrcGCPhys);
|
---|
32 | uint16_t remR3PhysReadU16(RTGCPHYS SrcGCPhys);
|
---|
33 | int16_t remR3PhysReadS16(RTGCPHYS SrcGCPhys);
|
---|
34 | uint32_t remR3PhysReadU32(RTGCPHYS SrcGCPhys);
|
---|
35 | int32_t remR3PhysReadS32(RTGCPHYS SrcGCPhys);
|
---|
36 | uint64_t remR3PhysReadU64(RTGCPHYS SrcGCPhys);
|
---|
37 | int64_t remR3PhysReadS64(RTGCPHYS SrcGCPhys);
|
---|
38 | void remR3PhysWrite(RTGCPHYS DstGCPhys, const void *pvSrc, unsigned cb);
|
---|
39 | void remR3PhysWriteU8(RTGCPHYS DstGCPhys, uint8_t val);
|
---|
40 | void remR3PhysWriteU16(RTGCPHYS DstGCPhys, uint16_t val);
|
---|
41 | void remR3PhysWriteU32(RTGCPHYS DstGCPhys, uint32_t val);
|
---|
42 | void remR3PhysWriteU64(RTGCPHYS DstGCPhys, uint64_t val);
|
---|
43 |
|
---|
44 | # ifndef REM_PHYS_ADDR_IN_TLB
|
---|
45 | void remR3PhysReadHCPtr(uint8_t *pbSrcPhys, void *pvDst, unsigned cb);
|
---|
46 | uint8_t remR3PhysReadHCPtrU8(uint8_t *pbSrcPhys);
|
---|
47 | int8_t remR3PhysReadHCPtrS8(uint8_t *pbSrcPhys);
|
---|
48 | uint16_t remR3PhysReadHCPtrU16(uint8_t *pbSrcPhys);
|
---|
49 | int16_t remR3PhysReadHCPtrS16(uint8_t *pbSrcPhys);
|
---|
50 | uint32_t remR3PhysReadHCPtrU32(uint8_t *pbSrcPhys);
|
---|
51 | int32_t remR3PhysReadHCPtrS32(uint8_t *pbSrcPhys);
|
---|
52 | uint64_t remR3PhysReadHCPtrU64(uint8_t *pbSrcPhys);
|
---|
53 | int64_t remR3PhysReadHCPtrS64(uint8_t *pbSrcPhys);
|
---|
54 | void remR3PhysWriteHCPtr(uint8_t *pbDstPhys, const void *pvSrc, unsigned cb);
|
---|
55 | void remR3PhysWriteHCPtrU8(uint8_t *pbDstPhys, uint8_t val);
|
---|
56 | void remR3PhysWriteHCPtrU16(uint8_t *pbDstPhys, uint16_t val);
|
---|
57 | void remR3PhysWriteHCPtrU32(uint8_t *pbDstPhys, uint32_t val);
|
---|
58 | void remR3PhysWriteHCPtrU64(uint8_t *pbDstPhys, uint64_t val);
|
---|
59 | # endif
|
---|
60 | #endif /* VBOX */
|
---|
61 |
|
---|
62 | enum {
|
---|
63 | #define DEF(s, n, copy_size) INDEX_op_ ## s,
|
---|
64 | #include "opc.h"
|
---|
65 | #undef DEF
|
---|
66 | NB_OPS,
|
---|
67 | };
|
---|
68 |
|
---|
69 | #include "dyngen.h"
|
---|
70 | #include "op.h"
|
---|
71 |
|
---|