[svn:parrot] r36294 - trunk/src

rurban at svn.parrot.org rurban at svn.parrot.org
Mon Feb 2 19:32:50 UTC 2009


Author: rurban
Date: Mon Feb  2 19:32:50 2009
New Revision: 36294
URL: https://trac.parrot.org/parrot/changeset/36294

Log:
[core] Fix the premature alignment fix from r36291.
- we have now two seperate ALIGN_16 macros for 32-bit and 64-bit
- this makes 10 testfiles pass again: http://nopaste.snit.ch/15482

Modified:
   trunk/src/packfile.c

Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c	Mon Feb  2 19:07:35 2009	(r36293)
+++ trunk/src/packfile.c	Mon Feb  2 19:32:50 2009	(r36294)
@@ -453,7 +453,14 @@
 
 #define TRACE_PACKFILE 0
 
+/* TODO: This is broken on 64-bit. See TT #254 */
+#if OPCODE_T_SIZE == 4
+#define ROUND_16(val) (((val) & 0xf) ? 16 - ((val) & 0xf) : 0)
+#define ALIGN_16(st, cursor) \
+    (cursor) += ROUND_16((const char *)(cursor) - (const char *)(st))/sizeof (opcode_t)
+#else
 #define ALIGN_16(xx, ptr) ptr = (const opcode_t *)(((unsigned long)ptr + 15) & (~15))
+#endif
 
 /*
 


More information about the parrot-commits mailing list