~ubuntu-branches/ubuntu/hardy/kvm/hardy-backports

« back to all changes in this revision

Viewing changes to qemu/softmmu_header.h

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-02-26 13:10:57 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20080226131057-s67x6l89mtjw1x9b
Tags: 1:62+dfsg-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
#define ADDR_READ addr_read
71
71
#endif
72
72
 
73
 
DATA_TYPE REGPARM(1) glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr,
 
73
DATA_TYPE REGPARM glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr,
74
74
                                                         int mmu_idx);
75
 
void REGPARM(2) glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int mmu_idx);
 
75
void REGPARM glue(glue(__st, SUFFIX), MMUSUFFIX)(target_ulong addr, DATA_TYPE v, int mmu_idx);
76
76
 
77
77
#if (DATA_SIZE <= 4) && (TARGET_LONG_BITS == 32) && defined(__i386__) && \
78
78
    (ACCESS_TYPE < NB_MMU_MODES) && defined(ASM_SOFTMMU)
79
79
 
80
 
#define CPU_TLB_ENTRY_BITS 4
81
 
 
82
80
static inline RES_TYPE glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr)
83
81
{
84
82
    int res;
92
90
                  "cmpl (%%edx), %%eax\n"
93
91
                  "movl %1, %%eax\n"
94
92
                  "je 1f\n"
95
 
                  "pushl %6\n"
 
93
                  "movl %6, %%edx\n"
96
94
                  "call %7\n"
97
 
                  "popl %%edx\n"
98
95
                  "movl %%eax, %0\n"
99
96
                  "jmp 2f\n"
100
97
                  "1:\n"
135
132
                  "cmpl (%%edx), %%eax\n"
136
133
                  "movl %1, %%eax\n"
137
134
                  "je 1f\n"
138
 
                  "pushl %6\n"
 
135
                  "movl %6, %%edx\n"
139
136
                  "call %7\n"
140
 
                  "popl %%edx\n"
141
137
#if DATA_SIZE == 1
142
138
                  "movsbl %%al, %0\n"
143
139
#elif DATA_SIZE == 2
189
185
#else
190
186
#error unsupported size
191
187
#endif
192
 
                  "pushl %6\n"
 
188
                  "movl %6, %%ecx\n"
193
189
                  "call %7\n"
194
 
                  "popl %%eax\n"
195
190
                  "jmp 2f\n"
196
191
                  "1:\n"
197
192
                  "addl 8(%%edx), %%eax\n"
207
202
                  "2:\n"
208
203
                  :
209
204
                  : "r" (ptr),
210
 
/* NOTE: 'q' would be needed as constraint, but we could not use it
211
 
   with T1 ! */
 
205
#if DATA_SIZE == 1
 
206
                  "q" (v),
 
207
#else
212
208
                  "r" (v),
 
209
#endif
213
210
                  "i" ((CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS),
214
211
                  "i" (TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS),
215
212
                  "i" (TARGET_PAGE_MASK | (DATA_SIZE - 1)),