alpha disas (Falk Hueffner)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@155 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2003-05-11 12:25:45 +00:00
parent 226c91327d
commit a993ba85cf
3 changed files with 1987 additions and 3 deletions

View File

@ -30,10 +30,11 @@ LDFLAGS+=-Wl,-T,s390.ld
endif endif
ifeq ($(ARCH),alpha) ifeq ($(ARCH),alpha)
# -msmall-data is not used because we want two-instruction relocations
# for the constant constructions
OP_CFLAGS=-Wall -O2 -g
# Ensure there's only a single GP # Ensure there's only a single GP
CFLAGS += -msmall-data -msmall-text CFLAGS += -msmall-data -msmall-text
# FIXME Too lazy to deal with gprelhigh/gprellow for now, inhibit them
OP_CFLAGS=$(CFLAGS) -mno-explicit-relocs
LDFLAGS+=-Wl,-T,alpha.ld LDFLAGS+=-Wl,-T,alpha.ld
endif endif
@ -63,7 +64,7 @@ OBJS+= libqemu.a
LIBOBJS+=thunk.o translate-i386.o op-i386.o exec-i386.o LIBOBJS+=thunk.o translate-i386.o op-i386.o exec-i386.o
# NOTE: the disassembler code is only needed for debugging # NOTE: the disassembler code is only needed for debugging
LIBOBJS+=disas.o ppc-dis.o i386-dis.o dis-buf.o LIBOBJS+=disas.o ppc-dis.o i386-dis.o alpha-dis.o dis-buf.o
ifeq ($(ARCH),ia64) ifeq ($(ARCH),ia64)
OBJS += ia64-syscall.o OBJS += ia64-syscall.o
@ -73,6 +74,11 @@ all: qemu qemu-doc.html
qemu: $(OBJS) qemu: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
ifeq ($(ARCH),alpha)
# Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
# the address space (31 bit so sign extending doesn't matter)
echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
endif
depend: $(SRCS) depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend $(CC) -MM $(CFLAGS) $^ 1>.depend

1976
alpha-dis.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -33,6 +33,8 @@ void disas(FILE *out, void *code, unsigned long size, enum disas_type type)
print_insn = print_insn_i386; print_insn = print_insn_i386;
#elif defined(__powerpc__) #elif defined(__powerpc__)
print_insn = print_insn_ppc; print_insn = print_insn_ppc;
#elif defined(__alpha__)
print_insn = print_insn_alpha;
#else #else
fprintf(out, "Asm output not supported on this arch\n"); fprintf(out, "Asm output not supported on this arch\n");
return; return;