[kaffe] [PATCH] Add support for AMD64
Gwenole Beauchesne
gbeauchesne@mandrakesoft.com
Fri May 16 05:33:01 2003
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---1463777692-190654388-1053088536=:3958
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hi,
The original patch was against Kaffe 1.0.7 and was created nearly one year
ago but I have not sumitted them yet. So, here it is at last. ;-)
I planned to port JIT3 too by I hadn't got enough time recently to do so.
A few months ago, I implemented a run-time assembler though. It can handle
both IA-32 and AMD64 architectures with REX prefixes, SSE/SSE2
instructions.
Bye,
Gwenole.
---1463777692-190654388-1053088536=:3958
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="kaffe-1.1-x86_64.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0305161435360.3958@thalys.mandrakesoft.com>
Content-Description: Add support for AMD64
Content-Disposition: attachment; filename="kaffe-1.1-x86_64.patch"
MjAwMi0wOC0xOCAgR3dlbm9sZSBCZWF1Y2hlc25lICA8Z2JlYXVjaGVzbmVA
bWFuZHJha2Vzb2Z0LmNvbT4NCg0KCUFkZCBzdXBwb3J0IGZvciBMaW51eC9B
TUQ2NC4NCgkqIGNvbmZpZy94ODZfNjQvY29tbW9uLmg6IE5ldyBmaWxlLg0K
CSogY29uZmlnL3g4Nl82NC90aHJlYWRzLmg6IE5ldyBmaWxlLg0KCSogY29u
ZmlnL3g4Nl82NC9zeXNkZXBDYWxsTWV0aG9kLmg6IE5ldyBmaWxlLg0KCSog
Y29uZmlnL3g4Nl82NC9saW51eC9jb25maWcuZnJhZzogTmV3IGZpbGUuDQoJ
KiBjb25maWcveDg2XzY0L2xpbnV4L21kLmM6IE5ldyBmaWxlLg0KCSogY29u
ZmlnL3g4Nl82NC9saW51eC9tZC5oOiBOZXcgZmlsZS4NCg0KCSogY29uZmln
L01ha2VmaWxlLmFtOiBVcGRhdGUgdG8gYWRkIEFNR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K20iICgqKEEpKSAgICAgICAgICAgICAgXA0K
KyAgICAgICAgICAgICAgICAgICAgICAgICA6ICJyIiAoTiksICJhIiAoTykg
ICAgICAgICAgICAgICAgICAgICBcDQorICAgICAgICAgICAgICAgICAgICAg
ICAgIDogImNjIiwgIm1lbW9yeSIpOyAgICAgICAgICAgICAgICAgICAgIFwN
CisgICAgICAgICAgIChyZXQpOyAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgXA0KKyAgICAgICAgfSkNCisjZW5kaWYN
CisNCisjZW5kaWYNCi0tLSBrYWZmZS0xLjEvY29uZmlnL3g4Nl82NC90aHJl
YWRzLmgueDg2XzY0CTIwMDMtMDUtMTYgMDg6Mjc6NDguMDAwMDAwMDAwIC0w
NDAwDQorKysga2FmZmUtMS4xL2NvbmZpZy94ODZfNjQvdGhyZWFkcy5oCTIw
MDItMDgtMTYgMDg6MjY6NDIuMDAwMDAwMDAwIC0wNDAwDQpAQCAtMCwwICsx
LDM3IEBADQorLyoNCisgKiB4ODZfNjQvdGhyZWFkcy5oDQorICogWDg2LTY0
IHRocmVhZGluZyBpbmZvcm1hdGlvbi4NCisgKg0KKyAqIENvcHlyaWdodCAo
YykgMjAwMg0KKyAqCU1hbmRyYWtlU29mdC4gIEFsbCByaWdodHMgcmVzZXJ2
ZWQuDQorICoNCisgKiBTZWUgdGhlIGZpbGUgImxpY2Vuc2UudGVybXMiIGZv
ciBpbmZvcm1hdGlvbiBvbiB1c2FnZSBhbmQgcmVkaXN0cmlidXRpb24NCisg
KiBvZiB0aGlzIGZpbGUuDQorICovDQorDQorI2lmbmRlZiBfX3g4Nl82NF90
aHJlYWRzX2gNCisjZGVmaW5lIF9feDg2XzY0X3RocmVhZHNfaA0KKw0KKy8q
Ki8NCisvKiBUaHJlYWQgaGFuZGxpbmcgKi8NCisvKiovDQorI2RlZmluZQlV
U0VfSU5URVJOQUxfVEhSRUFEUw0KKw0KKy8qDQorICogU2V0IGEgZGVmYXVs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YW5kIHN0YWNrW10g
YXJyYXlzJyBzaXplICovDQorICAgIHdoaWxlIChhcmdzICE9IGxhc3QpIHsN
CisgICAgICBzd2l0Y2ggKGNhbGx0eXBlWyhhcmdzKyspIC0gY2FsbGFyZ3Nd
KSB7DQorICAgICAgY2FzZSAnRic6DQorICAgICAgY2FzZSAnRCc6DQorICAg
ICAgICBpZiAobnJfZnByIDwgRlBSX0FSR1MpDQorICAgICAgICAgIG5yX2Zw
cisrOw0KKyAgICAgICAgZWxzZQ0KKyAgICAgICAgICBucl9zdGFjaysrOw0K
KyAgICAgICAgYnJlYWs7DQorICAgICAgICANCisgICAgICBkZWZhdWx0Og0K
KyAgICAgICAgaWYgKG5yX2dwciA8IEdQUl9BUkdTKQ0KKyAgICAgICAgICBu
cl9ncHIrKzsNCisgICAgICAgIGVsc2UNCisgICAgICAgICAgbnJfc3RhY2sr
KzsNCisgICAgICAgIGJyZWFrOw0KKyAgICAgIH0NCisgICAgfQ0KKw0KKyAg
ICAvKiBBbGxvY2F0ZSBhbGwgYXJyYXlzIHdpdGggb25lIGJpZyBhbGxvY2Eo
KSAqLw0KKyAgICB7DQorICAgICAgaW50IG5yID0gbnJfc3RhY2s7DQorICAg
ICAgDQorICAgICAgLyogc3RhY2ssIGlmIHVzZWQsIG11c3QgYmUgMTYgYnl0
ZXMgYWxpZ25lZCAqLw0KKyAgICAgIGlmIChucl9zdGFjaykNCisgICAgICAg
IG5yID0gKG5yICsgMSkgJiB+MTsNCisNCisgICAgICAvKiBzdGFja1tdIGlz
IGluIGNhbGxlZCBwYXJhbWV0ZXJzIGFyZWEuICAqLw0KKyAgICAgIHN0YWNr
ID0gX19idWlsdGluX2FsbG9jYSAoOCAqIG5yKTsNCisgICAgfQ0KKw0KKyAg
ICAvKiBidWlsZCBncHJbXSwgZnByW10gYW5kIHN0YWNrW10gYXJyYXlzICov
DQorICAgIG5yX2dwciA9IDA7DQorICAgIG5yX2ZwciA9IDA7DQorICAgIG5y
X3N0YWNrID0gMD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KyAgICAgICAgQVJHX0ZQ
Uig0KTsNCisgICAgICAgIEFSR19GUFIoMyk7DQorICAgICAgICBBUkdfRlBS
KDIpOw0KKyAgICAgICAgQVJHX0ZQUigxKTsNCisgICAgICAgIEFSR19GUFIo
MCk7DQorICAgICAgY2FzZSAwOjsNCisgICAgICB9DQorDQorICAgICAgLyog
bG9hZCBHUFIgcmVnaXN0ZXJzIGZyb20gZ3ByW10gKi8NCisgICAgICBzd2l0
Y2ggKG5yX2dwcikgew0KKyAgICAgICAgQVJHX0dQUig1KTsNCisgICAgICAg
IEFSR19HUFIoNCk7DQorICAgICAgICBBUkdfR1BSKDMpOw0KKyAgICAgICAg
QVJHX0dQUigyKTsNCisgICAgICAgIEFSR19HUFIoMSk7DQorICAgICAgICBB
UkdfR1BSKDApOw0KKyAgICAgIGNhc2UgMDo7DQorICAgICAgfQ0KKyAgICAg
IA0KKyAgICAgIC8qIEVuc3VyZSB0aGF0IHRoZSBhc3NpZ25tZW50cyB0byBT
U0UgcmVnaXN0ZXJzIHdvbid0IGJlIG9wdGltaXplZCBhd2F5LiAqLw0KKyAg
ICAgIGFzbSAoIiIgOjoNCisgICAgICAgICAgICJ4IiAoZDApLCAieCIgKGQx
KSwgIngiIChkMiksICJ4IiAoZDMpLA0KKyAgICAgICAgICAgIngiIChkNCks
ICJ4IiAoZDUpLCAieCIgKGQ2KSwgIngiIChkNykpOw0KKw0KKyAgICAgIHN3
aXRjaChjYWxsLT5yZXRzaXplKSB7DQorICAgICAgY2FzZSAwOg0KKyAgICAg
ICAgLyogTXVzdCBiZSB2b2lkLiAgKi8NCisgICAgICAgICgodm9pZCAoKiko
QVJHX1RZUEVTKSkoZnVuYykpKEFSR19MSVNUKTsNCisgICAgICAgIGJyZWFr
Ow0KKyAgICAgICAgDQorICAgICAgY2FzZSAxOg0KKyAgICAgICAgaWYgKGNh
bGwtPnJldHR5cGUgPT0gJ0YnKQ0KKyAgICAgICAgICBjYWxsLT5yZXQtPmYg
PSAoKGpmbG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