Changes between Version 4 and Version 6 of Ticket #364

Show
Ignore:
Timestamp:
02/21/09 16:22:35 (13 years ago)
Author:
rurban
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #364 – description

    v4 v6  
    1 A strict 64bit cpu with a ptr_alignment=8 will break when reading pbc's or just frozen pmc's because our alignment when writing our bytecode is 16/ptrsize and not 16. 
     1Sparc 64bit with strict ptr_alignment=8 breaks when reading frozen pmc's because of misalignment. 
    22 
    33Any 64bit big-endian cpu with strict alignment is broken without '''-xmemalign=2i''' (the immediate workaround) 
    44The default for all v9 architectures is '''-xmemalign=8s'''. 
    55 
    6 The goal should be to allow fast aligned code and to align as advertised to 16, not 2 on 64-bit. 
     6However, our goal should be to allow fast aligned code and not to skip this with a compiler relaxement. 
    77 
    88{{{ 
    99 * First we should align to the foreign pbc ptrsize, not to the native ptrsize. 
    1010 * /sizeof (opcode_t) => /header->wordsize 
    11  * Then we should get rid of the "/" at all, and align absolutely to 16, and not 
    12  * to 16/4 = 4 or 16/8 = 2. 
    13  * It is also broken in strict alignment 64bit CPU's. See http://nopaste.snit.ch/15684 
    14  * 0x100000dec is an illegal alignment. 
    1511 */ 
    1612#define ROUND_16(val) (((val) & 0xf) ? 16 - ((val) & 0xf) : 0) 
     
    1915}}} 
    2016 
    21 This requires a rewrite of all pbc writer alignment code  
    22 (no macro used, bad), and also of the pbc reader code which  
    23 is much simplier to fix. 
     17This requires a check for all ptr alignment code (no macros used, bad) and to find the source of the problem, most likely a string. 
    2418 
    2519{{{ 
     
    4741'''0x100000dec''' is not properly aligned. It must be '''0x100000df0'''. 
    4842 
    49 Sparc cc manpage: 
     43Sparc cc manpage:[[BR]] 
    5044-xmemalign[=<a><b>] Controls memory alignment, <a>={1|2|4|8|16}, b={f|i|s}.[[BR]] 
    5145Accepted values for b are: i Interpret access and continue execution. s Raise signal SIGBUS. f For variants of -xarch=v9 only. [reduced i] 
    5246 
    53 Thanks to Rolf Grossmann for coming up with all this info and debugging. 
     47Thanks to Rolf Grossmann for coming up with all this info and debugging, and to Andy Dougherty for correcting my wrong first analysis.