diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-12-14 08:15:46 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-12-14 08:15:46 +0000 |
| commit | 0facac847fd9cde7556a53a0d19407b93b3e3c15 (patch) | |
| tree | 70dc1ea116b8c06d4647aca653d9a2e56e551c97 /libpcsxcore/ppc | |
| parent | f6977b75b9a3cebff0ac73a9e751941dea4d7e42 (diff) | |
| download | pcsxr-0facac847fd9cde7556a53a0d19407b93b3e3c15.tar.gz | |
MaddTheSane:
- Clean up the Xcode projects a bit.
- Added 64-bit mode on Mac.
- Made it so that the SDK was set on the Xcode projects.
- Enabled PowerPC support.
(Patch #7730).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@61171 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/ppc')
| -rw-r--r-- | libpcsxcore/ppc/pR3000A.c | 3 | ||||
| -rw-r--r-- | libpcsxcore/ppc/pasm.s | 40 | ||||
| -rw-r--r-- | libpcsxcore/ppc/ppc.c | 3 | ||||
| -rw-r--r-- | libpcsxcore/ppc/reguse.c | 4 |
4 files changed, 34 insertions, 16 deletions
diff --git a/libpcsxcore/ppc/pR3000A.c b/libpcsxcore/ppc/pR3000A.c index 93745f82..c3aea8f2 100644 --- a/libpcsxcore/ppc/pR3000A.c +++ b/libpcsxcore/ppc/pR3000A.c @@ -16,6 +16,8 @@ * Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307 USA */ +#if defined (__ppc__) || defined (__ppc64__) + #ifdef _MSC_VER_ #pragma warning(disable:4244) #pragma warning(disable:4761) @@ -3538,3 +3540,4 @@ R3000Acpu psxRec = { recShutdown }; +#endif diff --git a/libpcsxcore/ppc/pasm.s b/libpcsxcore/ppc/pasm.s index 96891b42..ae1558dd 100644 --- a/libpcsxcore/ppc/pasm.s +++ b/libpcsxcore/ppc/pasm.s @@ -1,4 +1,11 @@ +#if defined (__ppc__) || defined (__ppc64__) + +#ifdef ELF +#define C(label) label +#else +#define C(label) _##label +#endif #define OLD_REGISTER_OFFSET (19*4) #define SP_SIZE (OLD_REGISTER_OFFSET+4+8) @@ -6,8 +13,8 @@ /*asm void recRun(register void (*func)(), register u32 hw1, register u32 hw2)*/ .text .align 4 - .globl recRun -recRun: + .globl C(recRun) +C(recRun): /* prologue code */ mflr r0 stmw r13, -(32-13)*4(r1) @@ -25,8 +32,8 @@ asm void returnPC() {*/ .text .align 4 - .globl returnPC -returnPC: + .globl C(returnPC) +C(returnPC): // end code lwz r0, (32-13)*4+8+4(r1) addi r1, r1, (32-13)*4+8 @@ -39,15 +46,15 @@ returnPC: .text .align 4 - .globl dynMemRead8 -dynMemRead8: + .globl C(dynMemRead8) +C(dynMemRead8): // assumes that memory pointer is in r30 addis r2,r3,-0x1f80 srwi. r4,r2,16 bne+ .norm8 cmplwi r2,0x1000 blt- .norm8 - b psxHwRead8 + b C(psxHwRead8) .norm8: clrlwi r5,r3,3 lbzx r3,r5,r30 @@ -55,15 +62,15 @@ dynMemRead8: .text .align 4 - .globl dynMemRead16 -dynMemRead16: + .globl C(dynMemRead16) +C(dynMemRead16): // assumes that memory pointer is in r30 addis r2,r3,-0x1f80 srwi. r4,r2,16 bne+ .norm16 cmplwi r2,0x1000 blt- .norm16 - b psxHwRead16 + b C(psxHwRead16) .norm16: clrlwi r5,r3,3 lhbrx r3,r5,r30 @@ -71,15 +78,15 @@ dynMemRead16: .text .align 4 - .globl dynMemRead32 -dynMemRead32: + .globl C(dynMemRead32) +C(dynMemRead32): // assumes that memory pointer is in r30 addis r2,r3,-0x1f80 srwi. r4,r2,16 bne+ .norm32 cmplwi r2,0x1000 blt- .norm32 - b psxHwRead32 + b C(psxHwRead32) .norm32: clrlwi r5,r3,3 lwbrx r3,r5,r30 @@ -98,15 +105,15 @@ P | !(N | !Z) .text .align 4 - .globl dynMemWrite32 -dynMemWrite32: + .globl C(dynMemWrite32) +C(dynMemWrite32): // assumes that memory pointer is in r30 addis r2,r3,-0x1f80 srwi. r5,r2,16 bne+ .normw32 cmplwi r2,0x1000 blt .normw32 - b psxHwWrite32 + b C(psxHwWrite32) .normw32: mtcrf 0xFF, r3 clrlwi r5,r3,3 @@ -122,3 +129,4 @@ dynMemWrite32: stwbrx r4,r5,r30 blr +#endif diff --git a/libpcsxcore/ppc/ppc.c b/libpcsxcore/ppc/ppc.c index efaf8b6d..84ec75ea 100644 --- a/libpcsxcore/ppc/ppc.c +++ b/libpcsxcore/ppc/ppc.c @@ -4,6 +4,8 @@ * alexey silinov */ +#if defined (__ppc__) || defined (__ppc64__) + #include <stdio.h> #include <string.h> @@ -30,3 +32,4 @@ void ppcAlign(int bytes) { void ppcShutdown() { } +#endif diff --git a/libpcsxcore/ppc/reguse.c b/libpcsxcore/ppc/reguse.c index 47d70a54..f68e48a4 100644 --- a/libpcsxcore/ppc/reguse.c +++ b/libpcsxcore/ppc/reguse.c @@ -1,4 +1,6 @@ +#if defined (__ppc__) || defined (__ppc64__) + #include "../psxcommon.h" #include "reguse.h" @@ -417,3 +419,5 @@ int isPsxRegUsed(u32 pc, int psxreg) else return 0; // the next use is a write, i.e. current value is not important } + +#endif |
