sysdepCallMethod for PA-RISC

kaffe@rufus.w3.org kaffe@rufus.w3.org
Wed, 19 Aug 1998 20:32:19 +0100


--0__=bVmKGR47sVheIvpCg3NSHC5rxlioTUWWeIPRQ9pLMxoU2SQ5eYVr4mKF
Content-type: text/plain; charset=US-ASCII




Hello!

Here is a file which defines sysdepCallMethod routine for PA-RISC
processors. Unfortunately, it can only be compiled using GNU C (gcc or
maybe egcc), because it uses extended assembler feature to calculate the
stack pointer. This file must be compiled without optimization, otherwise
the compiler ignores register assignments. It is not hard to convert it to
#define but is it necessary. Actually, someone may want to compile
support.c with optimization.
Unfortunately there are many problems with HP-UX in the moment, so I give
some step-by-step instruction for those who want to test this procedure
right now.

1) CFLAGS='-g' ./configure --host=hppa1.1-hp-hpux10.20 --with-staticlib
--with-engine=intrp --with-threads=unix-jthreads
2) Hack kaffe/kaffevm/Makefile to add su1$(OBJEXT) after support$(OBJEXT)
3) make
4) make install
5) Never run Kaffe from Midnight Commander with subshell support enabled.
6) Use 8-bpp X server if you run AWT programs. Otherwise you will see a
black window.

I have never read some documentation about PA-RISC processor. This code is
written based on assembler generated by gcc. There are many open questions
- they are marked as comments.
Nevertheless, I have successfully recompiled Kaffe.jar using pizza 0.39g.
Most tests from regression and all AWT tests do work!

Pavel Roskin <pavel.roskin@ecsoft.co.uk>

(See attached file: su1.c)

--0__=bVmKGR47sVheIvpCg3NSHC5rxlioTUWWeIPRQ9pLMxoU2SQ5eYVr4mKF
Content-type: application/octet-stream; 
	name="su1.c"
Content-transfer-encoding: base64

I2luY2x1ZGUgImNvbmZpZy5oIgojaW5jbHVkZSAiY29uZmlnLXN0ZC5oIgojaW5jbHVkZSAiY29u
ZmlnLW1lbS5oIgojaW5jbHVkZSAiam5pLmgiCiNpbmNsdWRlICJqdHlwZXMuaCIKI2luY2x1ZGUg
ImVycm9ycy5oIgojaW5jbHVkZSAic3VwcG9ydC5oIgojaW5jbHVkZSAibWQuaCIKI2luY2x1ZGUg
Iml0eXBlcy5oIgoKdH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