@@ -339,13 +339,16 @@ class BackendLinux86 : CompilerBackend {
339339 assert (! inScope);
340340 inScope = true ;
341341
342- words[node.name] = Word(false , false , []);
342+ words[node.name] = Word(node.raw, false , []);
343+
344+ string symbol =
345+ node.raw? node.name : format(" __func__%s" , node.name.Sanitise());
343346
344347 if (exportSymbols) {
345- output ~= format(" global __func__ %s\n " , node.name.Sanitise() );
348+ output ~= format(" global %s\n " , symbol );
346349 }
347350
348- output ~= format(" __func__ %s:\n " , node.name.Sanitise() );
351+ output ~= format(" %s:\n " , symbol );
349352
350353 foreach (ref inode ; node.nodes) {
351354 compiler.CompileNode(inode);
@@ -755,7 +758,10 @@ class BackendLinux86 : CompilerBackend {
755758 Error(node.error, " Function '%s' doesn't exist" );
756759 }
757760
758- output ~= format(" mov rax, __func__%s\n " , node.func.Sanitise());
761+ auto word = words[node.func];
762+ string symbol = word.raw? node.func : format(" __func__%s" , node.func.Sanitise());
763+
764+ output ~= format(" mov rax, %s\n " , symbol);
759765 output ~= " mov [r15], rax\n " ;
760766 output ~= " add r15, 8\n " ;
761767 }
0 commit comments