diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-05 02:34:11 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-05 02:34:11 +0200 |
| commit | beb76e4dd362374b8f42cd971d394bba1074cd8d (patch) | |
| tree | 3ea4cc342737afb9225c01160c92647ba66c78bd | |
| parent | 5d9aa2d3dfc7d6e51c2eb942ab4cdbae5571a40a (diff) | |
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.
| -rw-r--r-- | examples/demos/n00bdemo/plasmagen.S (renamed from examples/demos/n00bdemo/plasmagen.s) | 0 | ||||
| -rw-r--r-- | examples/graphics/tilesasm/drawtiles.S (renamed from examples/graphics/tilesasm/drawtiles.s) | 0 | ||||
| -rw-r--r-- | examples/lowlevel/cartrom/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | examples/lowlevel/cartrom/rom.S (renamed from examples/lowlevel/cartrom/rom.s) | 0 | ||||
| -rw-r--r-- | indev/psn00bdbg-mk2/monitor/sdkinst.S (renamed from indev/psn00bdbg-mk2/monitor/sdkinst.s) | 0 | ||||
| -rw-r--r-- | indev/psn00bdbg-mk2/monitor/stubinst.S (renamed from indev/psn00bdbg-mk2/monitor/stubinst.s) | 0 | ||||
| -rw-r--r-- | indev/psxpad/card.S (renamed from indev/psxpad/card.s) | 0 | ||||
| -rw-r--r-- | indev/psxpad/pad.S (renamed from indev/psxpad/pad.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | libpsn00b/include/psxgpu.h | 2 | ||||
| -rw-r--r-- | libpsn00b/libc/_start.S (renamed from libpsn00b/libc/_start.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/libc/clz.S (renamed from libpsn00b/libc/clz.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/libc/memset.S (renamed from libpsn00b/libc/memset.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/libc/setjmp.S (renamed from libpsn00b/libc/setjmp.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxapi/_syscalls.S (renamed from libpsn00b/psxapi/_syscalls.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxapi/drivers.S (renamed from libpsn00b/psxapi/drivers.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxapi/fs.S (renamed from libpsn00b/psxapi/fs.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxapi/stdio.S (renamed from libpsn00b/psxapi/stdio.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxapi/sys.S (renamed from libpsn00b/psxapi/sys.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxetc/_dl_resolve_wrapper.S (renamed from libpsn00b/psxetc/_dl_resolve_wrapper.s) | 0 | ||||
| -rw-r--r-- | libpsn00b/psxgpu/common.c | 2 | ||||
| -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 | ||||
| -rw-r--r-- | libpsn00b/psxpress/vlc.S (renamed from libpsn00b/psxpress/vlc.s) | 26 | ||||
| -rw-r--r-- | libpsn00b/smd/smd.S (renamed from libpsn00b/smd/smd.s) | 6 | ||||
| -rw-r--r-- | libpsn00b/smd/smd_cel.S (renamed from libpsn00b/smd/smd_cel.s) | 6 | ||||
| -rw-r--r-- | libpsn00b/smd/smd_flat.S (renamed from libpsn00b/smd/smd_flat.s) | 6 | ||||
| -rw-r--r-- | libpsn00b/smd/smdparser.S (renamed from libpsn00b/smd/smdparser.s) | 2 |
30 files changed, 51 insertions, 51 deletions
diff --git a/examples/demos/n00bdemo/plasmagen.s b/examples/demos/n00bdemo/plasmagen.S index 07b3f48..07b3f48 100644 --- a/examples/demos/n00bdemo/plasmagen.s +++ b/examples/demos/n00bdemo/plasmagen.S diff --git a/examples/graphics/tilesasm/drawtiles.s b/examples/graphics/tilesasm/drawtiles.S index 15a0707..15a0707 100644 --- a/examples/graphics/tilesasm/drawtiles.s +++ b/examples/graphics/tilesasm/drawtiles.S diff --git a/examples/lowlevel/cartrom/CMakeLists.txt b/examples/lowlevel/cartrom/CMakeLists.txt index 6a94d9f..b674002 100644 --- a/examples/lowlevel/cartrom/CMakeLists.txt +++ b/examples/lowlevel/cartrom/CMakeLists.txt @@ -11,7 +11,7 @@ project( HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk" ) -file(GLOB _sources *.c *.s) +file(GLOB _sources *.c *.S) # This example only uses the toolchain (without the rest of the SDK), so the # executable has to be created manually and converted into raw binary format diff --git a/examples/lowlevel/cartrom/rom.s b/examples/lowlevel/cartrom/rom.S index 587ba6f..587ba6f 100644 --- a/examples/lowlevel/cartrom/rom.s +++ b/examples/lowlevel/cartrom/rom.S diff --git a/indev/psn00bdbg-mk2/monitor/sdkinst.s b/indev/psn00bdbg-mk2/monitor/sdkinst.S index 6d20624..6d20624 100644 --- a/indev/psn00bdbg-mk2/monitor/sdkinst.s +++ b/indev/psn00bdbg-mk2/monitor/sdkinst.S diff --git a/indev/psn00bdbg-mk2/monitor/stubinst.s b/indev/psn00bdbg-mk2/monitor/stubinst.S index 54bc8b9..54bc8b9 100644 --- a/indev/psn00bdbg-mk2/monitor/stubinst.s +++ b/indev/psn00bdbg-mk2/monitor/stubinst.S diff --git a/indev/psxpad/card.s b/indev/psxpad/card.S index 2732194..2732194 100644 --- a/indev/psxpad/card.s +++ b/indev/psxpad/card.S diff --git a/indev/psxpad/pad.s b/indev/psxpad/pad.S index 0fa66aa..0fa66aa 100644 --- a/indev/psxpad/pad.s +++ b/indev/psxpad/pad.S diff --git a/libpsn00b/CMakeLists.txt b/libpsn00b/CMakeLists.txt index a6b6df3..77784de 100644 --- a/libpsn00b/CMakeLists.txt +++ b/libpsn00b/CMakeLists.txt @@ -30,7 +30,7 @@ foreach(_library IN LISTS PSN00BSDK_LIBRARIES) file( GLOB_RECURSE _sources - ${_path}/*.s ${_path}/*.c ${_path}/*.cpp + ${_path}/*.S ${_path}/*.c ${_path}/*.cpp ) # Build a separate version of the library for each supported target type diff --git a/libpsn00b/include/psxgpu.h b/libpsn00b/include/psxgpu.h index 52ddba8..887f4ba 100644 --- a/libpsn00b/include/psxgpu.h +++ b/libpsn00b/include/psxgpu.h @@ -592,7 +592,7 @@ void *VSyncHaltFunction(void (*func)(void)); void *VSyncCallback(void (*func)(void)); void SetDrawOpType(GPU_DrawOpType type); -int EnqueueDrawOp(void (*func)(), uint32_t arg1, uint32_t arg2, uint32_t arg3); +int EnqueueDrawOp(void (*func)(uint32_t, uint32_t, uint32_t), uint32_t arg1, uint32_t arg2, uint32_t arg3); int DrawSync(int mode); void *DrawSyncCallback(void (*func)(void)); diff --git a/libpsn00b/libc/_start.s b/libpsn00b/libc/_start.S index 35a4eaa..35a4eaa 100644 --- a/libpsn00b/libc/_start.s +++ b/libpsn00b/libc/_start.S diff --git a/libpsn00b/libc/clz.s b/libpsn00b/libc/clz.S index 1ccff2e..1ccff2e 100644 --- a/libpsn00b/libc/clz.s +++ b/libpsn00b/libc/clz.S diff --git a/libpsn00b/libc/memset.s b/libpsn00b/libc/memset.S index 59cb10b..59cb10b 100644 --- a/libpsn00b/libc/memset.s +++ b/libpsn00b/libc/memset.S diff --git a/libpsn00b/libc/setjmp.s b/libpsn00b/libc/setjmp.S index fb0dc6b..fb0dc6b 100644 --- a/libpsn00b/libc/setjmp.s +++ b/libpsn00b/libc/setjmp.S diff --git a/libpsn00b/psxapi/_syscalls.s b/libpsn00b/psxapi/_syscalls.S index cef349d..cef349d 100644 --- a/libpsn00b/psxapi/_syscalls.s +++ b/libpsn00b/psxapi/_syscalls.S diff --git a/libpsn00b/psxapi/drivers.s b/libpsn00b/psxapi/drivers.S index eb6dcd5..eb6dcd5 100644 --- a/libpsn00b/psxapi/drivers.s +++ b/libpsn00b/psxapi/drivers.S diff --git a/libpsn00b/psxapi/fs.s b/libpsn00b/psxapi/fs.S index 8b6d57a..8b6d57a 100644 --- a/libpsn00b/psxapi/fs.s +++ b/libpsn00b/psxapi/fs.S diff --git a/libpsn00b/psxapi/stdio.s b/libpsn00b/psxapi/stdio.S index 14c6d03..14c6d03 100644 --- a/libpsn00b/psxapi/stdio.s +++ b/libpsn00b/psxapi/stdio.S diff --git a/libpsn00b/psxapi/sys.s b/libpsn00b/psxapi/sys.S index 40dcdff..40dcdff 100644 --- a/libpsn00b/psxapi/sys.s +++ b/libpsn00b/psxapi/sys.S diff --git a/libpsn00b/psxetc/_dl_resolve_wrapper.s b/libpsn00b/psxetc/_dl_resolve_wrapper.S index b715720..b715720 100644 --- a/libpsn00b/psxetc/_dl_resolve_wrapper.s +++ b/libpsn00b/psxetc/_dl_resolve_wrapper.S diff --git a/libpsn00b/psxgpu/common.c b/libpsn00b/psxgpu/common.c index 5678f35..6a47f1d 100644 --- a/libpsn00b/psxgpu/common.c +++ b/libpsn00b/psxgpu/common.c @@ -196,7 +196,7 @@ void SetDrawOpType(GPU_DrawOpType type) { _drawop_type = type; } -int EnqueueDrawOp(void (*func)(), uint32_t arg1, uint32_t arg2, uint32_t arg3) { +int EnqueueDrawOp(void (*func)(uint32_t, uint32_t, uint32_t), uint32_t arg1, uint32_t arg2, uint32_t arg3) { _sdk_validate_args(func, -1); // If GPU DMA is currently busy, append the command to the queue instead of 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 diff --git a/libpsn00b/psxpress/vlc.s b/libpsn00b/psxpress/vlc.S index 5707a21..e2efba4 100644 --- a/libpsn00b/psxpress/vlc.s +++ b/libpsn00b/psxpress/vlc.S @@ -5,7 +5,7 @@ # duplicated for each block type, but it can probably be shortened with no # performance impact... -.include "gtereg.inc" +#include "gtereg.inc" .set noreorder .set noat @@ -128,9 +128,9 @@ DecDCTvlcContinue: _vlc_skip_context_load: # Determine how many bytes to output. - # if (max_size <= 0) max_size = 0x3fff0000 - # max_size = min((max_size - 1) * 2, remaining) - # remaining -= max_size + ## if (max_size <= 0) max_size = 0x3fff0000 + ## max_size = min((max_size - 1) * 2, remaining) + ## remaining -= max_size bgtz max_size, .Lmax_size_valid addiu max_size, -1 lui max_size, 0x3fff @@ -174,9 +174,9 @@ _vlc_skip_context_load: .Lprocess_dc_v2_coefficient: # if (!coeff_index && !is_v3) # The DC coefficient in version 2 frames is not compressed. Value 0x1ff is # used to signal the end of the bitstream. - # prefix = window >> (32 - 10) - # if (prefix == 0x1ff) break - # *output = prefix | quant_scale + ## prefix = window >> (32 - 10) + ## if (prefix == 0x1ff) break + ## *output = prefix | quant_scale srl value, window, 22 beq value, temp, .Lstop_processing or value, quant_scale @@ -195,7 +195,7 @@ _vlc_skip_context_load: # block types (packed as two nibbles). Prefix 111111111 is used to signal # the end of the bitstream. # prefix = window >> (32 - 9) - # if (prefix == 0x1ff) break + ## if (prefix == 0x1ff) break # lengths = huffman_table->dc[prefix >> 2] srl length, window, 23 beq length, temp, .Lstop_processing @@ -223,7 +223,7 @@ _vlc_skip_context_load: srlv value, window, $at # Decode the sign bit, then add the decoded delta to the current value. - # if (!(window >> 31)) value -= (1 << dc_length) - 1 + ## if (!(window >> 31)) value -= (1 << dc_length) - 1 bltz window, .Ldc_cr_positive li temp, -1 srlv temp, temp, $at @@ -253,7 +253,7 @@ _vlc_skip_context_load: srlv value, window, $at # Decode the sign bit, then add the decoded delta to the current value. - # if (!(window >> 31)) value -= (1 << dc_length) - 1 + ## if (!(window >> 31)) value -= (1 << dc_length) - 1 bltz window, .Ldc_cb_positive li temp, -1 srlv temp, temp, $at @@ -286,7 +286,7 @@ _vlc_skip_context_load: srlv value, window, $at # Decode the sign bit, then add the decoded delta to the current value. - # if (!(window >> 31)) value -= (1 << dc_length) - 1 + ## if (!(window >> 31)) value -= (1 << dc_length) - 1 bltz window, .Ldc_y_positive li temp, -1 srlv temp, temp, $at @@ -329,7 +329,7 @@ _vlc_skip_context_load: # Prefix 10 marks the end of a block. # *output = 0xfe00 # coeff_index = 0 - # if (--block_index < Y3) block_index = Cr + ## if (--block_index < Y3) block_index = Cr sll window, 1 addiu bit_offset, -2 sh temp, 0(output) @@ -538,7 +538,7 @@ _vlc_skip_context_load: addiu output, 2 .Lstop_processing: - # If remaining = 0, skip flushing the context, pad the output buffer with + ## If remaining = 0, skip flushing the context, pad the output buffer with # end-of-block codes if necessary and return 0. Otherwise flush the context # and return 1. beqz remaining, .Lpad_output_buffer diff --git a/libpsn00b/smd/smd.s b/libpsn00b/smd/smd.S index 3c87a5e..693f2cd 100644 --- a/libpsn00b/smd/smd.s +++ b/libpsn00b/smd/smd.S @@ -3,9 +3,9 @@ .set noreorder -.include "gtereg.inc" -.include "inline_s.inc" -.include "smd/smd_s.inc" +#include "gtereg.inc" +#include "inline_s.inc" +#include "smd/smd_s.inc" # Currently does not do header checks .section .text.smdInitData, "ax", @progbits diff --git a/libpsn00b/smd/smd_cel.s b/libpsn00b/smd/smd_cel.S index 8a39f01..e8cf911 100644 --- a/libpsn00b/smd/smd_cel.s +++ b/libpsn00b/smd/smd_cel.S @@ -3,9 +3,9 @@ .set noreorder -.include "gtereg.inc" -.include "inline_s.inc" -.include "smd/smd_s.inc" +#include "gtereg.inc" +#include "inline_s.inc" +#include "smd/smd_s.inc" .section .text.smdSetCelTex, "ax", @progbits .global smdSetCelTex diff --git a/libpsn00b/smd/smd_flat.s b/libpsn00b/smd/smd_flat.S index 843b8d3..b9235e9 100644 --- a/libpsn00b/smd/smd_flat.s +++ b/libpsn00b/smd/smd_flat.S @@ -3,9 +3,9 @@ .set noreorder -.include "gtereg.inc" -.include "inline_s.inc" -.include "smd/smd_s.inc" +#include "gtereg.inc" +#include "inline_s.inc" +#include "smd/smd_s.inc" .section .text.smdSortModelFlat, "ax", @progbits .global smdSortModelFlat diff --git a/libpsn00b/smd/smdparser.s b/libpsn00b/smd/smdparser.S index 656e509..857f861 100644 --- a/libpsn00b/smd/smdparser.s +++ b/libpsn00b/smd/smdparser.S @@ -3,7 +3,7 @@ .set noreorder -.include "smd/smd_s.inc" +#include "smd/smd_s.inc" .set SMD_PRI_ID, 0 .set SMD_PRI_v0, 4 |
