Skip to content

Commit

Permalink
Make IOP assembly compatible with new toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
rickgaiser committed Jan 11, 2021
1 parent a2b2472 commit 2eabe8b
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 33 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Pulled out 'sde' library from MIPS.
# by Eugene Plotnikov
*/

#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down Expand Up @@ -175,4 +178,3 @@ mips_memset:
_dummy:
jr $ra
nop

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Pulled out 'sde' library from MIPS.
# by Eugene Plotnikov
*/

#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down Expand Up @@ -175,4 +178,3 @@ mips_memset:
_dummy:
jr $ra
nop

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Pulled out 'sde' library from MIPS.
# by Eugene Plotnikov
*/

#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down Expand Up @@ -175,4 +178,3 @@ mips_memset:
_dummy:
jr $ra
nop

2 changes: 2 additions & 0 deletions modules/iopcore/patches/iremsndpatch/asm.S
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "as_reg_compat.h"

.set noreorder

.text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "as_reg_compat.h"

.set noat
.set noreorder

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#

#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# Pulled out 'sde' library from MIPS.
#
*/

#include "as_reg_compat.h"

.ifdef .gasversion.
.section .mdebug.abi32
.nan legacy
Expand Down
60 changes: 30 additions & 30 deletions modules/network/smap-ingame/xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,37 +93,37 @@ static inline void CopyFromFIFO(volatile u8 *smap_regbase, void *buffer, unsigne
".set noreorder\n\t"
".set nomacro\n\t"
".set noat\n\t"
"lui $v0, 0xB000\n\t"
"lui $2, 0xB000\n\t"
"srl $at, %1, 5\n\t"
"blez $at, 3f\n\t"
"andi %1, %1, 0x1F\n\t"
"4:\n\t"
"lw $t0, 4608($v0)\n\t"
"lw $t1, 4608($v0)\n\t"
"lw $t2, 4608($v0)\n\t"
"lw $t3, 4608($v0)\n\t"
"lw $t4, 4608($v0)\n\t"
"lw $t5, 4608($v0)\n\t"
"lw $t6, 4608($v0)\n\t"
"lw $t7, 4608($v0)\n\t"
"lw $8, 4608($2)\n\t"
"lw $9, 4608($2)\n\t"
"lw $10, 4608($2)\n\t"
"lw $11, 4608($2)\n\t"
"lw $12, 4608($2)\n\t"
"lw $13, 4608($2)\n\t"
"lw $14, 4608($2)\n\t"
"lw $15, 4608($2)\n\t"
"addiu $at, $at, -1\n\t"
"sw $t0, 0(%0)\n\t"
"sw $t1, 4(%0)\n\t"
"sw $t2, 8(%0)\n\t"
"sw $t3, 12(%0)\n\t"
"sw $t4, 16(%0)\n\t"
"sw $t5, 20(%0)\n\t"
"sw $t6, 24(%0)\n\t"
"sw $t7, 28(%0)\n\t"
"sw $8, 0(%0)\n\t"
"sw $9, 4(%0)\n\t"
"sw $10, 8(%0)\n\t"
"sw $11, 12(%0)\n\t"
"sw $12, 16(%0)\n\t"
"sw $13, 20(%0)\n\t"
"sw $14, 24(%0)\n\t"
"sw $15, 28(%0)\n\t"
"bgtz $at, 4b\n\t"
"addiu %0, %0, 32\n\t"
"3:\n\t"
"blez %1, 1f\n\t"
"nop\n\t"
"2:\n\t"
"lw $t0, 4608($v0)\n\t"
"lw $8, 4608($2)\n\t"
"addiu %1, %1, -4\n\t"
"sw $t0, 0(%0)\n\t"
"sw $8, 0(%0)\n\t"
"bgtz %1, 2b\n\t"
"addiu %0, %0, 4\n\t"
"1:\n\t"
Expand Down Expand Up @@ -210,28 +210,28 @@ int SMAPSendPacket(const void *data, unsigned int length)
".set nomacro\n\t"
".set noat\n\t"
"srl $at, %1, 4\n\t"
"lui $v1, 0xB000\n\t"
"lui $3, 0xB000\n\t"
"beqz $at, 3f\n\t"
"andi %1, %1, 0xF\n\t"
"4:\n\t"
"lw $t0, 0(%0)\n\t"
"lw $t1, 4(%0)\n\t"
"lw $t2, 8(%0)\n\t"
"lw $t3, 12(%0)\n\t"
"lw $8, 0(%0)\n\t"
"lw $9, 4(%0)\n\t"
"lw $10, 8(%0)\n\t"
"lw $11, 12(%0)\n\t"
"addiu $at, $at, -1\n\t"
"sw $t0, 4352($v1)\n\t"
"sw $t1, 4352($v1)\n\t"
"sw $t2, 4352($v1)\n\t"
"sw $8, 4352($3)\n\t"
"sw $9, 4352($3)\n\t"
"sw $10, 4352($3)\n\t"
"addiu %0, %0, 16\n\t"
"bgtz $at, 4b\n\t"
"sw $t3, 4352($v1)\n\t"
"sw $11, 4352($3)\n\t"
"3:\n\t"
"beqz %1, 1f\n\t"
"nop\n\t"
"2:\n\t"
"lw $v0, 0(%0)\n\t"
"lw $2, 0(%0)\n\t"
"addiu %1, %1, -4\n\t"
"sw $v0, 4352($v1)\n\t"
"sw $2, 4352($3)\n\t"
"bnez %1, 2b\n\t"
"addiu %0, %0, 4\n\t"
"1:\n\t"
Expand Down

0 comments on commit 2eabe8b

Please sign in to comment.