Generated asm files

SGDK only sub forum

Moderator: Stef

tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Generated asm files

Post by tryphon »

Hello,

I wanted to have a look at the asm files generated by gcc, so I tried using the -S tag in the makefile :

Code: Select all

DEFAULT_FLAGS= -m68000 -Wall -fno-builtin $(INCS) -B$(BIN) -S
Then I cleant my project :

Code: Select all

make.exe -f makefile.gen clean
and built :

Code: Select all

make-exe -f makefile.gen debug
I had this error (the program compiles flawlessly without -S) :
C:\Users\Tryphon\Documents\hack\Shinobi\tests\objmg01>C:\sgdk100\bin\make.exe -f makefile.gen debug
c:/sgdk100/bin/ld -T c:/sgdk100/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
out/rom_head.o: file not recognized: File format not recognized
make: *** [out/rom_head.bin] Error 1
Since rom_head.o is generated by SGDK and not by me, I feel reluctant to delete it. But I'd like to see the asm files. So what must I do ?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

That is expected as using -S switch will generate assembly output instead of binary output inside the .o file.
So when the compiler try to link them it fails, just open your .o file in text editor to see the assembly code =)
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

Except that the error occurs at compilation, not at linking. I assume the rom_header.o file wasn't erased by the make clean. Can I delete it ?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

Given your log :
C:\Users\Tryphon\Documents\hack\Shinobi\tests\objmg01>C:\sgdk100\bin\make.exe -f makefile.gen debug
c:/sgdk100/bin/ld -T c:/sgdk100/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
out/rom_head.o: file not recognized: File format not recognized
make: *** [out/rom_head.bin] Error 1
It seems your error come at linking stage...
Also i guess you have this error as your rom_head.o contains assembly listing (as you compiled it with -S switch).
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

You're right :)

But rom_head.o is the first file processed. The error occurs then, and no other file is processed. There are no .o files in the out directory excepted rom_head.o (which is indeed an asm text file, but without much interest).

How to get the others ?

There's something I didn't understand : I thought linking would occur after all the sources .c files would have been compiled. It seems rather that it compiles a file, then links, then compiles another, then links, etc.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

tryphon wrote:You're right :)

But rom_head.o is the first file processed. The error occurs then, and no other file is processed. There are no .o files in the out directory excepted rom_head.o (which is indeed an asm text file, but without much interest).

How to get the others ?

There's something I didn't understand : I thought linking would occur after all the sources .c files would have been compiled. It seems rather that it compiles a file, then links, then compiles another, then links, etc.
Normally yes it should link at the end and you should find others .o files in the out directory, maybe it delete them after the error O_o ?
Did you try to 'clean' your project then rebuild it from scratch ?
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

Yes (I wrote it in the original post, and to make sure, I deleted the whole content of the out dir, with the same result).

And I'm pretty sure it doesn't even compile other files because I work on a quite weak machine and building my entire project from scratch takes some minutes, whereas I get this error immediately.

