Hi, Could a gate keeper review the patch for 830? Thank you very much. The original patch exposed a performance degradation due to the instruction size for movl and movq is different. If the constant is not negative and less than 2^31, it's fine to use movl. So that we can save 1 byte here.
Here is the patch: Index: osprey/be/opt/opt_htable.cxx =================================================================== --- osprey/be/opt/opt_htable.cxx (revision 3855) +++ osprey/be/opt/opt_htable.cxx (working copy) @@ -2544,13 +2544,18 @@ CODEREP *retv; OPERATOR oper = OPCODE_operator(opc); - // make sure the dtyp for constant base is Pointer_type +#if defined(TARG_X8664) + // make sure the dtyp for constant base is Pointer_type if the address + // is negative because movl on x86_64 does zero-ext. if (lbase != NULL && lbase->Kind() == CK_CONST + && lbase->Const_val() + (INT64)ofst < 0 && lbase->Dtyp() != Pointer_type) lbase->Set_dtyp_strictly(Pointer_type); if (sbase != NULL && sbase->Kind() == CK_CONST + && sbase->Const_val() + (INT64)ofst < 0 && sbase->Dtyp() != Pointer_type) sbase->Set_dtyp_strictly(Pointer_type); +#endif cr->Init_ivar(opc, dtyp, occ, dsctyp, lodty, lbase, sbase, ofst, size, field_id); Since the difference between movl and movq only appears on x86, this change is made to be x86-specific. In this patch, only negative offset is handled because If the constant is greater than 2^31, I8/U8 will be used when CODEREP is created. -- Regards, Lai Jian-Xin
830.new.patch
Description: Binary data
------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel