mem_helper.c (10eab96e1a03538ad658faed2afb680f041cc361) mem_helper.c (21b5f5464f97f68f025c86330146d038d2ee79ad)
1/*
2 * PowerPC memory access emulation helpers for QEMU.
3 *
4 * Copyright (c) 2003-2007 Jocelyn Mayer
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

--- 390 unchanged lines hidden (view full) ---

399 r->element[LO_IDX ? index : (adjust - index)] = \
400 swap(access(env, addr, GETPC())); \
401 } else { \
402 r->element[LO_IDX ? index : (adjust - index)] = \
403 access(env, addr, GETPC()); \
404 } \
405 }
406#define I(x) (x)
1/*
2 * PowerPC memory access emulation helpers for QEMU.
3 *
4 * Copyright (c) 2003-2007 Jocelyn Mayer
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

--- 390 unchanged lines hidden (view full) ---

399 r->element[LO_IDX ? index : (adjust - index)] = \
400 swap(access(env, addr, GETPC())); \
401 } else { \
402 r->element[LO_IDX ? index : (adjust - index)] = \
403 access(env, addr, GETPC()); \
404 } \
405 }
406#define I(x) (x)
407LVE(lvebx, cpu_ldub_data_ra, I, u8)
408LVE(lvehx, cpu_lduw_data_ra, bswap16, u16)
409LVE(lvewx, cpu_ldl_data_ra, bswap32, u32)
407LVE(LVEBX, cpu_ldub_data_ra, I, u8)
408LVE(LVEHX, cpu_lduw_data_ra, bswap16, u16)
409LVE(LVEWX, cpu_ldl_data_ra, bswap32, u32)
410#undef I
411#undef LVE
412
413#define STVE(name, access, swap, element) \
414 void helper_##name(CPUPPCState *env, ppc_avr_t *r, \
415 target_ulong addr) \
416 { \
417 size_t n_elems = ARRAY_SIZE(r->element); \

--- 9 unchanged lines hidden (view full) ---

427 (adjust - index)]), \
428 GETPC()); \
429 } else { \
430 access(env, addr, r->element[LO_IDX ? index : \
431 (adjust - index)], GETPC()); \
432 } \
433 }
434#define I(x) (x)
410#undef I
411#undef LVE
412
413#define STVE(name, access, swap, element) \
414 void helper_##name(CPUPPCState *env, ppc_avr_t *r, \
415 target_ulong addr) \
416 { \
417 size_t n_elems = ARRAY_SIZE(r->element); \

--- 9 unchanged lines hidden (view full) ---

427 (adjust - index)]), \
428 GETPC()); \
429 } else { \
430 access(env, addr, r->element[LO_IDX ? index : \
431 (adjust - index)], GETPC()); \
432 } \
433 }
434#define I(x) (x)
435STVE(stvebx, cpu_stb_data_ra, I, u8)
436STVE(stvehx, cpu_stw_data_ra, bswap16, u16)
437STVE(stvewx, cpu_stl_data_ra, bswap32, u32)
435STVE(STVEBX, cpu_stb_data_ra, I, u8)
436STVE(STVEHX, cpu_stw_data_ra, bswap16, u16)
437STVE(STVEWX, cpu_stl_data_ra, bswap32, u32)
438#undef I
439#undef LVE
440
441#ifdef TARGET_PPC64
442#define GET_NB(rb) ((rb >> 56) & 0xFF)
443
444#define VSX_LXVL(name, lj) \
445void helper_##name(CPUPPCState *env, target_ulong addr, \

--- 85 unchanged lines hidden ---
438#undef I
439#undef LVE
440
441#ifdef TARGET_PPC64
442#define GET_NB(rb) ((rb >> 56) & 0xFF)
443
444#define VSX_LXVL(name, lj) \
445void helper_##name(CPUPPCState *env, target_ulong addr, \

--- 85 unchanged lines hidden ---