The JmpSrc/JmpDst classes predate the MacroAssembler interface. Having these object be per-assembler in unhelpful, causes unnecessary code duplication, and prevents the AssemblerBuffer from providing a richer type for labels. The limited semantic meaning that they did convey is undermined by the manner in which their meanings have been overloaded (use of JmpSrc for Call, JmpDst for data labels). Jumps on ARMv7 have had additional information added to the object via the ARMv7 JmpSrc. This data should probably be in the instruction stream. This patch does not fix the problem, and moves the data (ifdefed) to AbstractMacroAssembler::Jump (which is effectively where it was before!). This at least closes the hole such that no further data may be added to JmpSrc, but this is unfortunate, and should be cleaned up.
Created attachment 91847 [details] The patch
Attachment 91847 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/assembler/X86Assembler.h:1197: jmp_r is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/JavaScriptCore/assembler/AssemblerBuffer.h:40: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 2 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 91847 [details] The patch Please add a comment about why 2^32-1 is enough.
Fixed in r85432.
Hi Gavin, For MIPS build, we need to switch the order of header files to get it compiled. Thanks! Regards, Chao-ying fu@debian:/disk/fu/dev/WebKit/Source/JavaScriptCore/assembler$ svn diff Index: MacroAssemblerMIPS.h =================================================================== --- MacroAssemblerMIPS.h (revision 85498) +++ MacroAssemblerMIPS.h (working copy) @@ -29,8 +29,8 @@ #if ENABLE(ASSEMBLER) && CPU(MIPS) +#include "MIPSAssembler.h" #include "AbstractMacroAssembler.h" -#include "MIPSAssembler.h" namespace JSC {
is exist some reason for using char* to replace void* in the getRelocatedAddress function of the sh4assembler.h file?