mirror of
https://github.com/libretro/Mu.git
synced 2026-09-23 07:05:37 +00:00
Correct code style a bit
This commit is contained in:
@@ -6,9 +6,6 @@
|
||||
#include "specs/emuFeatureRegisterSpec.h"
|
||||
|
||||
|
||||
#define SWAP_32(x) ((uint32_t)((((uint32_t)(x) & 0x000000FF) << 24) | (((uint32_t)(x) & 0x0000FF00) << 8) | (((uint32_t)(x) & 0x00FF0000) >> 8) | (((uint32_t)(x) & 0xFF000000) >> 24)))
|
||||
|
||||
|
||||
void armv5SetStack(uint8_t* location, uint32_t size){
|
||||
uint32_t firstStackEntry = (uint32_t)location + size - 1;
|
||||
|
||||
@@ -23,13 +20,13 @@ void armv5StackPush(uint32_t value){
|
||||
uint32_t stackPtr = armv5GetRegister(13);
|
||||
|
||||
stackPtr -= sizeof(uint32_t);
|
||||
writeArbitraryMemory32(stackPtr, SWAP_32(value));
|
||||
writeArbitraryMemory32(stackPtr, EndianSwap32(value));
|
||||
armv5SetRegister(13, stackPtr);
|
||||
}
|
||||
|
||||
uint32_t armv5StackPop(void){
|
||||
uint32_t stackPtr = armv5GetRegister(13);
|
||||
uint32_t value = SWAP_32(readArbitraryMemory32(stackPtr));
|
||||
uint32_t value = EndianSwap32(readArbitraryMemory32(stackPtr));
|
||||
|
||||
stackPtr += sizeof(uint32_t);
|
||||
armv5SetRegister(13, stackPtr);
|
||||
|
||||
@@ -13,9 +13,11 @@
|
||||
/*config vars*/
|
||||
#define CONFIG_FILE_SIZE (20 * sizeof(uint32_t))
|
||||
|
||||
#define ARM_STACK_SIZE 0
|
||||
#define LCD_WIDTH 1
|
||||
#define LCD_HEIGHT 2
|
||||
enum{
|
||||
ARM_STACK_SIZE = 0,
|
||||
LCD_WIDTH,
|
||||
LCD_HEIGHT
|
||||
};
|
||||
|
||||
|
||||
static uint32_t* configFile;
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#define EndianSwap16(n) (((((unsigned int) n) << 8) & 0xFF00) | ((((unsigned int) n) >> 8) & 0x00FF))
|
||||
#define EndianSwap16(n) (((((unsigned int) n) << 8) & 0xFF00) | ((((unsigned int) n) >> 8) & 0x00FF))
|
||||
|
||||
|
||||
#define EndianSwap32(n) (((((unsigned long) n) << 24) & 0xFF000000) | ((((unsigned long) n) << 8) & 0x00FF0000) | ((((unsigned long) n) >> 8) & 0x0000FF00) | ((((unsigned long) n) >> 24) & 0x000000FF))
|
||||
#define EndianSwap32(n) (((((unsigned long) n) << 24) & 0xFF000000) | ((((unsigned long) n) << 8) & 0x00FF0000) | ((((unsigned long) n) >> 8) & 0x0000FF00) | ((((unsigned long) n) >> 24) & 0x000000FF))
|
||||
|
||||
#define Read68KUnaligned32(addr) (((((unsigned char *)(addr))[0]) << 24) | ((((unsigned char *)(addr))[1]) << 16) | ((((unsigned char *)(addr))[2]) << 8) | ((((unsigned char *)(addr))[3])))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user