move bits.h to utils/bits.h. quite a lot of noise, but i tidied up some header dependencies while i was at it

This commit is contained in:
zeromus 2016-08-16 05:04:47 -05:00
parent 632a322be9
commit 45d07d41de
21 changed files with 46 additions and 36 deletions

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2012 DeSmuME team
Copyright (C) 2006-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -19,7 +19,8 @@
#include <stdio.h>
#include <string.h>
#include "Disassembler.h"
#include "bits.h"
#include "utils/bits.h"
#include "armcpu.h"
#define ROR(i, j) ((((u32)(i))>>(j)) | (((u32)(i))<<(32-(j))))

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2007 shash
Copyright (C) 2007-2015 DeSmuME team
Copyright (C) 2007-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -23,6 +23,7 @@
#include <assert.h>
#include <sstream>
#include "utils/bits.h"
#include "armcpu.h"
#include "common.h"
#include "debug.h"

View File

@ -30,6 +30,7 @@
#include "utils/decrypt/header.h"
#include "utils/advanscene.h"
#include "utils/task.h"
#include "utils/bits.h"
#include "common.h"
#include "armcpu.h"

View File

@ -40,6 +40,7 @@
#include "armcpu.h"
#include "NDSSystem.h"
#include "matrix.h"
#include "utils/bits.h"
static inline s16 read16(u32 addr) { return (s16)_MMU_read16<ARMCPU_ARM7,MMU_AT_DEBUG>(addr); }

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2007 shash
Copyright (C) 2008-2015 DeSmuME team
Copyright (C) 2008-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -26,6 +26,7 @@
// of current ones)
//#define UNTESTEDOPCODEDEBUG
#include "utils/bits.h"
#include "instructions.h"
#include "cp15.h"
#include "debug.h"

View File

@ -1,6 +1,6 @@
/* Copyright (C) 2006 yopyop
Copyright (C) 2011 Loren Merritt
Copyright (C) 2012-2015 DeSmuME team
Copyright (C) 2012-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -33,13 +33,14 @@
#define HAVE_STATIC_CODE_BUFFER
#endif
#include "utils/bits.h"
#include "utils/AsmJit/AsmJit.h"
#include "armcpu.h"
#include "instructions.h"
#include "instruction_attributes.h"
#include "Disassembler.h"
#include "MMU.h"
#include "MMU_timing.h"
#include "utils/AsmJit/AsmJit.h"
#include "arm_jit.h"
#include "bios.h"

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2009-2015 DeSmuME team
Copyright (C) 2009-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -30,6 +30,7 @@
#include "Disassembler.h"
#include "NDSSystem.h"
#include "MMU_timing.h"
#include "utils/bits.h"
#ifdef HAVE_LUA
#include "lua-engine.h"
#endif

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2015 DeSmuME team
Copyright (C) 2006-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -16,16 +16,21 @@
along with the this software. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ARM_CPU
#define ARM_CPU
#ifndef DESMUME_ARMCPU_H
#define DESMUME_ARMCPU_H
//half of this stuff is arm cpu internals
//half is public API
//really a mess
#include "types.h"
#include "bits.h"
#include "MMU.h"
#define CODE(i) (((i)>>25)&0x7)
#define OPCODE(i) (((i)>>21)&0xF)
#define SIGNEBIT(i) BIT_N(i,20)
#define CONDITION(i) ((i)>>28)
#define REG_POS(i,n) (((i)>>n)&0xF)
#define CODE(i) (((i)>>25)&0x7)
#define OPCODE(i) (((i)>>21)&0xF)
#define SIGNEBIT(i) (((i)>>20)&1)
#define EXCEPTION_RESET 0x00
#define EXCEPTION_UNDEFINED_INSTRUCTION 0x04

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2008-2015 DeSmuME team
Copyright (C) 2008-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,6 +27,7 @@
#include "debug.h"
#include "registers.h"
#include "NDSSystem.h"
#include "utils/bits.h"
#define cpu (&ARMPROC)
#define TEMPLATE template<int PROCNUM>

View File

@ -16,7 +16,7 @@
*/
#include "cheatSystem.h"
#include "bits.h"
#include "utils/bits.h"
#include "NDSSystem.h"
#include "common.h"

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2006-2015 DeSmuME team
Copyright (C) 2006-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -24,6 +24,7 @@
#include "MMU.h"
#include "emufile.h"
#include "readwrite.h"
#include "utils/bits.h"
armcp15_t cp15;

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2008-2015 DeSmuME team
Copyright (C) 2008-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -43,7 +43,6 @@
#include "emufile.h"
#include "matrix.h"
#include "GPU.h"
#include "bits.h"
#include "MMU.h"
#include "render3D.h"
#include "mem.h"
@ -52,6 +51,7 @@
#include "NDSSystem.h"
#include "readwrite.h"
#include "FIFO.h"
#include "utils/bits.h"
#include "movie.h" //only for currframecounter which really ought to be moved into the core emu....
//#define _SHOW_VTX_COUNTERS // show polygon/vertex counters on screen

