Commit 564e571add668fefe5e9e5752aa87f721c62efa8

Authored by aurel32
1 parent e33e94f9

target-ppc: add gen_avr_ptr function.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6098 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 0 deletions
target-ppc/translate.c
... ... @@ -6083,6 +6083,13 @@ GEN_HANDLER2(icbt_440, &quot;icbt&quot;, 0x1F, 0x16, 0x00, 0x03E00001, PPC_BOOKE)
6083 6083 /*** Altivec vector extension ***/
6084 6084 /* Altivec registers moves */
6085 6085  
  6086 +static always_inline TCGv_ptr gen_avr_ptr(int reg)
  6087 +{
  6088 + TCGv_ptr r = tcg_temp_new();
  6089 + tcg_gen_addi_ptr(r, cpu_env, offsetof(CPUPPCState, avr[reg]));
  6090 + return r;
  6091 +}
  6092 +
6086 6093 #define GEN_VR_LDX(name, opc2, opc3) \
6087 6094 GEN_HANDLER(name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC) \
6088 6095 { \
... ...