Summary: | JSC: C++ llint 64-bit backend needs to zero extend results of int32 operations | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | fpizlo, laszlo.gombos, ossy, zherczeg | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 97586 | ||||||||
Attachments: |
|
Description
Mark Lam
2012-10-31 15:53:14 PDT
Created attachment 171736 [details]
Fix.
Comment on attachment 171736 [details]
Fix.
Mark and I found a bug while looking at this.
Also, the index register used in BaseIndex addressing is expected to be of size intptr_t. Created attachment 171780 [details]
The real fix.
Comment on attachment 171780 [details]
The real fix.
Woohoo!
Landed in r133131: <http://trac.webkit.org/changeset/133131>. The svn commit message for it was erroneous. It should have said: === BEGIN === C++ llint 64-bit backend needs to zero extend results of int32 operations. https://bugs.webkit.org/show_bug.cgi?id=100899. Reviewed by Filip Pizlo. llint asm instructions ending in "i" for a 64-bit machine expects the high 32-bit of registers to be zero'ed out when a 32-bit instruction writes into a register. Fixed the C++ llint to honor this. Fixed the index register used in BaseIndex addressing to be of size intptr_t as expected. Updated CLoopRegister to handle different endiannesss configurations. * llint/LowLevelInterpreter.cpp: (JSC::CLoopRegister::clearHighWord): - new method to clear the high 32-bit of a 64-bit register. It's a no-op for the 32-bit build. (CLoopRegister): - CLoopRegister now takes care of packing and byte endianness order. (JSC::CLoop::execute): - Added an assert. * offlineasm/cloop.rb: - Add calls to clearHighWord() wherever needed. === END === |