Oz and Mozart Hackers Mailing List

Re: good news from the inline-opcode-map branch


From: duchier@ps.uni-sb.de
Date: Tue Dec 09 2003 - 15:06:57 CET


glynn@info.ucl.ac.be (Kevin Glynn) writes:

> Sure enough running conftest returns 1. I don't understand what it is
> doing, so if you can tell me how to debug it I would be pleased ...

Wait a little bit, I think I finally understood why gcc seemed to
generate the wrong code. It's very tricky. Contrary to what I
thought, it is not enough to have an if (init) { ... } section with
explicit jumps to the fake labels. The reason is that gcc is very
clever and takes into a account that those would be the _only_ ways to
reach these labels. We really have to take the addresses of the
labels and store them in a datastructure that is globally accessible.
I believe this is the only way to trick gcc into really believing that
these labels might escape (and thus be jumped to when executing a
threaded bytecode program).

I eventually realized this was the problem after staring in disbelief
at the assembly code for printf statements that I added and for which
the compiler clearly believed that the args to printed where all
zeros.

I am working on testing this new theory. I'll let you know how it
turns out.

Cheers,

-- 
Denys Duchier - Équipe Calligramme - LORIA, Nancy, France
-
Please send submissions to hackers@mozart-oz.org
and administriva mail to hackers-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.



This archive was generated by hypermail 2b29.