2009-09-08 12:08:10 +00:00
|
|
|
/* PCSX2 - PS2 Emulator for PCs
|
2010-05-03 14:08:02 +00:00
|
|
|
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
2010-04-25 00:31:27 +00:00
|
|
|
*
|
2009-09-08 12:08:10 +00:00
|
|
|
* PCSX2 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 Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
2009-04-21 05:29:14 +00:00
|
|
|
*
|
2009-09-08 12:08:10 +00:00
|
|
|
* PCSX2 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
2009-04-21 05:29:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2009-10-24 21:43:28 +00:00
|
|
|
namespace x86Emitter {
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2009-10-24 21:43:28 +00:00
|
|
|
struct xImplSimd_MinMax
|
2009-04-21 05:29:14 +00:00
|
|
|
{
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE PS; // packed single precision
|
|
|
|
const xImplSimd_DestRegSSE PD; // packed double precision
|
|
|
|
const xImplSimd_DestRegSSE SS; // scalar single precision
|
|
|
|
const xImplSimd_DestRegSSE SD; // scalar double precision
|
2009-04-21 05:29:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
2010-04-25 00:31:27 +00:00
|
|
|
//
|
2009-10-24 21:43:28 +00:00
|
|
|
struct xImplSimd_Compare
|
2009-04-21 05:29:14 +00:00
|
|
|
{
|
2009-10-24 21:43:28 +00:00
|
|
|
SSE2_ComparisonType CType;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2009-10-24 21:43:28 +00:00
|
|
|
void PS( const xRegisterSSE& to, const xRegisterSSE& from ) const;
|
|
|
|
void PS( const xRegisterSSE& to, const ModSibBase& from ) const;
|
|
|
|
|
|
|
|
void PD( const xRegisterSSE& to, const xRegisterSSE& from ) const;
|
|
|
|
void PD( const xRegisterSSE& to, const ModSibBase& from ) const;
|
|
|
|
|
|
|
|
void SS( const xRegisterSSE& to, const xRegisterSSE& from ) const;
|
|
|
|
void SS( const xRegisterSSE& to, const ModSibBase& from ) const;
|
|
|
|
|
|
|
|
void SD( const xRegisterSSE& to, const xRegisterSSE& from ) const;
|
|
|
|
void SD( const xRegisterSSE& to, const ModSibBase& from ) const;
|
2009-04-21 05:29:14 +00:00
|
|
|
};
|
|
|
|
|
2009-05-19 23:37:20 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Compare scalar floating point values and set EFLAGS (Ordered or Unordered)
|
|
|
|
//
|
2009-10-24 21:43:28 +00:00
|
|
|
struct xImplSimd_COMI
|
2009-05-19 23:37:20 +00:00
|
|
|
{
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE SS;
|
|
|
|
const xImplSimd_DestRegSSE SD;
|
2009-05-19 23:37:20 +00:00
|
|
|
};
|
|
|
|
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2009-10-24 21:43:28 +00:00
|
|
|
struct xImplSimd_PCompare
|
2009-04-21 05:29:14 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Compare packed bytes for equality.
|
|
|
|
// If a data element in dest is equal to the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither EQB;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed words for equality.
|
|
|
|
// If a data element in dest is equal to the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither EQW;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed doublewords [32-bits] for equality.
|
|
|
|
// If a data element in dest is equal to the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither EQD;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed signed bytes for greater than.
|
|
|
|
// If a data element in dest is greater than the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither GTB;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed signed words for greater than.
|
|
|
|
// If a data element in dest is greater than the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither GTW;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed signed doublewords [32-bits] for greater than.
|
|
|
|
// If a data element in dest is greater than the corresponding date element src, the
|
|
|
|
// corresponding data element in dest is set to all 1s; otherwise, it is set to all 0s.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither GTD;
|
2009-04-21 05:29:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
2010-04-25 00:31:27 +00:00
|
|
|
//
|
2009-10-24 21:43:28 +00:00
|
|
|
struct xImplSimd_PMinMax
|
2009-04-21 05:29:14 +00:00
|
|
|
{
|
|
|
|
// Compare packed unsigned byte integers in dest to src and store packed min/max
|
|
|
|
// values in dest.
|
|
|
|
// Operation can be performed on either MMX or SSE operands.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither UB;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
|
|
|
// Compare packed signed word integers in dest to src and store packed min/max
|
|
|
|
// values in dest.
|
|
|
|
// Operation can be performed on either MMX or SSE operands.
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegEither SW;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2010-04-25 00:31:27 +00:00
|
|
|
// [SSE-4.1] Compare packed signed byte integers in dest to src and store
|
2009-04-21 05:29:14 +00:00
|
|
|
// packed min/max values in dest. (SSE operands only)
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE SB;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2010-04-25 00:31:27 +00:00
|
|
|
// [SSE-4.1] Compare packed signed doubleword integers in dest to src and store
|
2009-04-21 05:29:14 +00:00
|
|
|
// packed min/max values in dest. (SSE operands only)
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE SD;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2010-04-25 00:31:27 +00:00
|
|
|
// [SSE-4.1] Compare packed unsigned word integers in dest to src and store
|
2009-04-21 05:29:14 +00:00
|
|
|
// packed min/max values in dest. (SSE operands only)
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE UW;
|
2009-04-21 05:29:14 +00:00
|
|
|
|
2010-04-25 00:31:27 +00:00
|
|
|
// [SSE-4.1] Compare packed unsigned doubleword integers in dest to src and store
|
2009-04-21 05:29:14 +00:00
|
|
|
// packed min/max values in dest. (SSE operands only)
|
2009-10-24 21:43:28 +00:00
|
|
|
const xImplSimd_DestRegSSE UD;
|
2009-04-21 05:29:14 +00:00
|
|
|
};
|
2009-10-24 21:43:28 +00:00
|
|
|
|
|
|
|
} // end namespace x86Emitter
|
|
|
|
|