mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
gcc 4.2 warning fixes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@501 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
385760631f
commit
d95259bdaa
5 changed files with 20 additions and 16 deletions
|
@ -6,8 +6,8 @@ static FILE *AsmFile=NULL;
|
||||||
static int CycloneVer=0x0099; // Version number of library
|
static int CycloneVer=0x0099; // Version number of library
|
||||||
int *CyJump=NULL; // Jump table
|
int *CyJump=NULL; // Jump table
|
||||||
int ms=USE_MS_SYNTAX; // If non-zero, output in Microsoft ARMASM format
|
int ms=USE_MS_SYNTAX; // If non-zero, output in Microsoft ARMASM format
|
||||||
char *Narm[4]={ "b", "h","",""}; // Normal ARM Extensions for operand sizes 0,1,2
|
const char * const Narm[4]={ "b", "h","",""}; // Normal ARM Extensions for operand sizes 0,1,2
|
||||||
char *Sarm[4]={"sb","sh","",""}; // Sign-extend ARM Extensions for operand sizes 0,1,2
|
const char * const Sarm[4]={"sb","sh","",""}; // Sign-extend ARM Extensions for operand sizes 0,1,2
|
||||||
int Cycles; // Current cycles for opcode
|
int Cycles; // Current cycles for opcode
|
||||||
int pc_dirty; // something changed PC during processing
|
int pc_dirty; // something changed PC during processing
|
||||||
int arm_op_count;
|
int arm_op_count;
|
||||||
|
@ -83,7 +83,7 @@ static void ChangeTAS(int norm)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EMULATE_ADDRESS_ERRORS_JUMP || EMULATE_ADDRESS_ERRORS_IO
|
#if EMULATE_ADDRESS_ERRORS_JUMP || EMULATE_ADDRESS_ERRORS_IO
|
||||||
static void AddressErrorWrapper(char rw, char *dataprg, int iw)
|
static void AddressErrorWrapper(char rw, const char *dataprg, int iw)
|
||||||
{
|
{
|
||||||
ot("ExceptionAddressError_%c_%s%s\n", rw, dataprg, ms?"":":");
|
ot("ExceptionAddressError_%c_%s%s\n", rw, dataprg, ms?"":":");
|
||||||
ot(" ldr r1,[r7,#0x44]\n");
|
ot(" ldr r1,[r7,#0x44]\n");
|
||||||
|
@ -1096,7 +1096,7 @@ static void PrintJumpTable()
|
||||||
static int CycloneMake()
|
static int CycloneMake()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *name="Cyclone.s";
|
const char *name="Cyclone.s";
|
||||||
const char *globl=ms?"export":".global";
|
const char *globl=ms?"export":".global";
|
||||||
|
|
||||||
// Open the assembly file
|
// Open the assembly file
|
||||||
|
@ -1131,6 +1131,10 @@ static int CycloneMake()
|
||||||
ot(" %s CycloneDoInterrupt\n",globl);
|
ot(" %s CycloneDoInterrupt\n",globl);
|
||||||
ot(" %s CycloneDoTrace\n",globl);
|
ot(" %s CycloneDoTrace\n",globl);
|
||||||
ot(" %s CycloneJumpTab\n",globl);
|
ot(" %s CycloneJumpTab\n",globl);
|
||||||
|
ot(" %s Op____\n",globl);
|
||||||
|
ot(" %s Op6001\n",globl);
|
||||||
|
ot(" %s Op6601\n",globl);
|
||||||
|
ot(" %s Op6701\n",globl);
|
||||||
#endif
|
#endif
|
||||||
ot("\n");
|
ot("\n");
|
||||||
ot(ms?"CycloneVer dcd 0x":"CycloneVer: .long 0x");
|
ot(ms?"CycloneVer dcd 0x":"CycloneVer: .long 0x");
|
||||||
|
|
|
@ -8,7 +8,7 @@ int OpArith(int op)
|
||||||
int type=0,size=0;
|
int type=0,size=0;
|
||||||
int sea=0,tea=0;
|
int sea=0,tea=0;
|
||||||
int use=0;
|
int use=0;
|
||||||
char *shiftstr="";
|
const char *shiftstr="";
|
||||||
|
|
||||||
// Get source and target EA
|
// Get source and target EA
|
||||||
type=(op>>9)&7; if (type==4 || type>=7) return 1;
|
type=(op>>9)&7; if (type==4 || type>=7) return 1;
|
||||||
|
@ -144,8 +144,8 @@ int OpArithReg(int op)
|
||||||
{
|
{
|
||||||
int use=0;
|
int use=0;
|
||||||
int type=0,size=0,dir=0,rea=0,ea=0;
|
int type=0,size=0,dir=0,rea=0,ea=0;
|
||||||
char *asl="";
|
const char *asl="";
|
||||||
char *strop=0;
|
const char *strop=0;
|
||||||
|
|
||||||
type=(op>>12)&5;
|
type=(op>>12)&5;
|
||||||
rea =(op>> 9)&7;
|
rea =(op>> 9)&7;
|
||||||
|
@ -534,7 +534,7 @@ int OpAritha(int op)
|
||||||
{
|
{
|
||||||
int use=0;
|
int use=0;
|
||||||
int type=0,size=0,sea=0,dea=0;
|
int type=0,size=0,sea=0,dea=0;
|
||||||
char *asr="";
|
const char *asr="";
|
||||||
|
|
||||||
// Suba/Cmpa/Adda/(invalid):
|
// Suba/Cmpa/Adda/(invalid):
|
||||||
type=(op>>13)&3; if (type>=3) return 1;
|
type=(op>>13)&3; if (type>=3) return 1;
|
||||||
|
@ -591,7 +591,7 @@ int OpAddx(int op)
|
||||||
{
|
{
|
||||||
int use=0;
|
int use=0;
|
||||||
int type=0,size=0,dea=0,sea=0,mem=0;
|
int type=0,size=0,dea=0,sea=0,mem=0;
|
||||||
char *asl="";
|
const char *asl="";
|
||||||
|
|
||||||
type=(op>>14)&1;
|
type=(op>>14)&1;
|
||||||
dea =(op>> 9)&7;
|
dea =(op>> 9)&7;
|
||||||
|
@ -668,7 +668,7 @@ int OpCmpEor(int op)
|
||||||
{
|
{
|
||||||
int rea=0,eor=0;
|
int rea=0,eor=0;
|
||||||
int size=0,ea=0,use=0;
|
int size=0,ea=0,use=0;
|
||||||
char *asl="";
|
const char *asl="";
|
||||||
|
|
||||||
// Get EA and register EA
|
// Get EA and register EA
|
||||||
rea=(op>>9)&7;
|
rea=(op>>9)&7;
|
||||||
|
@ -725,7 +725,7 @@ int OpCmpEor(int op)
|
||||||
int OpCmpm(int op)
|
int OpCmpm(int op)
|
||||||
{
|
{
|
||||||
int size=0,sea=0,dea=0,use=0;
|
int size=0,sea=0,dea=0,use=0;
|
||||||
char *asl="";
|
const char *asl="";
|
||||||
|
|
||||||
// get size, get EAs
|
// get size, get EAs
|
||||||
size=(op>>6)&3; if (size>=3) return 1;
|
size=(op>>6)&3; if (size>=3) return 1;
|
||||||
|
|
|
@ -288,7 +288,7 @@ int OpJsr(int op)
|
||||||
// --------------------- Opcodes 0x50c8+ ---------------------
|
// --------------------- Opcodes 0x50c8+ ---------------------
|
||||||
|
|
||||||
// ARM version of 68000 condition codes:
|
// ARM version of 68000 condition codes:
|
||||||
static char *Cond[16]=
|
static const char * const Cond[16]=
|
||||||
{
|
{
|
||||||
"", "", "hi","ls","cc","cs","ne","eq",
|
"", "", "hi","ls","cc","cs","ne","eq",
|
||||||
"vc","vs","pl","mi","ge","lt","gt","le"
|
"vc","vs","pl","mi","ge","lt","gt","le"
|
||||||
|
@ -402,7 +402,7 @@ int OpBranch(int op)
|
||||||
int size=0,use=0,checkpc=0;
|
int size=0,use=0,checkpc=0;
|
||||||
int offset=0;
|
int offset=0;
|
||||||
int cc=0;
|
int cc=0;
|
||||||
char *asr_r11="";
|
const char *asr_r11="";
|
||||||
|
|
||||||
offset=(char)(op&0xff);
|
offset=(char)(op&0xff);
|
||||||
cc=(op>>8)&15;
|
cc=(op>>8)&15;
|
||||||
|
|
|
@ -301,7 +301,7 @@ int OpSet(int op)
|
||||||
{
|
{
|
||||||
int cc=0,ea=0;
|
int cc=0,ea=0;
|
||||||
int size=0,use=0,changed_cycles=0;
|
int size=0,use=0,changed_cycles=0;
|
||||||
char *cond[16]=
|
static const char * const cond[16]=
|
||||||
{
|
{
|
||||||
"al","", "hi","ls","cc","cs","ne","eq",
|
"al","", "hi","ls","cc","cs","ne","eq",
|
||||||
"vc","vs","pl","mi","ge","lt","gt","le"
|
"vc","vs","pl","mi","ge","lt","gt","le"
|
||||||
|
|
|
@ -33,8 +33,8 @@ int EaAn(int ea);
|
||||||
// Main.cpp
|
// Main.cpp
|
||||||
extern int *CyJump; // Jump table
|
extern int *CyJump; // Jump table
|
||||||
extern int ms; // If non-zero, output in Microsoft ARMASM format
|
extern int ms; // If non-zero, output in Microsoft ARMASM format
|
||||||
extern char *Narm[4]; // Normal ARM Extensions for operand sizes 0,1,2
|
extern const char * const Narm[4]; // Normal ARM Extensions for operand sizes 0,1,2
|
||||||
extern char *Sarm[4]; // Sign-extend ARM Extensions for operand sizes 0,1,2
|
extern const char * const Sarm[4]; // Sign-extend ARM Extensions for operand sizes 0,1,2
|
||||||
extern int Cycles; // Current cycles for opcode
|
extern int Cycles; // Current cycles for opcode
|
||||||
extern int pc_dirty; // something changed PC during processing
|
extern int pc_dirty; // something changed PC during processing
|
||||||
extern int arm_op_count; // for stats
|
extern int arm_op_count; // for stats
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue