2009-03-23 09:10:32 +00:00
|
|
|
/*====================================================================
|
|
|
|
|
|
|
|
filename: opcodes.h
|
|
|
|
project: GameCube DSP Tool (gcdsp)
|
|
|
|
created: 2005.03.04
|
|
|
|
mail: duddie@walla.com
|
|
|
|
|
|
|
|
Copyright (c) 2005 Duddie
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program 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 this program; if not, write to the Free Software
|
2012-02-02 14:02:39 +01:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-03-23 09:10:32 +00:00
|
|
|
|
|
|
|
====================================================================*/
|
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2009-04-12 10:21:40 +00:00
|
|
|
|
|
|
|
#include "DSPTables.h"
|
|
|
|
|
|
|
|
// Extended opcode support.
|
2010-03-22 13:46:00 +00:00
|
|
|
// Many opcode have the lower 0xFF (some only 0x7f) free - there, an opcode extension
|
2013-10-29 01:23:17 -04:00
|
|
|
// can be stored.
|
2009-04-12 10:21:40 +00:00
|
|
|
|
2009-04-14 11:43:44 +00:00
|
|
|
namespace DSPInterpreter
|
|
|
|
{
|
|
|
|
namespace Ext
|
2013-10-29 01:23:17 -04:00
|
|
|
{
|
2010-03-24 05:05:25 +00:00
|
|
|
void l(const UDSPInstruction opc);
|
|
|
|
void ln(const UDSPInstruction opc);
|
|
|
|
void ls(const UDSPInstruction opc);
|
|
|
|
void lsn(const UDSPInstruction opc);
|
|
|
|
void lsm(const UDSPInstruction opc);
|
|
|
|
void lsnm(const UDSPInstruction opc);
|
|
|
|
void sl(const UDSPInstruction opc);
|
|
|
|
void sln(const UDSPInstruction opc);
|
|
|
|
void slm(const UDSPInstruction opc);
|
|
|
|
void slnm(const UDSPInstruction opc);
|
|
|
|
void s(const UDSPInstruction opc);
|
|
|
|
void sn(const UDSPInstruction opc);
|
|
|
|
void ld(const UDSPInstruction opc);
|
Core/DSP: Split extended opcode 0xc0/mask 0xc0 to account for 0xc3/mask 0xc3 variant
In assembly, these are 'ld $ax0.d,$ax1.r,@$arS with their n,m and nm variants,
which have been special cased for S==3. The regular 'ld can be decomposed
into lrri $ax0.d,@$arS and lrri $ax1.r,@$ar3, while the S==3 case decomposes
to lrri $axR.h,@$arD and lrri $axR.l,@$ar3. The latter variant will be
disassembled to 'ldax $axR,@$arD after this change. The assembler recognizes
both the new 'ldax variant and the old 'ld with @$ar3 but the disassembler
only outputs 'ldax. Besides the readability, this allows for more correct
register use analysis(when it's done).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7413 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-25 22:28:18 +00:00
|
|
|
void ldax(const UDSPInstruction opc);
|
2010-03-24 05:05:25 +00:00
|
|
|
void ldn(const UDSPInstruction opc);
|
Core/DSP: Split extended opcode 0xc0/mask 0xc0 to account for 0xc3/mask 0xc3 variant
In assembly, these are 'ld $ax0.d,$ax1.r,@$arS with their n,m and nm variants,
which have been special cased for S==3. The regular 'ld can be decomposed
into lrri $ax0.d,@$arS and lrri $ax1.r,@$ar3, while the S==3 case decomposes
to lrri $axR.h,@$arD and lrri $axR.l,@$ar3. The latter variant will be
disassembled to 'ldax $axR,@$arD after this change. The assembler recognizes
both the new 'ldax variant and the old 'ld with @$ar3 but the disassembler
only outputs 'ldax. Besides the readability, this allows for more correct
register use analysis(when it's done).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7413 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-25 22:28:18 +00:00
|
|
|
void ldaxn(const UDSPInstruction opc);
|
2010-03-24 05:05:25 +00:00
|
|
|
void ldm(const UDSPInstruction opc);
|
Core/DSP: Split extended opcode 0xc0/mask 0xc0 to account for 0xc3/mask 0xc3 variant
In assembly, these are 'ld $ax0.d,$ax1.r,@$arS with their n,m and nm variants,
which have been special cased for S==3. The regular 'ld can be decomposed
into lrri $ax0.d,@$arS and lrri $ax1.r,@$ar3, while the S==3 case decomposes
to lrri $axR.h,@$arD and lrri $axR.l,@$ar3. The latter variant will be
disassembled to 'ldax $axR,@$arD after this change. The assembler recognizes
both the new 'ldax variant and the old 'ld with @$ar3 but the disassembler
only outputs 'ldax. Besides the readability, this allows for more correct
register use analysis(when it's done).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7413 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-25 22:28:18 +00:00
|
|
|
void ldaxm(const UDSPInstruction opc);
|
2010-03-24 05:05:25 +00:00
|
|
|
void ldnm(const UDSPInstruction opc);
|
Core/DSP: Split extended opcode 0xc0/mask 0xc0 to account for 0xc3/mask 0xc3 variant
In assembly, these are 'ld $ax0.d,$ax1.r,@$arS with their n,m and nm variants,
which have been special cased for S==3. The regular 'ld can be decomposed
into lrri $ax0.d,@$arS and lrri $ax1.r,@$ar3, while the S==3 case decomposes
to lrri $axR.h,@$arD and lrri $axR.l,@$ar3. The latter variant will be
disassembled to 'ldax $axR,@$arD after this change. The assembler recognizes
both the new 'ldax variant and the old 'ld with @$ar3 but the disassembler
only outputs 'ldax. Besides the readability, this allows for more correct
register use analysis(when it's done).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7413 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-25 22:28:18 +00:00
|
|
|
void ldaxnm(const UDSPInstruction opc);
|
2010-03-24 05:05:25 +00:00
|
|
|
void mv(const UDSPInstruction opc);
|
|
|
|
void dr(const UDSPInstruction opc);
|
|
|
|
void ir(const UDSPInstruction opc);
|
|
|
|
void nr(const UDSPInstruction opc);
|
|
|
|
void nop(const UDSPInstruction opc);
|
2013-10-29 01:23:17 -04:00
|
|
|
|
2009-04-14 11:43:44 +00:00
|
|
|
} // end namespace Ext
|
|
|
|
} // end namespace DSPinterpeter
|