Commit 2e13d23ac089e554fc0efd285ec2176ca36576c7

Authored by j_mayer
1 parent faadf50e

Fix PowerPC high BATs access: BAT number was incorrect.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3519 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 3 deletions
target-ppc/translate_init.c
... ... @@ -241,7 +241,7 @@ static void spr_read_dbat (void *opaque, int sprn)
241 241  
242 242 static void spr_read_dbat_h (void *opaque, int sprn)
243 243 {
244   - gen_op_load_dbat(sprn & 1, (sprn - SPR_DBAT4U) / 2);
  244 + gen_op_load_dbat(sprn & 1, ((sprn - SPR_DBAT4U) / 2) + 4);
245 245 }
246 246  
247 247 static void spr_write_dbatu (void *opaque, int sprn)
... ... @@ -251,7 +251,7 @@ static void spr_write_dbatu (void *opaque, int sprn)
251 251  
252 252 static void spr_write_dbatu_h (void *opaque, int sprn)
253 253 {
254   - gen_op_store_dbatu((sprn - SPR_DBAT4U) / 2);
  254 + gen_op_store_dbatu(((sprn - SPR_DBAT4U) / 2) + 4);
255 255 }
256 256  
257 257 static void spr_write_dbatl (void *opaque, int sprn)
... ... @@ -261,7 +261,7 @@ static void spr_write_dbatl (void *opaque, int sprn)
261 261  
262 262 static void spr_write_dbatl_h (void *opaque, int sprn)
263 263 {
264   - gen_op_store_dbatl((sprn - SPR_DBAT4L) / 2);
  264 + gen_op_store_dbatl(((sprn - SPR_DBAT4L) / 2) + 4);
265 265 }
266 266  
267 267 /* SDR1 */
... ...