View File

@ -49,7 +49,6 @@
#include <emmintrin.h>
#endif
#include "bits.h"
#include "common.h"
#include "matrix.h"
#include "render3D.h"

View File

@ -24,7 +24,7 @@
#include <emmintrin.h>
#endif
#include "bits.h"
#include "utils/bits.h"
#include "common.h"
#include "gfx3d.h"
#include "MMU.h"

View File

@ -24,7 +24,6 @@
#include "texcache.h"
#include "bits.h"
#include "common.h"
#include "debug.h"
#include "gfx3d.h"

View File

@ -1,7 +1,7 @@
/*
Copyright (C) 2006 yopyop
Copyright (C) 2008 shash
Copyright (C) 2008-2015 DeSmuME team
Copyright (C) 2008-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -27,6 +27,7 @@
#include "MMU.h"
#include "NDSSystem.h"
#include "MMU_timing.h"
#include "utils/bits.h"
#define cpu (&ARMPROC)
#define TEMPLATE template<int PROCNUM>

View File

@ -37,8 +37,5 @@
#define BIT30(i) BIT_N(i,30)
#define BIT31(i) ((i)>>31)
#define CONDITION(i) (i)>>28
#define REG_POS(i,n) (((i)>>n)&0xF)
#endif

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2007 Tim Seidel
Copyright (C) 2008-2015 DeSmuME team
Copyright (C) 2008-2016 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -41,10 +41,10 @@
#include <assert.h>
#include "utils/bits.h"
#include "armcpu.h"
#include "NDSSystem.h"
#include "debug.h"
#include "bits.h"
#include "registers.h"
#ifndef INVALID_SOCKET

View File

@ -315,7 +315,7 @@
<ClCompile Include="inputdx.cpp" />
<ClCompile Include="luaconsole.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="mic.cpp" />
<ClCompile Include="mic-win.cpp" />
<ClCompile Include="ogl.cpp" />
<ClCompile Include="OpenArchive.cpp" />
<ClCompile Include="pathsettings.cpp" />
@ -347,7 +347,6 @@
<ClInclude Include="..\armcpu.h" />
<ClInclude Include="..\arm_jit.h" />
<ClInclude Include="..\bios.h" />
<ClInclude Include="..\bits.h" />
<ClInclude Include="..\cheatSystem.h" />
<ClInclude Include="..\commandline.h" />
<ClInclude Include="..\common.h" />
@ -444,6 +443,7 @@
<ClInclude Include="..\utils\AsmJit\x86\x86func.h" />
<ClInclude Include="..\utils\AsmJit\x86\x86operand.h" />
<ClInclude Include="..\utils\AsmJit\x86\x86util.h" />
<ClInclude Include="..\utils\bits.h" />
<ClInclude Include="..\utils\datetime.h" />
<ClInclude Include="..\utils\emufat.h" />
<ClInclude Include="..\utils\emufat_types.h" />

View File

@ -360,9 +360,6 @@
<ClCompile Include="main.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="mic.cpp">
<Filter>Windows</Filter>
</ClCompile>
<ClCompile Include="ogl.cpp">
<Filter>Windows</Filter>
</ClCompile>
@ -975,6 +972,9 @@
<ClCompile Include="..\Database.cpp">
<Filter>Core</Filter>
</ClCompile>
<ClCompile Include="mic-win.cpp">
<Filter>Windows</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\armcpu.h">
@ -983,9 +983,6 @@
<ClInclude Include="..\bios.h">
<Filter>Core</Filter>
</ClInclude>
<ClInclude Include="..\bits.h">
<Filter>Core</Filter>
</ClInclude>
<ClInclude Include="..\cheatSystem.h">
<Filter>Core</Filter>
</ClInclude>
@ -1748,6 +1745,9 @@
<ClInclude Include="..\Database.h">
<Filter>Core</Filter>
</ClInclude>
<ClInclude Include="..\utils\bits.h">
<Filter>Core\utils</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\instruction_tabdef.inc">