unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* wip-rtl, non-immediate constants like lists and arrays does not have a 64bit aligned address!
@ 2012-09-08 11:49 Stefan Israelsson Tampe
  0 siblings, 0 replies; only message in thread
From: Stefan Israelsson Tampe @ 2012-09-08 11:49 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1195 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-08 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-08 11:49 wip-rtl, non-immediate constants like lists and arrays does not have a 64bit aligned address! Stefan Israelsson Tampe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).