compiling asm...

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

compiling asm...

Post by evilo »

Hi all,

I just switch to ps2sdk, and I have now problems when compiling asm codes (working before with ps2lib), so I guess that sthg in the environment must be wrong... ?

when I compile the gs lib, and I have the following errors,
first with dma.asm.s :

$ make all
ee-gcc -D_EE -O2 -G0 -Wall -I/usr/local/ps2dev/sdk/ee/include I/usr/local/ps2d ev/sdk/common/include -I. -c gs/gs.c -o gs/gs.o ee-gcc -D_EE -O2 -G0 -Wall -I/usr/local/ps2dev/sdk/ee/include -I/usr/local/ps2d
ev/sdk/common/include -I. -c gs/g2.c -o gs/g2.o
ee-as -G0 gs/ps2_asm.s -o gs/ps2_asm.o
ee-as -G0 gs/dma_asm.s -o gs/dma_asm.o
gs/dma_asm.s: Assembler messages:
gs/dma_asm.s:49: Error: illegal operands `daddu v0,zero,zero'
gs/dma_asm.s:50: Error: illegal operands `jr ra'
make: *** [gs/dma_asm.o] Error 1

then with gs_asm.s
ee-as -G0 gs/gs_asm.s -o gs/gs_asm.o
gs/gs_asm.s: Assembler messages:
gs/gs_asm.s:22: Error: illegal operands `li a0,0x0000FF00'
gs/gs_asm.s:23: Error: illegal operands `ld v0,csr'
gs/gs_asm.s:24: Error: illegal operands `dsrl v0,16'
gs/gs_asm.s:25: Error: illegal operands `andi v0,0xFF'
gs/gs_asm.s:26: Error: illegal operands `li v1,0x71'
gs/gs_asm.s:31: Error: illegal operands `daddu v0,zero,zero'
gs/gs_asm.s:32: Error: illegal operands `jr ra'
gs/gs_asm.s:42: Error: illegal operands `li v1,0x02'
gs/gs_asm.s:46: Error: illegal operands `daddu v0,zero,zero'
gs/gs_asm.s:47: Error: illegal operands `jr ra'
make: *** [gs/gs_asm.o] Error 1

for the moment, I just copy paste the .o from another project, but of course I'd like to fix this !!

if anyone can help ?
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

Try renaming the assembly files so that the .s is captialised as .S. That way it will be run through the preprocessor. Failing that try adding the -xassembler-with-cpp switch to the EE_ASFLAGS in your makefile.
User avatar
Saotome
Posts: 182
Joined: Sat Apr 03, 2004 3:45 am

Post by Saotome »

maybe its because of that:

Code: Select all

#include "regs.h"
maybe you dont have this file in the right directory, or dont have that #include-line
just a quess ;)
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Post by evilo »

TyRaNiD wrote:Try renaming the assembly files so that the .s is captialised as .S. That way it will be run through the preprocessor. Failing that try adding the -xassembler-with-cpp switch to the EE_ASFLAGS in your makefile.
you're the king, it was that, I changed the extension to .S and it works !

thanx !
Post Reply