Merge pull request #2972 from lioncash/align

General: Replace GC_ALIGN macros with alignas
This commit is contained in:
flacs 2015-09-11 17:00:13 +00:00
commit c5685ba53a
19 changed files with 73 additions and 84 deletions

View file

@ -22,16 +22,16 @@ namespace GPFifo
// 32 Byte gather pipe with extra space
// Overfilling is no problem (up to the real limit), CheckGatherPipe will blast the
// contents in nicely sized chunks
//
// Other optimizations to think about:
// If the gp is NOT linked to the fifo, just blast to memory byte by word
// If the gp IS linked to the fifo, use a fast wrapping buffer and skip writing to memory
// - If the GP is NOT linked to the FIFO, just blast to memory byte by word
// - If the GP IS linked to the FIFO, use a fast wrapping buffer and skip writing to memory
//
// Both of these should actually work! Only problem is that we have to decide at run time,
// the same function could use both methods. Compile 2 different versions of each such block?
u8 GC_ALIGNED32(m_gatherPipe[GATHER_PIPE_SIZE*16]); //more room, for the fastmodes
// More room for the fastmodes
alignas(32) u8 m_gatherPipe[GATHER_PIPE_SIZE * 16];
// pipe counter
u32 m_gatherPipeCount = 0;

View file

@ -17,7 +17,8 @@ enum
GATHER_PIPE_SIZE = 32
};
extern u8 GC_ALIGNED32(m_gatherPipe[GATHER_PIPE_SIZE*16]); //more room, for the fastmodes
// More room for the fastmodes
alignas(32) extern u8 m_gatherPipe[GATHER_PIPE_SIZE * 16];
// pipe counter
extern u32 m_gatherPipeCount;