Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion JIT & branches under the Sun

Newsgroups: perl.perl6.internals
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stanford.edu!nntp.perl.org
Return-Path: <steph...@modxml.org>
Mailing-List: contact perl6-internals-h...@perl.org; run by ezmlm
Delivered-To: mailing list perl6-intern...@perl.org
Received: (qmail 27789 invoked by uid 76); 14 Feb 2004 12:34:19 -0000
Received: from x1.develooper.com (HELO x1.develooper.com) (63.251.223.170) by onion.perl.org (qpsmtpd/0.26) with SMTP; Sat, 14 Feb 2004 04:34:19 -0800
Received: (qmail 4848 invoked by uid 225); 14 Feb 2004 12:34:18 -0000
Delivered-To: perl6-intern...@perl.org
Received: (qmail 4830 invoked by alias); 14 Feb 2004 12:34:10 -0000
Received: from [81.221.250.52] (HELO mail03.agrinet.ch) (81.221.250.52)  by la.mx.develooper.com (qpsmtpd/0.27-dev) with ESMTP; Sat, 14 Feb 2004 04:34:10 -0800
Received: from pittypanda (81.6.63.152) by mail03.agrinet.ch (7.0.024)        id 402AB4D7000733EF; Sat, 14 Feb 2004 13:34:08 +0100
Date: Sat, 14 Feb 2004 13:39:25 +0100
To: Leopold Toetsch <l...@toetsch.at>
Cc: perl6-intern...@perl.org
Subject: Re: JIT & branches under the Sun
Message-ID: <20040214123925.GA1928@pittypanda>
References: <20040212210728.GA1436@pittypanda> <200402130948.i1D9m9M07002@thu8.leo.home>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200402130948.i1D9m9M07002@thu8.leo.home>
User-Agent: Mutt/1.4.1i
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on x1.develooper.com
X-Spam-Status: No, hits=-4.9 required=8.0 tests=BAYES_00 autolearn=ham 	version=2.63
X-SMTPD: qpsmtpd/0.26, http://develooper.com/code/qpsmtpd/
Approved: n...@nntp.perl.org
From: steph...@modxml.org (Stephane Peiry)

On Fri, Feb 13, 2004 at 10:48:09AM +0100, Leopold Toetsch wrote:
> I don't know suns JIT code nor the assembler syntax, but it seems that
> the two subcc lines are broken:
> 
> 	emitm_subcc_r(NATIVECODE, MAP[1], emitm_g(0), emitm_g(0));
> 
> If I understand that correctly it should read:
> 
> 	emitm_subcc_r(NATIVECODE, MAP[1], MAP[1], emitm_g(0));

This would actually compare, say I1, to itself,  and would then always be equal.
So as I understand it, the line is ok: the subcc_r lines build these "synthetic"
instructions where a compare is

    cmp  reg, reg_or_imm  <-->  subcc reg, reg_or_imm, %g0

Since <if> compares reg to 0 (as the not jitted core does), it uses register %g0
(for reg_or_imm) which contains 0 (%g0 is actually a  special register  in sparc
always containing 0 no matter how - its just "constant 0"). Hence we have

    subcc reg, %g0, %g0

and in parrot(jit) terms:

    emitm_subcc_r(NATIVECODE, MAP[1], emitm_g(0), emitm_g(0));

Somehow I thaught that the problem could lie in the "optimize" section? Is there
any simple way to disable that for jit?  (it seems quite hardwired atm).  Also,
whats a good way to debug jit?  meanning, I'm able to step through and see what
is going on with gdb while still in "parrot itself" so to speak, but as soon as
it jumps in jit.. its just a sort of blackbox.

> > PS.: placing a 'print I1' within the loop resolves the problem,
> 
> That could clear g(0) ...
As said %g0 is just always 0, the only thing is that this one kind of "jumps
out of jit"?

> 
> leo

Thanks,
Stephane