[quake3] q3asm miscompilation
Ludwig Nussel
ludwig.nussel at suse.de
Sat Oct 29 08:49:56 EDT 2005
Ludwig Nussel wrote:
> The attached program miscompiles with q3asm. The syscall trap_Print
> has number -1, the argument in the qvm however is 3 (look for 21 08
> (OP_ARG 8) followed by 08 .. .. .. .. (OP_CONST) in the hex dump).
> The offset seems to be constant. Ie if you use -2 it passed 2
> instead. In larger programs it works though.
works:
static const char buf[] = "hello world\n";
int vmMain()
{
return trap_Print(buf);
}
doesn't:
static const char* buf = "hello world\n";
int vmMain()
{
return trap_Print(buf);
}
cu
Ludwig
--
(o_ Ludwig Nussel
//\ SUSE LINUX Products GmbH, Development
V_/_ http://www.suse.de/
More information about the quake3
mailing list