summaryrefslogtreecommitdiff
path: root/src/buildvm_asm.c
diff options
context:
space:
mode:
authorMike Pall <mike>2009-12-08 20:35:29 +0100
committerMike Pall <mike>2009-12-08 20:35:29 +0100
commit3f1f9e11f4f699ae94182d4cba158092f434a7f6 (patch)
tree88fbb674a21a1d554d4b1ee9d4ef2c5fed6a1d88 /src/buildvm_asm.c
parent5287b9326479ea2b7dddd6f642673e58e5a7f354 (diff)
downloadluajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.gz
luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.tar.bz2
luajit-3f1f9e11f4f699ae94182d4cba158092f434a7f6.zip
Fast forward to sync public repo.
Compile math.sinh(), math.cosh(), math.tanh() and math.random(). Compile various io.*() functions. Drive the GC forward on string allocations in the parser. Improve KNUM fuse vs. load heuristics. Add abstract C call handling to IR.
Diffstat (limited to 'src/buildvm_asm.c')
-rw-r--r--src/buildvm_asm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/buildvm_asm.c b/src/buildvm_asm.c
index 5daab13b..31b6f61e 100644
--- a/src/buildvm_asm.c
+++ b/src/buildvm_asm.c
@@ -26,6 +26,14 @@ static void emit_asm_bytes(BuildCtx *ctx, uint8_t *p, int n)
26static void emit_asm_reloc(BuildCtx *ctx, BuildReloc *r) 26static void emit_asm_reloc(BuildCtx *ctx, BuildReloc *r)
27{ 27{
28 const char *sym = ctx->extnames[r->sym]; 28 const char *sym = ctx->extnames[r->sym];
29 const char *p = strchr(sym, '@');
30 char buf[80];
31 if (p) {
32 /* Always strip fastcall suffix. Wrong for (unused) COFF on Win32. */
33 strncpy(buf, sym, p-sym);
34 buf[p-sym] = '\0';
35 sym = buf;
36 }
29 switch (ctx->mode) { 37 switch (ctx->mode) {
30 case BUILD_elfasm: 38 case BUILD_elfasm:
31 if (r->type) 39 if (r->type)