From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: wip-rtl, non-immediate constants like lists and arrays does not have a 64bit aligned address! Date: Sat, 8 Sep 2012 13:49:41 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae9340fb5e9b82a04c92f51fb X-Trace: ger.gmane.org 1347104989 6365 80.91.229.3 (8 Sep 2012 11:49:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2012 11:49:49 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Sep 08 13:49:52 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TAJXq-0006wg-94 for guile-devel@m.gmane.org; Sat, 08 Sep 2012 13:49:50 +0200 Original-Received: from localhost ([::1]:38384 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAJXn-0000IZ-4R for guile-devel@m.gmane.org; Sat, 08 Sep 2012 07:49:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAJXk-0000IN-5j for guile-devel@gnu.org; Sat, 08 Sep 2012 07:49:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAJXj-0007Py-9S for guile-devel@gnu.org; Sat, 08 Sep 2012 07:49:44 -0400 Original-Received: from mail-ie0-f169.google.com ([209.85.223.169]:43362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAJXj-0007Pn-50 for guile-devel@gnu.org; Sat, 08 Sep 2012 07:49:43 -0400 Original-Received: by iec9 with SMTP id 9so602009iec.0 for ; Sat, 08 Sep 2012 04:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=wX03n3VBKXe9/rz7x83C8XdPUaJsrwpDLktfxYp3ork=; b=twQ3J1Md1VfMjlql/W/n6cecOGNn5Mr4W06wYV/pCwwfZneBqEUr6Tq7F7JdHLGqf8 jHsuljqNNDRwMyF1XrUnHGZAGY/nn03nPSeNJK6SKmxcRFXSNpwe0gRSXOJwVBpDukEU LwaX8tS7/bURYC7yvGob20CW2dhO9WuWdv/ZRIM1QUXMUe1AJDwFGdn5nT+4nQveHzUK qjXDaVtxYHFjendruzmt4OTKVws9/km0oNA0pFMUeQnGp1EqVSpCicxDSv7EZfxOkITy emfNSOhV8shsxA/kUQxUHScu+457RB+7mzVbbkZLRi+dHcc/IL3sxA8x9tu79gXA+YX1 7xCA== Original-Received: by 10.50.57.202 with SMTP id k10mr2153439igq.45.1347104981759; Sat, 08 Sep 2012 04:49:41 -0700 (PDT) Original-Received: by 10.50.178.34 with HTTP; Sat, 8 Sep 2012 04:49:41 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.223.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14866 Archived-At: --14dae9340fb5e9b82a04c92f51fb Content-Type: text/plain; charset=ISO-8859-1 Hi, I was a bit surprised when I coded the native versions of rtl-sinstruction, make-non-immediate I just assumed that alignement meant 64bit on 64bit platforms. It doesen't in for example, (define const (assemble-program `((begin-program test-bind-rest) (assert-nargs-ee/locals 0 2) (load-constant 0 '(1 2)) (load-constant 1 #(1)) (cons 0 0 1) (return 0) (end-program)))) --> ??dissassembles into ;;; ((assert-nargs-ee/locals (op : 20) (expected : 0) (nlocals : 2))) ;;; ((inst)) ;;; ((make-non-immediate (op : 52) (dst : 0) (offset : -7) (ip : 20677408))) ;;; ((inst)) ;;; ((make-non-immediate (op : 52) (dst : 1) (offset : -31) (ip : 20677320))) ;;; ((inst)) ;;; ((cons (op : 74) (dst : 0) (x : 0) (y : 1))) ;;; ((inst)) ;;; ((return (op : 5) (src : 0))) And we see that 20677320 & 8 == 8, hence not 64 bit aligned. Assuming alignment meant 32bit the native code works very well! But would I dear to suggest that we try to keep all non immediates aligned on 64bit boundaries? /Stefan --14dae9340fb5e9b82a04c92f51fb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I was a bit surprised when I coded the native versions of rt= l-sinstruction, make-non-immediate I just
assumed that alignement meant = 64bit on 64bit platforms. It doesen't in for example,

(define co= nst
=A0 (assemble-program
=A0=A0 `((begin-program test-bind-rest)
=A0=A0= =A0=A0 (assert-nargs-ee/locals 0 2)
=A0=A0=A0=A0 (load-constant 0 '(= 1 2))
=A0=A0=A0=A0 (load-constant 1 #(1))
=A0=A0=A0=A0 (cons 0 0 1)=A0=A0=A0=A0 (return 0)
=A0=A0=A0=A0 (end-program))))

-->
??dissassembles into

;;; ((assert-nargs-ee/locals (op = : 20) (expected : 0) (nlocals : 2)))

;;; ((inst))

;;; ((make-= non-immediate (op : 52) (dst : 0) (offset : -7) (ip : 20677408)))

;;; ((inst))

;;; ((make-non-immediate (op : 52) (dst : 1) (offset : = -31) (ip : 20677320)))

;;; ((inst))

;;; ((cons (op : 74) (dst= : 0) (x : 0) (y : 1)))

;;; ((inst))

;;; ((return (op : 5) (s= rc : 0)))

And we see that 20677320 & 8 =3D=3D 8, hence not 64 bit aligned. As= suming alignment meant 32bit
the native code works very well!

But= would I dear to suggest that we try to keep all non immediates aligned on = 64bit boundaries?

/Stefan
--14dae9340fb5e9b82a04c92f51fb--