aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgte
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-07-05 02:34:11 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-07-05 02:34:11 +0200
commitbeb76e4dd362374b8f42cd971d394bba1074cd8d (patch)
tree3ea4cc342737afb9225c01160c92647ba66c78bd /libpsn00b/psxgte
parent5d9aa2d3dfc7d6e51c2eb942ab4cdbae5571a40a (diff)
downloadpsn00bsdk-beb76e4dd362374b8f42cd971d394bba1074cd8d.tar.gz
Replace .include with #includefix-include
For some reason, both mipsel-unknown-elf-gcc 8.2.0 and mipsel-non-elf 15.1.0 were unable to resolve .include assembler directives. As a workaround, it is still possible to use the preprocessor, and therefore the usual #include preprocessor directive. However, this requires the assembly files to use the uppercase .S file extension.
Diffstat (limited to 'libpsn00b/psxgte')
-rw-r--r--libpsn00b/psxgte/initgeom.S (renamed from libpsn00b/psxgte/initgeom.s)4
-rw-r--r--libpsn00b/psxgte/matrix.S (renamed from libpsn00b/psxgte/matrix.s)8
-rw-r--r--libpsn00b/psxgte/squareroot.S (renamed from libpsn00b/psxgte/squareroot.s)4
-rw-r--r--libpsn00b/psxgte/vector.S (renamed from libpsn00b/psxgte/vector.s)32
4 files changed, 24 insertions, 24 deletions
diff --git a/libpsn00b/psxgte/initgeom.s b/libpsn00b/psxgte/initgeom.S
index ccda7f1..d2f7ef4 100644
--- a/libpsn00b/psxgte/initgeom.s
+++ b/libpsn00b/psxgte/initgeom.S
@@ -1,7 +1,7 @@
.set noreorder
-.include "hwregs_a.inc"
-.include "gtereg.inc"
+#include "hwregs_a.inc"
+#include "gtereg.inc"
.section .text.InitGeom
.global InitGeom
diff --git a/libpsn00b/psxgte/matrix.s b/libpsn00b/psxgte/matrix.S
index 9de0ccd..57790bc 100644
--- a/libpsn00b/psxgte/matrix.s
+++ b/libpsn00b/psxgte/matrix.S
@@ -1,7 +1,7 @@
.set noreorder
-.include "gtereg.inc"
-.include "inline_s.inc"
+#include "gtereg.inc"
+#include "inline_s.inc"
.set MATRIX_r11r12, 0
.set MATRIX_r13r21, 4
@@ -65,7 +65,7 @@ CompMatrixLV:
ctc2 $t0, C2_TRX
ctc2 $t1, C2_TRY
ctc2 $t2, C2_TRZ
-
+
lw $t0, MATRIX_trx($a1)
lw $t1, MATRIX_try($a1)
mtc2 $t0, C2_IR1
@@ -78,7 +78,7 @@ CompMatrixLV:
swc2 C2_IR1, MATRIX_trx($a2)
swc2 C2_IR2, MATRIX_try($a2)
swc2 C2_IR3, MATRIX_trz($a2)
-
+
lhu $t1, 2*(0+(3*1))($a1) # Load values for first
lhu $t0, 2*(0+(3*0))($a1) # R11 R21 R31
sll $t1, 16
diff --git a/libpsn00b/psxgte/squareroot.s b/libpsn00b/psxgte/squareroot.S
index 4377ee4..519b0bd 100644
--- a/libpsn00b/psxgte/squareroot.s
+++ b/libpsn00b/psxgte/squareroot.S
@@ -1,7 +1,7 @@
.set noreorder
-.include "gtereg.inc"
-.include "inline_s.inc"
+#include "gtereg.inc"
+#include "inline_s.inc"
.section .text.SquareRoot12
.global SquareRoot12
diff --git a/libpsn00b/psxgte/vector.s b/libpsn00b/psxgte/vector.S
index 2f2f8d6..5fd139c 100644
--- a/libpsn00b/psxgte/vector.s
+++ b/libpsn00b/psxgte/vector.S
@@ -1,8 +1,8 @@
.set noreorder
.set noat
-.include "gtereg.inc"
-.include "inline_s.inc"
+#include "gtereg.inc"
+#include "inline_s.inc"
.section .text.Square0
.global Square0
@@ -28,36 +28,36 @@ Square0:
.global VectorNormalS
.type VectorNormalS, @function
VectorNormalS:
-
+
lw $t0, 0($a0)
lw $t1, 4($a0)
lw $t2, 8($a0)
-
+
mtc2 $t0, C2_IR1
mtc2 $t1, C2_IR2
mtc2 $t2, C2_IR3
-
+
nSQR(0)
-
+
mfc2 $t3, C2_MAC1
mfc2 $t4, C2_MAC2
mfc2 $t5, C2_MAC3
-
+
add $t3, $t4
add $v0, $t3, $t5
mtc2 $v0, C2_LZCS
nop
nop
mfc2 $v1, C2_LZCR
-
+
addiu $at, $0 , -2
and $v1, $at
-
+
addiu $t6, $0 , 0x1f
sub $t6, $v1
sra $t6, 1
addiu $t3, $v1, -24
-
+
bltz $t3, .Lvalue_neg
nop
b .Lvalue_pos
@@ -69,26 +69,26 @@ VectorNormalS:
.Lvalue_pos:
addi $t4, -64
sll $t4, 1
-
+
la $t5, _norm_table
addu $t5, $t4
lh $t5, 0($t5)
-
+
mtc2 $t0, C2_IR1
mtc2 $t1, C2_IR2
mtc2 $t2, C2_IR3
mtc2 $t5, C2_IR0
-
+
nGPF(0)
-
+
mfc2 $t0, C2_MAC1
mfc2 $t1, C2_MAC2
mfc2 $t2, C2_MAC3
-
+
sra $t0, $t6
sra $t1, $t6
sra $t2, $t6
-
+
sh $t0, 0($a1)
sh $t1, 2($a1)
jr $ra