[ruby-cvs:55438] ngoto:r48288 (trunk): * compile.c (compile_data_alloc): add padding when strict alignment

ngoto at ruby-lang.org ngoto at ruby-lang.org
Wed Nov 5 23:49:05 JST 2014


ngoto	2014-11-05 23:49:04 +0900 (Wed, 05 Nov 2014)

  New Revision: 48288

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48288

  Log:
    * compile.c (compile_data_alloc): add padding when strict alignment
      is required for memory access. Currently, the padding is enabled
      only when the CPU is 32-bit SPARC and the compiler is GCC.
      [Bug #9681] [ruby-core:61715]
    
    * compile.c (STRICT_ALIGNMENT): defined if strict alignment is required
    
    * compile.c (ALIGNMENT_SIZE, ALIGNMENT_SIZE_MASK, PADDING_SIZE_MAX):
      new macros for alignemnt word size, bit mask, max size of padding.
    
    * compile.c (calc_padding): new function to calculate padding size.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c


More information about the ruby-cvs mailing list