forked from Imagelibrary/binutils-gdb
2002-06-03 Chris Demetriou <cgd@broadcom.com>
Ed Satterthwaite <ehs@broadcom.com> * configure.in (mipsisa64sb1*-*-*): New target for supporting Broadcom SiByte SB-1 processor configurations. * configure: Regenerate. * sb1.igen: New file. * mips.igen: Include sb1.igen. (sb1): New model. * Makefile.in (IGEN_INCLUDE): Add sb1.igen. * mdmx.igen: Add "sb1" model to all appropriate functions and instructions. * mdmx.c (AbsDiffOB, AvgOB, AccAbsDiffOB): New functions. (ob_func, ob_acc): Reference the above. (qh_acc): Adjust to keep the same size as ob_acc. * sim-main.h (status_SBX, MX_VECT_ABSD, MX_VECT_AVG, MX_AbsDiff) (MX_Avg, MX_VECT_ABSDA, MX_AbsDiffC): New macros.
This commit is contained in:
@@ -250,7 +250,6 @@ MsgnQH(signed16 ts, signed16 tt)
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
static signed16
|
||||
SRAQH(signed16 ts, signed16 tt)
|
||||
{
|
||||
@@ -259,6 +258,21 @@ SRAQH(signed16 ts, signed16 tt)
|
||||
}
|
||||
|
||||
|
||||
/* "pabsdiff" and "pavg" are defined only for OB format. */
|
||||
|
||||
static unsigned8
|
||||
AbsDiffOB(unsigned8 ts, unsigned8 tt)
|
||||
{
|
||||
return (ts >= tt ? ts - tt : tt - ts);
|
||||
}
|
||||
|
||||
static unsigned8
|
||||
AvgOB(unsigned8 ts, unsigned8 tt)
|
||||
{
|
||||
return ((unsigned32)ts + (unsigned32)tt + 1) >> 1;
|
||||
}
|
||||
|
||||
|
||||
/* Dispatch tables for operations that update a CPR. */
|
||||
|
||||
static const QH_FUNC qh_func[] = {
|
||||
@@ -270,7 +284,7 @@ static const QH_FUNC qh_func[] = {
|
||||
static const OB_FUNC ob_func[] = {
|
||||
AndOB, NorOB, OrOB, XorOB, SLLOB, SRLOB,
|
||||
AddOB, SubOB, MinOB, MaxOB,
|
||||
MulOB, NULL, NULL, NULL, NULL
|
||||
MulOB, NULL, NULL, AbsDiffOB, AvgOB
|
||||
};
|
||||
|
||||
/* Auxiliary functions for CPR updates. */
|
||||
@@ -743,17 +757,26 @@ AccSubLOB(signed24 *a, unsigned8 ts, unsigned8 tt)
|
||||
*a = (signed24)ts - (signed24)tt;
|
||||
}
|
||||
|
||||
static void
|
||||
AccAbsDiffOB(signed24 *a, unsigned8 ts, unsigned8 tt)
|
||||
{
|
||||
unsigned8 t = (ts >= tt ? ts - tt : tt - ts);
|
||||
*a += (signed24)t;
|
||||
}
|
||||
|
||||
|
||||
/* Dispatch tables for operations that update a CPR. */
|
||||
|
||||
static const QH_ACC qh_acc[] = {
|
||||
AccAddAQH, AccAddAQH, AccMulAQH, AccMulLQH,
|
||||
SubMulAQH, SubMulLQH, AccSubAQH, AccSubLQH
|
||||
SubMulAQH, SubMulLQH, AccSubAQH, AccSubLQH,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const OB_ACC ob_acc[] = {
|
||||
AccAddAOB, AccAddLOB, AccMulAOB, AccMulLOB,
|
||||
SubMulAOB, SubMulLOB, AccSubAOB, AccSubLOB
|
||||
SubMulAOB, SubMulLOB, AccSubAOB, AccSubLOB,
|
||||
AccAbsDiffOB
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user