Commit bc98a7efa43efae9fc17062c87cc43c589d3cbae

Authored by j_mayer
1 parent eae7629b

Add missing 64 bits memory accessors.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2592 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 34 additions and 1 deletions
cpu-all.h
@@ -644,12 +644,14 @@ static inline void stfq_be_p(void *ptr, float64 v) @@ -644,12 +644,14 @@ static inline void stfq_be_p(void *ptr, float64 v)
644 #define lduw_code(p) lduw_raw(p) 644 #define lduw_code(p) lduw_raw(p)
645 #define ldsw_code(p) ldsw_raw(p) 645 #define ldsw_code(p) ldsw_raw(p)
646 #define ldl_code(p) ldl_raw(p) 646 #define ldl_code(p) ldl_raw(p)
  647 +#define ldq_code(p) ldq_raw(p)
647 648
648 #define ldub_kernel(p) ldub_raw(p) 649 #define ldub_kernel(p) ldub_raw(p)
649 #define ldsb_kernel(p) ldsb_raw(p) 650 #define ldsb_kernel(p) ldsb_raw(p)
650 #define lduw_kernel(p) lduw_raw(p) 651 #define lduw_kernel(p) lduw_raw(p)
651 #define ldsw_kernel(p) ldsw_raw(p) 652 #define ldsw_kernel(p) ldsw_raw(p)
652 #define ldl_kernel(p) ldl_raw(p) 653 #define ldl_kernel(p) ldl_raw(p)
  654 +#define ldq_kernel(p) ldq_raw(p)
653 #define ldfl_kernel(p) ldfl_raw(p) 655 #define ldfl_kernel(p) ldfl_raw(p)
654 #define ldfq_kernel(p) ldfq_raw(p) 656 #define ldfq_kernel(p) ldfq_raw(p)
655 #define stb_kernel(p, v) stb_raw(p, v) 657 #define stb_kernel(p, v) stb_raw(p, v)
@@ -882,6 +884,7 @@ uint32_t lduw_phys(target_phys_addr_t addr); @@ -882,6 +884,7 @@ uint32_t lduw_phys(target_phys_addr_t addr);
882 uint32_t ldl_phys(target_phys_addr_t addr); 884 uint32_t ldl_phys(target_phys_addr_t addr);
883 uint64_t ldq_phys(target_phys_addr_t addr); 885 uint64_t ldq_phys(target_phys_addr_t addr);
884 void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val); 886 void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val);
  887 +void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val);
885 void stb_phys(target_phys_addr_t addr, uint32_t val); 888 void stb_phys(target_phys_addr_t addr, uint32_t val);
886 void stw_phys(target_phys_addr_t addr, uint32_t val); 889 void stw_phys(target_phys_addr_t addr, uint32_t val);
887 void stl_phys(target_phys_addr_t addr, uint32_t val); 890 void stl_phys(target_phys_addr_t addr, uint32_t val);
@@ -338,7 +338,7 @@ void tb_flush(CPUState *env1) @@ -338,7 +338,7 @@ void tb_flush(CPUState *env1)
338 338
339 #ifdef DEBUG_TB_CHECK 339 #ifdef DEBUG_TB_CHECK
340 340
341 -static void tb_invalidate_check(unsigned long address) 341 +static void tb_invalidate_check(target_ulong address)
342 { 342 {
343 TranslationBlock *tb; 343 TranslationBlock *tb;
344 int i; 344 int i;
@@ -2433,6 +2433,36 @@ void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val) @@ -2433,6 +2433,36 @@ void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val)
2433 } 2433 }
2434 } 2434 }
2435 2435
  2436 +void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val)
  2437 +{
  2438 + int io_index;
  2439 + uint8_t *ptr;
  2440 + unsigned long pd;
  2441 + PhysPageDesc *p;
  2442 +
  2443 + p = phys_page_find(addr >> TARGET_PAGE_BITS);
  2444 + if (!p) {
  2445 + pd = IO_MEM_UNASSIGNED;
  2446 + } else {
  2447 + pd = p->phys_offset;
  2448 + }
  2449 +
  2450 + if ((pd & ~TARGET_PAGE_MASK) != IO_MEM_RAM) {
  2451 + io_index = (pd >> IO_MEM_SHIFT) & (IO_MEM_NB_ENTRIES - 1);
  2452 +#ifdef TARGET_WORDS_BIGENDIAN
  2453 + io_mem_write[io_index][2](io_mem_opaque[io_index], addr, val >> 32);
  2454 + io_mem_write[io_index][2](io_mem_opaque[io_index], addr + 4, val);
  2455 +#else
  2456 + io_mem_write[io_index][2](io_mem_opaque[io_index], addr, val);
  2457 + io_mem_write[io_index][2](io_mem_opaque[io_index], addr + 4, val >> 32);
  2458 +#endif
  2459 + } else {
  2460 + ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) +
  2461 + (addr & ~TARGET_PAGE_MASK);
  2462 + stq_p(ptr, val);
  2463 + }
  2464 +}
  2465 +
2436 /* warning: addr must be aligned */ 2466 /* warning: addr must be aligned */
2437 void stl_phys(target_phys_addr_t addr, uint32_t val) 2467 void stl_phys(target_phys_addr_t addr, uint32_t val)
2438 { 2468 {