mirror of
https://github.com/ctm/syn68k.git
synced 2025-02-19 19:30:59 +00:00
Builds (but doesn't run) on Mac OS X
This commit is contained in:
parent
9939d92e91
commit
cc36e6e260
15
README
15
README
@ -36,9 +36,15 @@ glibc-devel.i386 and libgcc.i386) then try this hack
|
||||
make
|
||||
make install
|
||||
|
||||
Syn68k currently doesn't build under Mac OS X (tested under 10.5.7)
|
||||
do to our unconditional use of "-z execstack" when linking as well as
|
||||
the fact that i486-cleanup.pl essentially consumes all of syn68k.s.
|
||||
To compile syn68k on Mac OS X (tested under 10.5.7), you currently have to
|
||||
override the cleanup script, since the stock script (i486-cleanup.pl) will
|
||||
consume all of syn68k.s. However, even if you do this, the resultant binary
|
||||
will not work.
|
||||
|
||||
./autogen.sh
|
||||
CLEANUP='' ./configure
|
||||
make
|
||||
make install
|
||||
|
||||
To test syn68k, run test/syngentest and compare the output to
|
||||
test/output/10000. It should be the same. If you want to be
|
||||
@ -48,7 +54,8 @@ results to other files, as described in test/output/README.
|
||||
Performance nit:
|
||||
|
||||
The code in runtime/i486-cleanup.pl no longer gets rid of all the
|
||||
cruft in the trailer. It's quite possible that the code in
|
||||
cruft in the trailer (except under Mac OS X, where it gets rid of way
|
||||
too much code). It's quite possible that the code in
|
||||
runtime/i486-optimize.pl doesn't do the right thing either.
|
||||
|
||||
My email address is still <ctm@ardi.com>, although ARDI itself is
|
||||
|
2
TODO
2
TODO
@ -1,7 +1,5 @@
|
||||
Mac OS X fixes:
|
||||
|
||||
Don't link with -z execstack if that's going to fail
|
||||
|
||||
figure out why i486-cleanup.pl basically eats all
|
||||
of syn68k.s
|
||||
|
||||
|
@ -25,7 +25,7 @@ OBJS = block.o diagnostics.o hash.o rangetree.o translate.o alloc.o \
|
||||
blockinfo.o trap.o destroyblock.o callback.o init.o interrupt.o \
|
||||
profile.o dosinterrupts.o deathqueue.o checksum.o native.o \
|
||||
backpatch.o recompile.o \
|
||||
mapindex.o mapinfo.o syn68k.o
|
||||
mapindex.o mapinfo.o syn68k.o opcode_dummy.o
|
||||
|
||||
mapinfo.o: $(host_native)/host-xlate.h
|
||||
|
||||
|
16
runtime/opcode_dummy.c
Normal file
16
runtime/opcode_dummy.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* s68k_handle_opcode_dummy is used to detect portions of assembly in
|
||||
* syn68k.s that are unreachable and should be removed via
|
||||
* i486-cleanup.pl. The call to s68k_handle_opcode_dummy should never
|
||||
* be made. It won't be reachable even if i486-cleanup.pl isn't run,
|
||||
* but it will be assembled and linked in, so that's why we actually
|
||||
* supply s68k_handle_opcode_dummy but expect it to never be called.
|
||||
*/
|
||||
|
||||
void s68k_handle_opcode_dummy (void)
|
||||
{
|
||||
fprintf (stderr, "This function should never be called\n");
|
||||
abort ();
|
||||
}
|
@ -217,7 +217,7 @@ extern void s68k_handle_opcode_dummy (void);
|
||||
asm volatile ("movl %3,%0\n\t" \
|
||||
"addl %4,%1\n\t" \
|
||||
"jmp *%0\n" \
|
||||
"_S68K_DONE_WITH_THIS:" \
|
||||
"/* _S68K_DONE_WITH_THIS: */" \
|
||||
: "=r" (next_code), "=r" (code) : "1" (code), \
|
||||
"g" (*(void **)(code + (words_to_inc) - PTR_WORDS)), \
|
||||
"g" (words_to_inc * sizeof (uint16))); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user