I don't know if it helps, but here's my makefile (that's the original from sgdk dir, modified to take into account a src/chars directory, plus the -S tag anf maybe another one exporting the symbols table) :

Code: Select all

BIN= $(GDK)/bin
LIB= $(GDK)/lib

LIBSRC= $(GDK)/src
LIBRES= $(GDK)/res
LIBINCLUDE= $(GDK)/inc

SRC= src
RES= res
INCLUDE= inc

SHELL= $(BIN)/sh
RM= $(BIN)/rm
CP= $(BIN)/cp
AR= $(BIN)/ar
CC= $(BIN)/gcc
LD= $(BIN)/ld
NM= $(BIN)/nm
ECHO= echo
OBJCPY= $(BIN)/objcopy
ASMZ80= $(BIN)/sjasm
MACCER= $(BIN)/mac68k
SIZEBND= $(BIN)/sizebnd
BINTOS= $(BIN)/bintos
GENRES= $(BIN)/genres
RESCOMP= $(BIN)/rescomp
MKDIR= $(BIN)/mkdir

SRC_C= $(wildcard *.c)
SRC_C+= $(wildcard $(SRC)/*.c)
SRC_C+= $(wildcard $(SRC)/chars/*.c)

SRC_S= $(wildcard *.s)
SRC_S+= $(wildcard $(SRC)/*.s)
SRC_ASM= $(wildcard *.asm)
SRC_ASM+= $(wildcard $(SRC)/*.asm)
SRC_S80= $(wildcard *.s80)
SRC_S80+= $(wildcard $(SRC)/*.s80)

RES_C= $(wildcard $(RES)/*.c)
RES_S= $(wildcard $(RES)/*.s)
RES_RC= $(wildcard *.rc)
RES_RC+= $(wildcard $(RES)/*.rc)
RES_RES= $(wildcard *.res)
RES_RES+= $(wildcard $(RES)/*.res)

OBJ= $(RES_RES:.res=.o)
OBJ+= $(RES_RC:.rc=.o)
OBJ+= $(RES_S:.s=.o)
OBJ+= $(RES_C:.c=.o)
OBJ+= $(SRC_S80:.s80=.o)
OBJ+= $(SRC_ASM:.asm=.o)
OBJ+= $(SRC_S:.s=.o)
OBJ+= $(SRC_C:.c=.o)

OBJS = $(addprefix out/, $(OBJ))

INCS= -I$(INCLUDE) -I$(SRC) -I$(RES) -I$(LIBINCLUDE) -I$(LIBRES)
DEFAULT_FLAGS= -m68000 -Wall -fno-builtin $(INCS) -B$(BIN) -S
FLAGSZ80= -i$(SRC) -i$(INCLUDE) -i$(RES) -i$(LIBSRC) -i$(LIBINCLUDE)


#release: FLAGS= $(DEFAULT_FLAGS) -O3 -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer
release: FLAGS= $(DEFAULT_FLAGS) -O1 -fomit-frame-pointer
release: out/rom.bin

debug: FLAGS= $(DEFAULT_FLAGS) -O1 -ggdb -DDEBUG=1
debug: out/rom.bin out/rom.out out/symbol.txt


all: release
default: release

.PHONY: clean


clean:
	$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin

cleanrelease:
	$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin

cleandebug:
	$(RM) -f $(OBJS) out.lst out/cmd_ out/sega.o out/rom_head.bin out/rom_head.o out/rom.nm out/rom.wch out/rom.out out/rom.bin out/symbol.txt

cleanobj:
	$(RM) -f $(OBJS) out/sega.o out/rom_head.bin out/rom_head.o out/rom.out

out/rom.bin: out/rom.out
	$(OBJCPY) -O binary out/rom.out out/rom.bin
	$(SIZEBND) out/rom.bin -sizealign 131072

out/symbol.txt: out/rom.out
	$(NM) out/rom.out > out/symbol.txt

out/rom.out: out/sega.o out/cmd_ $(LIB)/libmd.a
	$(CC) -B$(BIN) -n -T $(GDK)/md.ld -nostdlib out/sega.o @out/cmd_ $(LIB)/libmd.a $(LIB)/libgcc.a -o out/rom.out
	$(RM) out/cmd_

out/cmd_: $(OBJS)
	$(ECHO) "$(OBJS)" > out/cmd_

out/sega.o: $(SRC)/boot/sega.s out/rom_head.bin
	$(MKDIR) -p out
	$(CC) $(FLAGS) -c $(SRC)/boot/sega.s -o $@

out/rom_head.bin: out/rom_head.o
	$(LD) -T $(GDK)/md.ld -nostdlib --oformat binary -o $@ $<

out/rom_head.o: $(SRC)/boot/rom_head.c
	$(MKDIR) -p out
	$(CC) $(FLAGS) -c $< -o $@

$(SRC)/boot/sega.s: $(LIBSRC)/boot/sega.s
	$(MKDIR) -p $(SRC)/boot
	$(CP) $< $@

$(SRC)/boot/rom_head.c: $(LIBSRC)/boot/rom_head.c
	$(MKDIR) -p $(SRC)/boot
	$(CP) $< $@


out/%.o: %.c
	$(MKDIR) -p out
	$(MKDIR) -p out/src
	$(MKDIR) -p out/src/chars
	$(MKDIR) -p out/res
	$(CC) $(FLAGS) -c $< -o $@

out/%.o: %.s
	$(MKDIR) -p out
	$(MKDIR) -p out/src
	$(MKDIR) -p out/res
	$(CC) $(FLAGS) -c $< -o $@

%.s: %.res
	$(RESCOMP) $< $@

%.asm: %.rc
	$(GENRES) $< $@

%.s: %.asm
	$(MACCER) -o $@ $<

%.o80: %.s80
	$(ASMZ80) $(FLAGSZ80) $< $@ out.lst

%.s: %.o80
	$(BINTOS) $<
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

I don't see anything wrong with your makefile, it looks like your OBJS definition is empty so it just compiles rom_head.c and sega.s then link directly.
If you remove the -S flag and try to rebuild your project, can you see in which order it does execute commands ?
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

If I remove the -S tag, everything compiles flawlessly :
C:\Users\Tryphon\Documents\hack\Shinobi\tests\objmg01>C:\sgdk100\bin\make.exe -f makefile.gen debug
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/boot/rom_head.c -o out/rom_head.o
c:/sgdk100/bin/ld -T c:/sgdk100/md.ld -nostdlib --oformat binary -o out/rom_head.bin out/rom_head.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/boot/sega.s -o out/sega.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/camera.c -o out/src/camera.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/collisions.c -o out/src/collisions.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/debug.c -o out/src/debug.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/input.c -o out/src/input.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/ints.c -o out/src/ints.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/main.c -o out/src/main.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/object.c -o out/src/object.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/projectile.c -o out/src/projectile.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/stagemap.c -o out/src/stagemap.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/tsprite.c -o out/src/tsprite.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/musashi.c -o out/src/chars/musashi.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/musashi_states.c -o out/src/chars/musashi_states.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/punk.c -o out/src/chars/punk.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/punk_states.c -o out/src/chars/punk_states.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/shooter.c -o out/src/chars/shooter.o
16 [main] ? (18348) c:\sgdk100\bin\gcc.EXE: *** fatal error - c:\sgdk100\bin\gcc.EXE: *** couldn't allocate heap, Win32 error 0, base 0xC30000, top 0xC40000, reserve_size 61440, allocsize 65536, page_const 4096
27 [main] gcc 12324 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x100, errno 11
11 [main] ? (11164) c:\sgdk100\bin\gcc.EXE: *** fatal error - c:\sgdk100\bin\gcc.EXE: *** couldn't allocate heap, Win32 error 0, base 0xC30000, top 0xC40000, reserve_size 61440, allocsize 65536, page_const 4096
8246039 [main] gcc 12324 fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x100, errno 11
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/shooter_states.c -o out/src/chars/shooter_states.o
c:/sgdk100/bin/mkdir -p out
c:/sgdk100/bin/mkdir -p out/src
c:/sgdk100/bin/mkdir -p out/src/chars
c:/sgdk100/bin/mkdir -p out/res
c:/sgdk100/bin/gcc -m68000 -Wall -fno-builtin -Iinc -Isrc -Ires -Ic:/sgdk100/inc -Ic:/sgdk100/res -Bc:/sgdk100/bin -O1 -ggdb -DDEBUG=1 -c src/chars/shuriken.c -o out/src/chars/shuriken.o
echo "out/src/camera.o out/src/collisions.o out/src/debug.o out/src/input.o out/src/ints.o out/src/main.o out/src/object.o out/src/projectile.o out/src/stagemap.o out/src/tsprite.o out/src/chars/musashi.o out/src/chars/musashi_states.o out/src/chars/punk.o out/src/chars/punk_states.o out/src/chars/shooter.o out/src/chars/shooter_states.o out/src/chars/shuriken.o" > out/cmd_
c:/sgdk100/bin/gcc -Bc:/sgdk100/bin -n -T c:/sgdk100/md.ld -nostdlib out/sega.o @out/cmd_ c:/sgdk100/lib/libmd.a c:/sgdk100/lib/libgcc.a -o out/rom.out
c:/sgdk100/bin/rm out/cmd_
c:/sgdk100/bin/objcopy -O binary out/rom.out out/rom.bin
c:/sgdk100/bin/sizebnd out/rom.bin -sizealign 131072
c:/sgdk100/bin/nm out/rom.out > out/symbol.txt
dub
Very interested
Posts: 101
Joined: Thu Mar 19, 2015 1:26 pm

Re: Generated asm files

Post by dub »

I think it's because you use "-S" like global value for all your compilation.

If you wan to see only the asm code for your c files, try this :
- Remove "-s" from default_flags
- Change this in your makefile :

out/%.o: %.c
$(MKDIR) -p out
$(MKDIR) -p out/src
$(MKDIR) -p out/res
$(CC) -S $(FLAGS) -c $< -o $@

This may work, you can't make a bin file for your MD with this, but you must see your asm code in out/src/main.o
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

Thanks a lot, it worked like a charm :)

My deep ignorance of the make tool is to blame.

It may be interesting to provide an option in the makefile, so that "make -f makefile.gen asm" (for example) generates the asm files rather than a normal compilation ?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

Actually i was always using the -S switch globally without having any problem (probably because my rom_head.o was already generated) but now i understand, it comes from the order of the build command which require rom_head.bin to be done first, i can change that ;)

About using a special "asm" target for the makefile, why not, it should be easy to add :)
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

The asm file is full of obscure primitives and labels. Can I remove safely some (most) of them ?

For example, .LFBx and .LFEx labels seems to indicate begin and end of functions, but don't seem to be used anywhere.

Labels of the form .LFCIx, I have no idea what they are meaning, but they too don't seem to be used.

Primitives like .file, .section, .text, .data, .loc..., are they useful ? Even .align seems bizarre to me, since I can find them between two regular 68000 instructions, where it's impossible the data isn't aligned...
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Generated asm files

Post by Stef »

Do you want to modify the generated asm file then use it as source asm file for compilation ?
In this case yeah you can remove some useless label, @function declaration and so on.
But at least keep .align before function entry point as you need to preserve the .text or .data section declaration.
tryphon
Very interested
Posts: 316
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Generated asm files

Post by tryphon »

Thanks :)

Yes, that's what I want to do (more exactly, I want to use the generated asm file as a first draft, then optimize little by little) (more more exactly, I want to do that if C optimizations still don't give me decent result).
Post Reply