Fix PE object build for fastcall entry points into interpreter.

This commit is contained in:
Mike Pall
2010-01-05 22:13:20 +01:00
parent 9df01f96b9
commit b3e3bad0ff
4 changed files with 20 additions and 6 deletions

View File

@@ -156,7 +156,11 @@ void emit_asm(BuildCtx *ctx)
int size = (int)(next - prev);
int32_t stop = next;
if (pi >= ctx->npc) {
char *p;
sprintf(name, LABEL_PREFIX "%s", ctx->globnames[pi-ctx->npc]);
/* Always strip fastcall suffix. Wrong for (unused) COFF on Win32. */
p = strchr(name, '@');
if (p) *p = '\0';
emit_asm_label(ctx, name, size, 1);
#if LJ_HASJIT
} else {