Re: diff to tonight's kaffe cvs tree to work on ppc

6 messages, 3 authors, 2000-07-25 · open the first message on its own page

Re: diff to tonight's kaffe cvs tree to work on ppc

From: Kevin B. Hendricks <hidden>
Date: 2000-07-25 13:13:19

Hi Godmar,
Is the stack alignment code 64bit safe?
As promised, here is the clean up patch.  It should be applied after my first
patch.

The only assumption I am making here is that sizeof(unsigned int) = sizeof(void
*).
This should be true on both 64 bit and 32 bit systems.

I have attached the patch.

Hope you will commit these changes to the official kaffe tree.

Thanks,

Kevin

Re: diff to tonight's kaffe cvs tree to work on ppc

From: <hidden>
Date: 2000-07-25 13:33:56

"Kevin B. Hendricks" wrote:
Hi Godmar,
quoted
Is the stack alignment code 64bit safe?
As promised, here is the clean up patch.  It should be applied after my first
patch.

The only assumption I am making here is that sizeof(unsigned int) = sizeof(void
*).
This should be true on both 64 bit and 32 bit systems.
Hi Kevin,

  This is only true as far as the 64 bit systems running on the 32 bit kernel,
which is all there is at the moment.

  Work has started on the 64 bit PowerPC Linux kernel, if Kaffe is compiled as a
64 bit app for that kernel then sizeof(unsigned long) = sizeof(void *) will be
true. Certainly not a big deal at this stage, but thought you'd be interested
none the less.

  Regards,

  Tom

--
Tom Gall - PowerPC Linux Team    "Where's the ka-boom? There was
Linux Technology Center           supposed to be an earth
(w) tom_gall@vnet.ibm.com         shattering ka-boom!"
(w) 507-253-4558                 -- Marvin Martian
(h) tgall@uswest.net
http://oss.software.ibm.com/developerworks/opensource/linux

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: diff to tonight's kaffe cvs tree to work on ppc

From: Kevin B. Hendricks <hidden>
Date: 2000-07-25 14:03:39

Hi Tom,

Good to hear from you again!
  This is only true as far as the 64 bit systems running on the 32 bit kernel,
which is all there is at the moment.
I am confused.  Which of the following is true on a 64 bit system running on a
32 bit kernel?

A).  sizeof(unsigned int) > sizeof(void *)

or

B). sizeof(unsigned int) < sizeof(void *)

If A) is true, then my stack alignment macro will still work.  If B) is true, I
am in trouble.
  Work has started on the 64 bit PowerPC Linux kernel, if Kaffe is compiled as a
64 bit app for that kernel then sizeof(unsigned long) = sizeof(void *) will be
true. Certainly not a big deal at this stage, but thought you'd be interested
none the less.
Sounds good!  When IBM is ready to start giving 64bit systems to help
developers, let me know! ;-)

Take care,

Kevin

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: diff to tonight's kaffe cvs tree to work on ppc

From: <hidden>
Date: 2000-07-25 14:31:42

"Kevin B. Hendricks" wrote:
Hi Tom,

Good to hear from you again!
Hi Kevin!

  Good to see you too!
quoted
  This is only true as far as the 64 bit systems running on the 32 bit kernel,
which is all there is at the moment.
I am confused.  Which of the following is true on a 64 bit system running on a
32 bit kernel?

A).  sizeof(unsigned int) > sizeof(void *)

or

B). sizeof(unsigned int) < sizeof(void *)
B is true. On the 64 bit kernel int is 32, long is 64, void * is 64.
If A) is true, then my stack alignment macro will still work.  If B) is true, I
am in trouble.
I wouldn't say you are in trouble. We're going to try to put in 32 bit binary
compatibility so current 32 bit apps should run on the 64 bit kernel without a
recompile. I think there's only potential trouble for someone who would
recompile Kaffe for the 64 bit kernel... but that doesn't exactly quite exist
yet...
quoted
  Work has started on the 64 bit PowerPC Linux kernel, if Kaffe is compiled as a
64 bit app for that kernel then sizeof(unsigned long) = sizeof(void *) will be
true. Certainly not a big deal at this stage, but thought you'd be interested
none the less.
Sounds good!  When IBM is ready to start giving 64bit systems to help
developers, let me know! ;-)
Actually this sort of thing is starting to happen. While I can't promise
machines, it is possible to get a few out there here and there....

Regards,

Tom

--
Tom Gall - PowerPC Linux Team    "Where's the ka-boom? There was
Linux Technology Center           supposed to be an earth
(w) tom_gall@vnet.ibm.com         shattering ka-boom!"
(w) 507-253-4558                 -- Marvin Martian
(h) tgall@uswest.net
http://oss.software.ibm.com/developerworks/opensource/linux

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

Re: diff to tonight's kaffe cvs tree to work on ppc

From: Kevin B. Hendricks <hidden>
Date: 2000-07-25 17:22:37

Hi Godmar,

Will you you replace the kaffe_cleanups.patch I just sent you with the slightly
revised one attached.

After some discussions with Tom Gall (of IBM for Linux and 64bit ppc and Linux),
it would be better to change the unsigned int types I used in the align with
unsigned long.

Thanks again,

Kevin

Re: diff to tonight's kaffe cvs tree to work on ppc

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2000-07-25 18:42:56

On Tue, 25 Jul 2000, Kevin B. Hendricks wrote:
Will you you replace the kaffe_cleanups.patch I just sent you with the slightly
revised one attached.

After some discussions with Tom Gall (of IBM for Linux and 64bit ppc and Linux),
it would be better to change the unsigned int types I used in the align with
unsigned long.
Which has been a general remark since ages (the first 64-bit Linux port (AXP)
was started in 1995): _never_ put pointers in an int, use long.

To catch more bugs, use SPARC64: it is big endian and 64-bit. Or better, use
64-bit PPC when available, since it also has chars that are unsigned by
default.

So far for the 3 most occurring portability problems with Linux.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help