Merge pull request #30 from cxd4/master

fixed 17 compiler warnings about RSP "nameless struct/union" cases
This commit is contained in:
project64 2015-01-29 14:45:54 +11:00
commit abca1bd56f
2 changed files with 42 additions and 48 deletions

View File

@ -29,21 +29,19 @@
#include "Types.h" #include "Types.h"
typedef struct tagOPCODE { typedef union tagOPCODE {
union {
unsigned long Hex; unsigned long Hex;
unsigned char Ascii[4]; unsigned char Ascii[4];
struct { struct {
unsigned offset : 16; unsigned immediate : 16;
unsigned rt : 5; unsigned rt : 5;
unsigned rs : 5; unsigned rs : 5;
unsigned op : 6; unsigned op : 6;
}; };
struct { struct {
unsigned immediate : 16; unsigned offset : 16;
unsigned : 5; unsigned : 5;
unsigned base : 5; unsigned base : 5;
unsigned : 6; unsigned : 6;
@ -71,8 +69,6 @@ typedef struct tagOPCODE {
unsigned : 5; unsigned : 5;
unsigned : 6; unsigned : 6;
}; };
};
} OPCODE; } OPCODE;
//RSP OpCodes //RSP OpCodes

View File

@ -246,8 +246,7 @@ void SseMoveUnalignedRegToN64Mem ( int sseReg, int AddrReg );
void SseMoveRegToReg ( int Dest, int Source ); void SseMoveRegToReg ( int Dest, int Source );
void SseXorRegToReg ( int Dest, int Source ); void SseXorRegToReg ( int Dest, int Source );
typedef struct { typedef union {
union {
struct { struct {
unsigned Reg0 : 2; unsigned Reg0 : 2;
unsigned Reg1 : 2; unsigned Reg1 : 2;
@ -255,7 +254,6 @@ typedef struct {
unsigned Reg3 : 2; unsigned Reg3 : 2;
}; };
unsigned UB:8; unsigned UB:8;
};
} SHUFFLE; } SHUFFLE;
void SseShuffleReg ( int Dest, int Source, BYTE Immed ); void SseShuffleReg ( int Dest, int Source, BYTE Immed );