mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DSP LLE Jit, joined work with XK and skidu.
VERY EXPERIMENTAL DON'T EXPECT HIGH PERFORMANCE!. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5288 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
86
Source/Core/DSPCore/Src/DSPEmitter.h
Normal file
86
Source/Core/DSPCore/Src/DSPEmitter.h
Normal file
@ -0,0 +1,86 @@
|
||||
// Copyright (C) 2003 Dolphin Project.
|
||||
|
||||
// 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, version 2.0.
|
||||
|
||||
// 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 2.0 for more details.
|
||||
|
||||
// A copy of the GPL 2.0 should have been included with the program.
|
||||
// If not, see http://www.gnu.org/licenses/
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _DSPEMITTER_H
|
||||
#define _DSPEMITTER_H
|
||||
|
||||
#include "DSPCommon.h"
|
||||
#include "x64Emitter.h"
|
||||
|
||||
#define COMPILED_CODE_SIZE sizeof(void *) * 0x200000
|
||||
|
||||
#define MAX_BLOCKS 0x10000
|
||||
|
||||
typedef void (*CompiledCode)();
|
||||
|
||||
class DSPEmitter : public Gen::XCodeBlock
|
||||
{
|
||||
CompiledCode *blocks;
|
||||
u16 blockSize[0x10000];
|
||||
bool *endBlock;
|
||||
public:
|
||||
DSPEmitter();
|
||||
~DSPEmitter();
|
||||
|
||||
const u8 *m_compiledCode;
|
||||
|
||||
void WriteCallInterpreter(UDSPInstruction inst);
|
||||
void unknown_instruction(UDSPInstruction inst);
|
||||
void Default(UDSPInstruction _inst);
|
||||
void ClearIRAM();
|
||||
const u8 *Compile(int start_addr);
|
||||
|
||||
void STACKALIGN RunBlock(int cycles);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(DSPEmitter);
|
||||
|
||||
// Memory helper functions
|
||||
void increment_addr_reg(int reg);
|
||||
void decrement_addr_reg(int reg);
|
||||
void increase_addr_reg(int reg);
|
||||
void decrease_addr_reg(int reg);
|
||||
void ext_dmem_write(u32 src, u32 dest);
|
||||
u16 ext_dmem_read(u16 addr);
|
||||
void writeAxAcc(const UDSPInstruction opc);
|
||||
|
||||
// Ext commands
|
||||
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);
|
||||
void ldn(const UDSPInstruction opc);
|
||||
void ldm(const UDSPInstruction opc);
|
||||
void ldnm(const UDSPInstruction opc);
|
||||
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) {}
|
||||
};
|
||||
|
||||
|
||||
#endif // _DSPEMITTER_H
|
||||
|
Reference in New Issue
Block a user