Skip to content
Snippets Groups Projects
Commit c535f4c0 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Compiler: Work around for broken 32-bit code generator in gcc 4.8.5.

Gcc 4.8.5 in 32-bit mode compiled the initialization loop for the
byte code relabel section to xmms opcodes that caused a SIGSEGV.

Assume 2-complement integers and use memset to initialize instead.
parent ca43119d
Branches
Tags
No related merge requests found
......@@ -326,16 +326,14 @@ INT32 assemble(int store_linenumbers)
labels=xalloc(sizeof(INT32) * 4 * (max_label+2));
jumps = labels + max_label + 2;
uses = jumps + max_label + 2;
aliases = uses + max_label + 2;
aliases = jumps + max_label + 2;
uses = aliases + max_label + 2;
while(relabel)
{
/* First do the relabel pass. */
for(e=0;e<=max_label;e++)
{
labels[e]=jumps[e]= aliases[e] = -1;
uses[e]=0;
}
/* Set labels, jumps and aliases to all -1. */
memset(labels, 0xff, ((max_label + 2) * 3) * sizeof(INT32));
memset(uses, 0x00, (max_label + 2) * sizeof(INT32));
c=(p_instr *)instrbuf.s.str;
length=instrbuf.s.len / sizeof(p_instr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment