diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-17 23:07:17 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-17 23:07:17 -0800 |
commit | d8b215486245e84e33283b6047fb253bbb418e00 (patch) | |
tree | 4c07a4d3162a0390be0b55d619ddab0e7a6acb23 /Makefile | |
parent | f1e1cc4695b34b292454e903adbf09e66cf2e9d5 (diff) |
First version of an assembly language decoder.
It is slower than the C decoder for now because it
falls off the fast path too often. But it can
successfully decode varints, fixed32 and fixed64.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -77,6 +77,9 @@ STREAM= \ src/upb_msg.c \ src/upb_glue.c \ +ASMCORE= \ + src/upb_decoder_x64.asm + # Parts of core that are yet to be converted. OTHERSRC=src/upb_encoder.c src/upb_text.c @@ -114,8 +117,8 @@ LIBUPB=src/libupb.a LIBUPB_PIC=src/libupb_pic.a lib: $(LIBUPB) -OBJ=$(patsubst %.c,%.o,$(SRC)) -PICOBJ=$(patsubst %.c,%.lo,$(SRC)) +OBJ=$(patsubst %.c,%.o,$(SRC)) src/upb_decoder_x64.o +PICOBJ=$(patsubst %.c,%.lo,$(SRC)) src/upb_decoder_x64.lo $(LIBUPB): $(OBJ) $(E) AR $(LIBUPB) $(Q) ar rcs $(LIBUPB) $(OBJ) @@ -135,12 +138,19 @@ $(LIBUPB_PIC): $(PICOBJ) # critical path but gets very large when -O3 is used. src/upb_def.o: src/upb_def.c $(E) CC $< - $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -O0 -c -o $@ $< + $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< src/upb_def.lo: src/upb_def.c $(E) 'CC -fPIC' $< - $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -O0 -c -o $@ $< -fPIC + $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< -fPIC + +src/upb_decoder_x64.o: src/upb_decoder_x64.asm + $(E) NASM $< + $(Q) nasm -Ox src/upb_decoder_x64.asm -o src/upb_decoder_x64.o -f macho64 +src/upb_decoder_x64.lo: src/upb_decoder_x64.asm + $(E) NASM $< + $(Q) nasm -Ox src/upb_decoder_x64.asm -o src/upb_decoder_x64.o -f macho64 # Function to expand a wildcard pattern recursively. rwildcard=$(strip $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)$(filter $(subst *,%,$2),$d))) |