/[qemu]/qemu/exec.c
ViewVC logotype

Diff of /qemu/exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.65 by bellard, Sat Sep 3 10:49:04 2005 UTC revision 1.66 by bellard, Sun Oct 30 20:48:42 2005 UTC
# Line 2284  uint32_t ldl_phys(target_phys_addr_t add Line 2284  uint32_t ldl_phys(target_phys_addr_t add
2284      return val;      return val;
2285  }  }
2286    
2287    /* XXX: optimize */
2288    uint32_t ldub_phys(target_phys_addr_t addr)
2289    {
2290        uint8_t val;
2291        cpu_physical_memory_read(addr, &val, 1);
2292        return val;
2293    }
2294    
2295    /* XXX: optimize */
2296    uint32_t lduw_phys(target_phys_addr_t addr)
2297    {
2298        uint16_t val;
2299        cpu_physical_memory_read(addr, (uint8_t *)&val, 2);
2300        return tswap16(val);
2301    }
2302    
2303    /* XXX: optimize */
2304    uint64_t ldq_phys(target_phys_addr_t addr)
2305    {
2306        uint64_t val;
2307        cpu_physical_memory_read(addr, (uint8_t *)&val, 8);
2308        return tswap64(val);
2309    }
2310    
2311  /* warning: addr must be aligned. The ram page is not masked as dirty  /* warning: addr must be aligned. The ram page is not masked as dirty
2312     and the code inside is not invalidated. It is useful if the dirty     and the code inside is not invalidated. It is useful if the dirty
2313     bits are used to track modified PTEs */     bits are used to track modified PTEs */
# Line 2345  void stl_phys(target_phys_addr_t addr, u Line 2369  void stl_phys(target_phys_addr_t addr, u
2369      }      }
2370  }  }
2371    
2372    /* XXX: optimize */
2373    void stb_phys(target_phys_addr_t addr, uint32_t val)
2374    {
2375        uint8_t v = val;
2376        cpu_physical_memory_write(addr, &v, 1);
2377    }
2378    
2379    /* XXX: optimize */
2380    void stw_phys(target_phys_addr_t addr, uint32_t val)
2381    {
2382        uint16_t v = tswap16(val);
2383        cpu_physical_memory_write(addr, (const uint8_t *)&v, 2);
2384    }
2385    
2386    /* XXX: optimize */
2387    void stq_phys(target_phys_addr_t addr, uint64_t val)
2388    {
2389        val = tswap64(val);
2390        cpu_physical_memory_write(addr, (const uint8_t *)&val, 8);
2391    }
2392    
2393  #endif  #endif
2394    
2395  /* virtual memory access for debug */  /* virtual memory access for debug */

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26