Evil nasty hack to fix dispatch code using binutils 2.9.5.
This commit is contained in:
@@ -111,6 +111,8 @@ main (int argc, char **argv)
|
||||
|
||||
printf("#define kTriProcOffset 0x%XUL\n",
|
||||
offsetof(struct GrGC_s, cmdTransportInfo.triSetupProc));
|
||||
printf("#define kTriProcOffsetClean %d\n",
|
||||
offsetof(struct GrGC_s, cmdTransportInfo.triSetupProc));
|
||||
#endif /* GLIDE_DISPATCH_SETUP */
|
||||
|
||||
printf("/* The # of 2-byte entries in the hw fog table */\n");
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.1.1.1 1999/12/07 21:49:10 joseph
|
||||
** Initial checkin into SourceForge.
|
||||
**
|
||||
**
|
||||
** 98 6/02/98 8:03p Peter
|
||||
** Mmmmm.... points
|
||||
@@ -684,10 +687,27 @@ all_done:
|
||||
#if !defined(BIG_OPT)
|
||||
asm( "popl %%ebp" : /* no outputs*/ : /* no inputs */ : "ebp");
|
||||
#endif
|
||||
asm( "jmp %0"
|
||||
: /* no outputs */
|
||||
|
||||
/* This is a really disgusting hack but I can't seem to get gcc's extended
|
||||
* inline asm to generate *kTriProcOffset(%0). If anyone can do that
|
||||
* please do. */
|
||||
#define MAKE_OFFSET_PASS_2(offset) "jmp *" #offset "(%0)"
|
||||
#define MAKE_OFFSET(offset) MAKE_OFFSET_PASS_2(offset)
|
||||
asm( MAKE_OFFSET (kTriProcOffsetClean)
|
||||
: /* no outputs */
|
||||
: "r" (_GlideRoot.curGC)
|
||||
);
|
||||
|
||||
/* This nice clean solution used to work. It generated slightly bad asm
|
||||
* but as version 2.9.1 would assemble it with a warning. It breaks
|
||||
* on as version 2.9.5. */
|
||||
#if 0
|
||||
asm( "jmp %0"
|
||||
: /* no outputs */
|
||||
: "m" (_GlideRoot.curGC->cmdTransportInfo.triSetupProc)
|
||||
);
|
||||
#endif /* 0 */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#undef FN_NAME
|
||||
|
||||
Reference in New Issue
Block a user