mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 09:39:46 -06:00
Lots of various changes. CPU detect fix. Maybe a minor speed increase. CPU bugs remain.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@180 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -14,6 +14,9 @@
|
||||
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
// WARNING - THIS LIBRARY IS NOT THREAD SAFE!!!
|
||||
|
||||
#ifndef _DOLPHIN_INTEL_CODEGEN
|
||||
#define _DOLPHIN_INTEL_CODEGEN
|
||||
|
||||
@ -92,6 +95,26 @@ namespace Gen
|
||||
const u8 *GetCodePtr();
|
||||
u8 *GetWritableCodePtr();
|
||||
|
||||
|
||||
// Safe way to temporarily redirect the code generator.
|
||||
class GenContext
|
||||
{
|
||||
u8 **code_ptr_ptr;
|
||||
u8 *saved_ptr;
|
||||
public:
|
||||
GenContext(u8 **code_ptr_ptr_)
|
||||
{
|
||||
saved_ptr = GetWritableCodePtr();
|
||||
code_ptr_ptr = code_ptr_ptr_;
|
||||
SetCodePtr(*code_ptr_ptr);
|
||||
}
|
||||
~GenContext()
|
||||
{
|
||||
*code_ptr_ptr = GetWritableCodePtr();
|
||||
SetCodePtr(saved_ptr);
|
||||
}
|
||||
};
|
||||
|
||||
enum NormalOp {
|
||||
nrmADD,
|
||||
nrmADC,
|
||||
|
Reference in New Issue
Block a user