Changes between Version 4 and Version 6 of Ticket #364
- Timestamp:
- 02/21/09 16:22:35 (13 years ago)
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.1 Sparc 64bit with strict ptr_alignment=8 breaks when reading frozen pmc's because of misalignment. 2 2 3 3 Any 64bit big-endian cpu with strict alignment is broken without '''-xmemalign=2i''' (the immediate workaround) 4 4 The default for all v9 architectures is '''-xmemalign=8s'''. 5 5 6 The goal should be to allow fast aligned code and to align as advertised to 16, not 2 on 64-bit.6 However, our goal should be to allow fast aligned code and not to skip this with a compiler relaxement. 7 7 8 8 {{{ 9 9 * First we should align to the foreign pbc ptrsize, not to the native ptrsize. 10 10 * /sizeof (opcode_t) => /header->wordsize 11 * Then we should get rid of the "/" at all, and align absolutely to 16, and not12 * to 16/4 = 4 or 16/8 = 2.13 * It is also broken in strict alignment 64bit CPU's. See http://nopaste.snit.ch/1568414 * 0x100000dec is an illegal alignment.15 11 */ 16 12 #define ROUND_16(val) (((val) & 0xf) ? 16 - ((val) & 0xf) : 0) … … 19 15 }}} 20 16 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. 17 This requires a check for all ptr alignment code (no macros used, bad) and to find the source of the problem, most likely a string. 24 18 25 19 {{{ … … 47 41 '''0x100000dec''' is not properly aligned. It must be '''0x100000df0'''. 48 42 49 Sparc cc manpage: 43 Sparc cc manpage:[[BR]] 50 44 -xmemalign[=<a><b>] Controls memory alignment, <a>={1|2|4|8|16}, b={f|i|s}.[[BR]] 51 45 Accepted values for b are: i Interpret access and continue execution. s Raise signal SIGBUS. f For variants of -xarch=v9 only. [reduced i] 52 46 53 Thanks to Rolf Grossmann for coming up with all this info and debugging .47 Thanks to Rolf Grossmann for coming up with all this info and debugging, and to Andy Dougherty for correcting my wrong first analysis.