2003-11-23 17:55:54 +03:00
|
|
|
/*
|
2005-07-03 00:59:34 +04:00
|
|
|
* PowerPC emulation micro-operations for qemu.
|
2007-09-17 01:08:06 +04:00
|
|
|
*
|
2007-03-07 11:32:30 +03:00
|
|
|
* Copyright (c) 2003-2007 Jocelyn Mayer
|
2003-11-23 17:55:54 +03:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2004-04-13 00:39:29 +04:00
|
|
|
//#define DEBUG_OP
|
|
|
|
|
2003-11-23 17:55:54 +03:00
|
|
|
#include "config.h"
|
|
|
|
#include "exec.h"
|
2007-10-28 15:54:53 +03:00
|
|
|
#include "host-utils.h"
|
2007-10-26 01:35:50 +04:00
|
|
|
#include "helper_regs.h"
|
2007-03-07 11:32:30 +03:00
|
|
|
#include "op_helper.h"
|
2003-11-23 17:55:54 +03:00
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
/* Segment registers load and store */
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_sr (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = env->sr[T1];
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_store_sr (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
|
|
|
do_store_sr(env, T1, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-10-06 02:06:02 +04:00
|
|
|
#if defined(TARGET_PPC64)
|
|
|
|
void OPPROTO op_load_slb (void)
|
|
|
|
{
|
|
|
|
T0 = ppc_load_slb(env, T1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_slb (void)
|
|
|
|
{
|
|
|
|
ppc_store_slb(env, T1, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif /* defined(TARGET_PPC64) */
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_sdr1 (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = env->sdr1;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_store_sdr1 (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
|
|
|
do_store_sdr1(env, T0);
|
2003-11-23 17:55:54 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-17 17:02:15 +03:00
|
|
|
#if defined (TARGET_PPC64)
|
|
|
|
void OPPROTO op_load_asr (void)
|
|
|
|
{
|
|
|
|
T0 = env->asr;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_asr (void)
|
|
|
|
{
|
|
|
|
ppc_store_asr(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-08-25 03:16:35 +04:00
|
|
|
void OPPROTO op_load_msr (void)
|
|
|
|
{
|
|
|
|
T0 = env->msr;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_msr (void)
|
|
|
|
{
|
|
|
|
do_store_msr();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined (TARGET_PPC64)
|
|
|
|
void OPPROTO op_store_msr_32 (void)
|
|
|
|
{
|
|
|
|
T0 = (env->msr & ~0xFFFFFFFFULL) | (T0 & 0xFFFFFFFF);
|
|
|
|
do_store_msr();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-10-26 01:35:50 +04:00
|
|
|
void OPPROTO op_update_riee (void)
|
2007-03-17 17:02:15 +03:00
|
|
|
{
|
2007-10-26 01:35:50 +04:00
|
|
|
/* We don't call do_store_msr here as we won't trigger
|
|
|
|
* any special case nor change hflags
|
|
|
|
*/
|
|
|
|
T0 &= (1 << MSR_RI) | (1 << MSR_EE);
|
|
|
|
env->msr &= ~(1 << MSR_RI) | (1 << MSR_EE);
|
|
|
|
env->msr |= T0;
|
2007-03-17 17:02:15 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
2004-01-05 01:58:38 +03:00
|
|
|
|
|
|
|
/* SPR */
|
2007-04-16 11:10:48 +04:00
|
|
|
void OPPROTO op_load_spr (void)
|
|
|
|
{
|
|
|
|
T0 = env->spr[PARAM1];
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_spr (void)
|
|
|
|
{
|
|
|
|
env->spr[PARAM1] = T0;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_load_dump_spr (void)
|
|
|
|
{
|
|
|
|
T0 = ppc_load_dump_spr(PARAM1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_dump_spr (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-04-16 11:10:48 +04:00
|
|
|
ppc_store_dump_spr(PARAM1, T0);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-04-16 11:10:48 +04:00
|
|
|
void OPPROTO op_mask_spr (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-04-16 11:10:48 +04:00
|
|
|
env->spr[PARAM1] &= ~T0;
|
2003-11-23 17:55:54 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_tbl (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = cpu_ppc_load_tbl(env);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_tbu (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = cpu_ppc_load_tbu(env);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-30 04:38:38 +04:00
|
|
|
void OPPROTO op_load_atbl (void)
|
|
|
|
{
|
|
|
|
T0 = cpu_ppc_load_atbl(env);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_load_atbu (void)
|
|
|
|
{
|
|
|
|
T0 = cpu_ppc_load_atbu(env);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_store_tbl (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
cpu_ppc_store_tbl(env, T0);
|
2003-11-23 17:55:54 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_store_tbu (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
cpu_ppc_store_tbu(env, T0);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-30 04:38:38 +04:00
|
|
|
void OPPROTO op_store_atbl (void)
|
|
|
|
{
|
|
|
|
cpu_ppc_store_atbl(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_atbu (void)
|
|
|
|
{
|
|
|
|
cpu_ppc_store_atbu(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_decr (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = cpu_ppc_load_decr(env);
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
2004-05-21 16:59:32 +04:00
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_store_decr (void)
|
2004-05-21 16:59:32 +04:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
cpu_ppc_store_decr(env, T0);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_ibat (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = env->IBAT[PARAM1][PARAM2];
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
2004-01-05 01:58:38 +03:00
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_store_ibatu (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2005-07-03 00:59:34 +04:00
|
|
|
do_store_ibatu(env, PARAM1, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_store_ibatl (void)
|
2005-07-03 00:59:34 +04:00
|
|
|
{
|
|
|
|
#if 1
|
|
|
|
env->IBAT[1][PARAM1] = T0;
|
|
|
|
#else
|
|
|
|
do_store_ibatl(env, PARAM1, T0);
|
|
|
|
#endif
|
|
|
|
RETURN();
|
2004-01-05 01:58:38 +03:00
|
|
|
}
|
|
|
|
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_load_dbat (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-09-17 12:21:54 +04:00
|
|
|
T0 = env->DBAT[PARAM1][PARAM2];
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
2004-01-05 01:58:38 +03:00
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_store_dbatu (void)
|
2005-07-03 00:59:34 +04:00
|
|
|
{
|
|
|
|
do_store_dbatu(env, PARAM1, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_store_dbatl (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2005-07-03 00:59:34 +04:00
|
|
|
#if 1
|
|
|
|
env->DBAT[1][PARAM1] = T0;
|
|
|
|
#else
|
|
|
|
do_store_dbatl(env, PARAM1, T0);
|
|
|
|
#endif
|
|
|
|
RETURN();
|
2004-01-05 01:58:38 +03:00
|
|
|
}
|
2007-03-07 11:32:30 +03:00
|
|
|
#endif /* !defined(CONFIG_USER_ONLY) */
|
2004-01-05 01:58:38 +03:00
|
|
|
|
2003-11-23 17:55:54 +03:00
|
|
|
/*** Integer shift ***/
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_srli_T1 (void)
|
|
|
|
{
|
2007-03-17 17:02:15 +03:00
|
|
|
T1 = (uint32_t)T1 >> PARAM1;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2004-01-05 01:58:38 +03:00
|
|
|
/* Load and store */
|
|
|
|
#define MEMSUFFIX _raw
|
2007-03-07 11:32:30 +03:00
|
|
|
#include "op_helper.h"
|
2004-01-05 01:58:38 +03:00
|
|
|
#include "op_mem.h"
|
2004-04-13 00:39:29 +04:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
2004-01-05 01:58:38 +03:00
|
|
|
#define MEMSUFFIX _user
|
2007-03-07 11:32:30 +03:00
|
|
|
#include "op_helper.h"
|
2004-01-05 01:58:38 +03:00
|
|
|
#include "op_mem.h"
|
|
|
|
#define MEMSUFFIX _kernel
|
2007-03-07 11:32:30 +03:00
|
|
|
#include "op_helper.h"
|
2004-01-05 01:58:38 +03:00
|
|
|
#include "op_mem.h"
|
2007-10-14 12:27:14 +04:00
|
|
|
#define MEMSUFFIX _hypv
|
|
|
|
#include "op_helper.h"
|
|
|
|
#include "op_mem.h"
|
|
|
|
#endif
|
2004-01-05 01:58:38 +03:00
|
|
|
|
2004-05-24 02:18:12 +04:00
|
|
|
/* Special op to check and maybe clear reservation */
|
2007-03-17 17:02:15 +03:00
|
|
|
void OPPROTO op_check_reservation (void)
|
2004-05-24 02:18:12 +04:00
|
|
|
{
|
2005-07-05 02:17:05 +04:00
|
|
|
if ((uint32_t)env->reserve == (uint32_t)(T0 & ~0x00000003))
|
2007-11-12 03:50:50 +03:00
|
|
|
env->reserve = (target_ulong)-1ULL;
|
2004-05-24 02:18:12 +04:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-17 17:02:15 +03:00
|
|
|
#if defined(TARGET_PPC64)
|
|
|
|
void OPPROTO op_check_reservation_64 (void)
|
|
|
|
{
|
|
|
|
if ((uint64_t)env->reserve == (uint64_t)(T0 & ~0x00000003))
|
2007-11-12 03:04:48 +03:00
|
|
|
env->reserve = (target_ulong)-1ULL;
|
2007-03-17 17:02:15 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-09-30 17:03:23 +04:00
|
|
|
void OPPROTO op_wait (void)
|
|
|
|
{
|
|
|
|
env->halted = 1;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2004-01-05 01:58:38 +03:00
|
|
|
/* Return from interrupt */
|
2007-03-07 11:32:30 +03:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
void OPPROTO op_rfi (void)
|
2003-11-23 19:58:08 +03:00
|
|
|
{
|
2005-07-05 02:17:05 +04:00
|
|
|
do_rfi();
|
2004-01-04 17:57:11 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
2007-03-17 17:02:15 +03:00
|
|
|
|
|
|
|
#if defined(TARGET_PPC64)
|
2007-03-23 12:45:27 +03:00
|
|
|
void OPPROTO op_rfid (void)
|
|
|
|
{
|
|
|
|
do_rfid();
|
|
|
|
RETURN();
|
|
|
|
}
|
2007-09-30 17:03:23 +04:00
|
|
|
|
|
|
|
void OPPROTO op_hrfid (void)
|
|
|
|
{
|
|
|
|
do_hrfid();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
2007-10-01 05:32:49 +04:00
|
|
|
|
|
|
|
/* Exception vectors */
|
|
|
|
void OPPROTO op_store_excp_prefix (void)
|
|
|
|
{
|
|
|
|
T0 &= env->ivpr_mask;
|
|
|
|
env->excp_prefix = T0;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_excp_vector (void)
|
|
|
|
{
|
|
|
|
T0 &= env->ivor_mask;
|
|
|
|
env->excp_vectors[PARAM1] = T0;
|
|
|
|
RETURN();
|
|
|
|
}
|
2007-03-07 11:32:30 +03:00
|
|
|
#endif
|
2004-01-04 17:57:11 +03:00
|
|
|
|
2004-01-05 01:58:38 +03:00
|
|
|
/* Trap word */
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_tw (void)
|
2004-01-04 17:57:11 +03:00
|
|
|
{
|
2007-03-07 11:32:30 +03:00
|
|
|
do_tw(PARAM1);
|
2004-01-04 17:57:11 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-17 17:02:15 +03:00
|
|
|
#if defined(TARGET_PPC64)
|
|
|
|
void OPPROTO op_td (void)
|
|
|
|
{
|
|
|
|
do_td(PARAM1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
2004-01-05 01:58:38 +03:00
|
|
|
/* tlbia */
|
2007-09-17 12:21:54 +04:00
|
|
|
void OPPROTO op_tlbia (void)
|
2004-01-04 17:57:11 +03:00
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
ppc_tlb_invalidate_all(env);
|
2004-01-05 01:58:38 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* tlbie */
|
2007-03-17 17:02:15 +03:00
|
|
|
void OPPROTO op_tlbie (void)
|
2004-01-05 01:58:38 +03:00
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
ppc_tlb_invalidate_one(env, (uint32_t)T0);
|
2004-01-04 17:57:11 +03:00
|
|
|
RETURN();
|
2003-11-23 19:58:08 +03:00
|
|
|
}
|
2007-03-17 17:02:15 +03:00
|
|
|
|
|
|
|
#if defined(TARGET_PPC64)
|
|
|
|
void OPPROTO op_tlbie_64 (void)
|
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
ppc_tlb_invalidate_one(env, T0);
|
2007-03-17 17:02:15 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(TARGET_PPC64)
|
|
|
|
void OPPROTO op_slbia (void)
|
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
ppc_slb_invalidate_all(env);
|
2007-03-17 17:02:15 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_slbie (void)
|
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
ppc_slb_invalidate_one(env, (uint32_t)T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_slbie_64 (void)
|
|
|
|
{
|
|
|
|
ppc_slb_invalidate_one(env, T0);
|
2007-03-17 17:02:15 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
2007-03-07 11:32:30 +03:00
|
|
|
#endif
|
2005-07-03 00:59:34 +04:00
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
2007-10-01 09:16:57 +04:00
|
|
|
/* PowerPC 602/603/755 software TLB load instructions */
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_6xx_tlbld (void)
|
|
|
|
{
|
|
|
|
do_load_6xx_tlb(0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_6xx_tlbli (void)
|
|
|
|
{
|
|
|
|
do_load_6xx_tlb(1);
|
|
|
|
RETURN();
|
|
|
|
}
|
2007-10-01 09:16:57 +04:00
|
|
|
|
|
|
|
/* PowerPC 74xx software TLB load instructions */
|
|
|
|
void OPPROTO op_74xx_tlbld (void)
|
|
|
|
{
|
|
|
|
do_load_74xx_tlb(0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_74xx_tlbli (void)
|
|
|
|
{
|
|
|
|
do_load_74xx_tlb(1);
|
|
|
|
RETURN();
|
|
|
|
}
|
2007-03-07 11:32:30 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* 601 specific */
|
|
|
|
void OPPROTO op_load_601_rtcl (void)
|
|
|
|
{
|
|
|
|
T0 = cpu_ppc601_load_rtcl(env);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_load_601_rtcu (void)
|
|
|
|
{
|
|
|
|
T0 = cpu_ppc601_load_rtcu(env);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
void OPPROTO op_store_601_rtcl (void)
|
|
|
|
{
|
|
|
|
cpu_ppc601_store_rtcl(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_601_rtcu (void)
|
|
|
|
{
|
|
|
|
cpu_ppc601_store_rtcu(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-11-04 05:55:33 +03:00
|
|
|
void OPPROTO op_store_hid0_601 (void)
|
|
|
|
{
|
|
|
|
do_store_hid0_601();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_load_601_bat (void)
|
|
|
|
{
|
|
|
|
T0 = env->IBAT[PARAM1][PARAM2];
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_601_batl (void)
|
|
|
|
{
|
2007-11-04 05:55:33 +03:00
|
|
|
do_store_ibatl_601(env, PARAM1, T0);
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_601_batu (void)
|
|
|
|
{
|
2007-11-04 05:55:33 +03:00
|
|
|
do_store_ibatu_601(env, PARAM1, T0);
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif /* !defined(CONFIG_USER_ONLY) */
|
|
|
|
|
|
|
|
/* PowerPC 601 specific instructions (POWER bridge) */
|
|
|
|
/* XXX: those micro-ops need tests ! */
|
|
|
|
void OPPROTO op_POWER_abs (void)
|
|
|
|
{
|
2007-11-11 03:33:08 +03:00
|
|
|
if ((int32_t)T0 == INT32_MIN)
|
2007-03-07 11:32:30 +03:00
|
|
|
T0 = INT32_MAX;
|
2007-11-11 03:33:08 +03:00
|
|
|
else if ((int32_t)T0 < 0)
|
2007-03-07 11:32:30 +03:00
|
|
|
T0 = -T0;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_abso (void)
|
|
|
|
{
|
|
|
|
do_POWER_abso();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_clcs (void)
|
|
|
|
{
|
|
|
|
do_POWER_clcs();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_div (void)
|
|
|
|
{
|
|
|
|
do_POWER_div();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_divo (void)
|
|
|
|
{
|
|
|
|
do_POWER_divo();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_divs (void)
|
|
|
|
{
|
|
|
|
do_POWER_divs();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_divso (void)
|
|
|
|
{
|
|
|
|
do_POWER_divso();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_doz (void)
|
|
|
|
{
|
2007-03-17 17:02:15 +03:00
|
|
|
if ((int32_t)T1 > (int32_t)T0)
|
2007-03-07 11:32:30 +03:00
|
|
|
T0 = T1 - T0;
|
|
|
|
else
|
|
|
|
T0 = 0;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_dozo (void)
|
|
|
|
{
|
|
|
|
do_POWER_dozo();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_load_xer_cmp (void)
|
|
|
|
{
|
|
|
|
T2 = xer_cmp;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_maskg (void)
|
|
|
|
{
|
|
|
|
do_POWER_maskg();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_maskir (void)
|
|
|
|
{
|
|
|
|
T0 = (T0 & ~T2) | (T1 & T2);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_mul (void)
|
|
|
|
{
|
|
|
|
uint64_t tmp;
|
|
|
|
|
|
|
|
tmp = (uint64_t)T0 * (uint64_t)T1;
|
|
|
|
env->spr[SPR_MQ] = tmp >> 32;
|
|
|
|
T0 = tmp;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_mulo (void)
|
|
|
|
{
|
|
|
|
do_POWER_mulo();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_nabs (void)
|
|
|
|
{
|
|
|
|
if (T0 > 0)
|
|
|
|
T0 = -T0;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_nabso (void)
|
|
|
|
{
|
|
|
|
/* nabs never overflows */
|
|
|
|
if (T0 > 0)
|
|
|
|
T0 = -T0;
|
2008-10-21 15:28:46 +04:00
|
|
|
env->xer &= ~(1 << XER_OV);
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* XXX: factorise POWER rotates... */
|
|
|
|
void OPPROTO op_POWER_rlmi (void)
|
|
|
|
{
|
|
|
|
T0 = rotl32(T0, T2) & PARAM1;
|
2007-10-02 01:51:40 +04:00
|
|
|
T0 |= T1 & (uint32_t)PARAM2;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_rrib (void)
|
|
|
|
{
|
|
|
|
T2 &= 0x1FUL;
|
|
|
|
T0 = rotl32(T0 & INT32_MIN, T2);
|
|
|
|
T0 |= T1 & ~rotl32(INT32_MIN, T2);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sle (void)
|
|
|
|
{
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, T1);
|
|
|
|
T0 = T0 << T1;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sleq (void)
|
|
|
|
{
|
|
|
|
uint32_t tmp = env->spr[SPR_MQ];
|
|
|
|
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, T1);
|
|
|
|
T0 = T0 << T1;
|
|
|
|
T0 |= tmp >> (32 - T1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sllq (void)
|
|
|
|
{
|
2007-11-12 03:04:48 +03:00
|
|
|
uint32_t msk = UINT32_MAX;
|
2007-03-07 11:32:30 +03:00
|
|
|
|
|
|
|
msk = msk << (T1 & 0x1FUL);
|
|
|
|
if (T1 & 0x20UL)
|
|
|
|
msk = ~msk;
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
T0 = (T0 << T1) & msk;
|
|
|
|
T0 |= env->spr[SPR_MQ] & ~msk;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_slq (void)
|
|
|
|
{
|
2007-11-12 03:04:48 +03:00
|
|
|
uint32_t msk = UINT32_MAX, tmp;
|
2007-03-07 11:32:30 +03:00
|
|
|
|
|
|
|
msk = msk << (T1 & 0x1FUL);
|
|
|
|
if (T1 & 0x20UL)
|
|
|
|
msk = ~msk;
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
tmp = rotl32(T0, T1);
|
|
|
|
T0 = tmp & msk;
|
|
|
|
env->spr[SPR_MQ] = tmp;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sraq (void)
|
|
|
|
{
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, 32 - (T1 & 0x1FUL));
|
|
|
|
if (T1 & 0x20UL)
|
2007-11-12 03:04:48 +03:00
|
|
|
T0 = UINT32_MAX;
|
2007-03-07 11:32:30 +03:00
|
|
|
else
|
2007-03-17 17:02:15 +03:00
|
|
|
T0 = (int32_t)T0 >> T1;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sre (void)
|
|
|
|
{
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
2007-03-17 17:02:15 +03:00
|
|
|
T0 = (int32_t)T0 >> T1;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_srea (void)
|
|
|
|
{
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
env->spr[SPR_MQ] = T0 >> T1;
|
2007-03-17 17:02:15 +03:00
|
|
|
T0 = (int32_t)T0 >> T1;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_sreq (void)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
int32_t msk;
|
|
|
|
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
msk = INT32_MIN >> T1;
|
|
|
|
tmp = env->spr[SPR_MQ];
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
|
|
|
T0 = T0 >> T1;
|
|
|
|
T0 |= tmp & msk;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_srlq (void)
|
|
|
|
{
|
|
|
|
uint32_t tmp;
|
|
|
|
int32_t msk;
|
|
|
|
|
|
|
|
msk = INT32_MIN >> (T1 & 0x1FUL);
|
|
|
|
if (T1 & 0x20UL)
|
|
|
|
msk = ~msk;
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
tmp = env->spr[SPR_MQ];
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
|
|
|
T0 = T0 >> T1;
|
|
|
|
T0 &= msk;
|
|
|
|
T0 |= tmp & ~msk;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_srq (void)
|
|
|
|
{
|
|
|
|
T1 &= 0x1FUL;
|
|
|
|
env->spr[SPR_MQ] = rotl32(T0, 32 - T1);
|
|
|
|
T0 = T0 >> T1;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
/* POWER instructions not implemented in PowerPC 601 */
|
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
void OPPROTO op_POWER_mfsri (void)
|
|
|
|
{
|
|
|
|
T1 = T0 >> 28;
|
|
|
|
T0 = env->sr[T1];
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_rac (void)
|
|
|
|
{
|
|
|
|
do_POWER_rac();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_POWER_rfsvc (void)
|
|
|
|
{
|
|
|
|
do_POWER_rfsvc();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* PowerPC 602 specific instruction */
|
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
void OPPROTO op_602_mfrom (void)
|
|
|
|
{
|
|
|
|
do_op_602_mfrom();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* PowerPC 4xx specific micro-ops */
|
2007-03-30 14:22:46 +04:00
|
|
|
void OPPROTO op_load_dcr (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-03-30 14:22:46 +04:00
|
|
|
do_load_dcr();
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-30 14:22:46 +04:00
|
|
|
void OPPROTO op_store_dcr (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-03-30 14:22:46 +04:00
|
|
|
do_store_dcr();
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
Great rework and cleanups to ease PowerPC implementations definitions.
* cleanup cpu.h, removing definitions used only in translate.c/translate_init.c
* add new flags to define instructions sets more precisely
* various changes in MMU models definitions
* add definitions for PowerPC 440/460 support (insns and SPRs).
* add definitions for PowerPC 401/403 and 620 input pins model
* Fix definitions for most PowerPC 401, 403, 405, 440, 601, 602, 603 and 7x0
* Preliminary support for PowerPC 74xx (aka G4) without altivec.
* Code provision for other PowerPC support (7x5, 970, ...).
* New SPR and PVR defined, from PowerPC 2.04 specification and other sources
* Misc code bugs, error messages and styles fixes.
* Update status files for PowerPC cores support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3244 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-27 03:54:22 +04:00
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
2007-03-07 11:32:30 +03:00
|
|
|
/* Return from critical interrupt :
|
|
|
|
* same as rfi, except nip & MSR are loaded from SRR2/3 instead of SRR0/1
|
|
|
|
*/
|
2007-03-30 14:22:46 +04:00
|
|
|
void OPPROTO op_40x_rfci (void)
|
|
|
|
{
|
|
|
|
do_40x_rfci();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_rfci (void)
|
|
|
|
{
|
|
|
|
do_rfci();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_rfdi (void)
|
|
|
|
{
|
|
|
|
do_rfdi();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_rfmci (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-03-30 14:22:46 +04:00
|
|
|
do_rfmci();
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-30 14:22:46 +04:00
|
|
|
void OPPROTO op_wrte (void)
|
2007-03-07 11:32:30 +03:00
|
|
|
{
|
2007-10-26 01:35:50 +04:00
|
|
|
/* We don't call do_store_msr here as we won't trigger
|
|
|
|
* any special case nor change hflags
|
|
|
|
*/
|
|
|
|
T0 &= 1 << MSR_EE;
|
|
|
|
env->msr &= ~(1 << MSR_EE);
|
|
|
|
env->msr |= T0;
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-21 09:28:33 +04:00
|
|
|
void OPPROTO op_440_tlbre (void)
|
2007-09-19 09:44:04 +04:00
|
|
|
{
|
2007-09-21 09:28:33 +04:00
|
|
|
do_440_tlbre(PARAM1);
|
2007-09-19 09:44:04 +04:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-21 09:28:33 +04:00
|
|
|
void OPPROTO op_440_tlbsx (void)
|
2007-09-19 09:44:04 +04:00
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
T0 = ppcemb_tlb_search(env, T0, env->spr[SPR_440_MMUCR] & 0xFF);
|
2007-09-19 09:44:04 +04:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-10-01 05:51:12 +04:00
|
|
|
void OPPROTO op_4xx_tlbsx_check (void)
|
2007-09-19 09:44:04 +04:00
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
int tmp;
|
|
|
|
|
|
|
|
tmp = xer_so;
|
2007-11-12 03:04:48 +03:00
|
|
|
if ((int)T0 != -1)
|
2007-10-01 05:51:12 +04:00
|
|
|
tmp |= 0x02;
|
|
|
|
env->crf[0] = tmp;
|
2007-09-19 09:44:04 +04:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-09-21 09:28:33 +04:00
|
|
|
void OPPROTO op_440_tlbwe (void)
|
2007-09-19 09:44:04 +04:00
|
|
|
{
|
2007-09-21 09:28:33 +04:00
|
|
|
do_440_tlbwe(PARAM1);
|
2007-09-19 09:44:04 +04:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_4xx_tlbre_lo (void)
|
|
|
|
{
|
|
|
|
do_4xx_tlbre_lo();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_4xx_tlbre_hi (void)
|
|
|
|
{
|
|
|
|
do_4xx_tlbre_hi();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_4xx_tlbsx (void)
|
|
|
|
{
|
2007-10-01 05:51:12 +04:00
|
|
|
T0 = ppcemb_tlb_search(env, T0, env->spr[SPR_40x_PID]);
|
2007-03-07 11:32:30 +03:00
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_4xx_tlbwe_lo (void)
|
|
|
|
{
|
|
|
|
do_4xx_tlbwe_lo();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_4xx_tlbwe_hi (void)
|
|
|
|
{
|
|
|
|
do_4xx_tlbwe_hi();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* SPR micro-ops */
|
|
|
|
/* 440 specific */
|
|
|
|
void OPPROTO op_440_dlmzb (void)
|
|
|
|
{
|
|
|
|
do_440_dlmzb();
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_440_dlmzb_update_Rc (void)
|
|
|
|
{
|
|
|
|
if (T0 == 8)
|
|
|
|
T0 = 0x2;
|
|
|
|
else if (T0 < 4)
|
|
|
|
T0 = 0x4;
|
|
|
|
else
|
|
|
|
T0 = 0x8;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
#if !defined(CONFIG_USER_ONLY)
|
|
|
|
void OPPROTO op_store_pir (void)
|
2005-07-03 00:59:34 +04:00
|
|
|
{
|
|
|
|
env->spr[SPR_PIR] = T0 & 0x0000000FUL;
|
|
|
|
RETURN();
|
|
|
|
}
|
2007-03-07 11:32:30 +03:00
|
|
|
|
|
|
|
void OPPROTO op_load_403_pb (void)
|
|
|
|
{
|
|
|
|
do_load_403_pb(PARAM1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_403_pb (void)
|
|
|
|
{
|
|
|
|
do_store_403_pb(PARAM1);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_load_40x_pit (void)
|
|
|
|
{
|
|
|
|
T0 = load_40x_pit(env);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_40x_pit (void)
|
|
|
|
{
|
|
|
|
store_40x_pit(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-04-17 00:09:45 +04:00
|
|
|
void OPPROTO op_store_40x_dbcr0 (void)
|
|
|
|
{
|
|
|
|
store_40x_dbcr0(env, T0);
|
2007-09-30 17:03:23 +04:00
|
|
|
RETURN();
|
2007-04-17 00:09:45 +04:00
|
|
|
}
|
|
|
|
|
2007-04-24 10:44:14 +04:00
|
|
|
void OPPROTO op_store_40x_sler (void)
|
|
|
|
{
|
|
|
|
store_40x_sler(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
2007-03-07 11:32:30 +03:00
|
|
|
void OPPROTO op_store_booke_tcr (void)
|
|
|
|
{
|
|
|
|
store_booke_tcr(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_store_booke_tsr (void)
|
|
|
|
{
|
|
|
|
store_booke_tsr(env, T0);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
#endif /* !defined(CONFIG_USER_ONLY) */
|
2007-03-21 01:11:31 +03:00
|
|
|
|
|
|
|
/* SPE extension */
|
|
|
|
void OPPROTO op_splatw_T1_64 (void)
|
|
|
|
{
|
|
|
|
T1_64 = (T1_64 << 32) | (T1_64 & 0x00000000FFFFFFFFULL);
|
2007-03-23 01:17:08 +03:00
|
|
|
RETURN();
|
2007-03-21 01:11:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_extsh_T1_64 (void)
|
|
|
|
{
|
|
|
|
T1_64 = (int32_t)((int16_t)T1_64);
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_sli16_T1_64 (void)
|
|
|
|
{
|
|
|
|
T1_64 = T1_64 << 16;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_sli32_T1_64 (void)
|
|
|
|
{
|
|
|
|
T1_64 = T1_64 << 32;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
void OPPROTO op_srli32_T1_64 (void)
|
|
|
|
{
|
|
|
|
T1_64 = T1_64 >> 32;
|
|
|
|
RETURN();
|
|
|
|
}
|
|
|
|
|
|
|
|
|