RESOLVED FIXED 104377
[sh4] Implement add64 for SH4 assembler after r136601
https://bugs.webkit.org/show_bug.cgi?id=104377
Summary [sh4] Implement add64 for SH4 assembler after r136601
Julien Brianceau
Reported 2012-12-07 09:57:37 PST
/local/wkit/slavebuildbot/workspace/qt-linux-sh4-release/build/Source/JavaScriptCore/jit/JIT.cpp: In member function ‘void JSC::JIT::privateCompileMainPass()’: /local/wkit/slavebuildbot/workspace/qt-linux-sh4-release/build/Source/JavaScriptCore/jit/JIT.cpp:243:80: error: ‘add64’ was not declared in this scope
Attachments
Add add64 implementation in SH4 JIT (2.64 KB, patch)
2012-12-10 01:13 PST, Julien Brianceau
no flags
Add add64 implementation in SH4 JIT (with comments update) (2.39 KB, patch)
2012-12-11 03:29 PST, Julien Brianceau
no flags
Julien Brianceau
Comment 1 2012-12-10 01:13:30 PST
Created attachment 178484 [details] Add add64 implementation in SH4 JIT
Zoltan Herczeg
Comment 2 2012-12-11 03:06:49 PST
Comment on attachment 178484 [details] Add add64 implementation in SH4 JIT Looks good, few comments: View in context: https://bugs.webkit.org/attachment.cgi?id=178484&action=review > Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:410 > + // add 32-bit LSB first WebKit comment style is different. Please use full sentences. > Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:411 > + m_assembler.loadConstant(reinterpret_cast<uint32_t>(address.m_ptr), scr1); // src1 = int64 address In WebKit you don't need to explain trivial facts :) Too much comments makes the code less readable. See http://www.webkit.org/coding/coding-style.html comments section. > Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:416 > + m_assembler.loadConstant(reinterpret_cast<uint32_t>(address.m_ptr), scr1); // src1 = int64 address I am not sure how SH4 works, but if this requires a memory load, a third scratch register could be used to store the address of int64. I don't know you have a third scratch, so this might be unavoidable.
Julien Brianceau
Comment 3 2012-12-11 03:18:17 PST
Comment on attachment 178484 [details] Add add64 implementation in SH4 JIT View in context: https://bugs.webkit.org/attachment.cgi?id=178484&action=review >> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:411 >> + m_assembler.loadConstant(reinterpret_cast<uint32_t>(address.m_ptr), scr1); // src1 = int64 address > > In WebKit you don't need to explain trivial facts :) Too much comments makes the code less readable. > See http://www.webkit.org/coding/coding-style.html comments section. Ok, I'll submit a new patch >> Source/JavaScriptCore/assembler/MacroAssemblerSH4.h:416 >> + m_assembler.loadConstant(reinterpret_cast<uint32_t>(address.m_ptr), scr1); // src1 = int64 address > > I am not sure how SH4 works, but if this requires a memory load, a third scratch register could be used to store the address of int64. I don't know you have a third scratch, so this might be unavoidable. Unfortunately, there are only 2 scratch registers for sh4 JIT yet (see claimScratch() implementation)
Julien Brianceau
Comment 4 2012-12-11 03:29:43 PST
Created attachment 178767 [details] Add add64 implementation in SH4 JIT (with comments update)
Zoltan Herczeg
Comment 5 2012-12-11 03:34:03 PST
Comment on attachment 178767 [details] Add add64 implementation in SH4 JIT (with comments update) r=me. Nice patch.
WebKit Review Bot
Comment 6 2012-12-11 04:16:35 PST
Comment on attachment 178767 [details] Add add64 implementation in SH4 JIT (with comments update) Clearing flags on attachment: 178767 Committed r137287: <http://trac.webkit.org/changeset/137287>
WebKit Review Bot
Comment 7 2012-12-11 04:16:38 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.