Quoting Edwin from bug #685441: "FWIW, its also not ideal if the JIT is calling mop_anything(); the call overhead could easily be higher than the cost of the load+shift+or instructions; See this ifdef nest in CodegenLIR.cpp: #if NJ_EXPANDED_LOADSTORE_SUPPORTED && defined(VMCFG_UNALIGNED_INT_ACCESS) && defined(VMCFG_LITTLE_ENDIAN) #define VMCFG_MOPS_USE_EXPANDED_LOADSTORE_INT #endif #if NJ_EXPANDED_LOADSTORE_SUPPORTED && defined(VMCFG_UNALIGNED_FP_ACCESS) && defined(VMCFG_LITTLE_ENDIAN) #define VMCFG_MOPS_USE_EXPANDED_LOADSTORE_FP #endif If the VMCFG_UNALIGNED_[INT|FP]_ACCESS and VMCFG_LITTLE_ENDIAN are not set properly, then we are compiling calls to these helper functions, which will be slow." This is the kind of thing that would make a difference on ARM, where unaligned access is frequently disabled. We would need to prototype an in-line solution and benchmark against the current call-out solution. (It might be adequate to do said prototyping on x86 with unaligned load/store disabled.)
You need to log in before you can comment on or make changes to this bug.