* src/mm/memory.h (ALIGN): Renamed to MEMORY_ALIGN.
authoredwin <none@none>
Mon, 30 Oct 2006 11:21:36 +0000 (11:21 +0000)
committeredwin <none@none>
Mon, 30 Oct 2006 11:21:36 +0000 (11:21 +0000)
* src/mm/memory.c: Likewise.
* src/vm/jit/dseg.c: Likewise.
* src/vm/jit/parse.c: Likewise.
* src/vm/jit/codegen-common.c: Likewise.
* src/vm/linker.c: Likewise.
* src/mm/nogc.c: Likewise.
* src/cacaoh/headers.c: Likewise.

src/cacaoh/headers.c
src/mm/memory.c
src/mm/memory.h
src/mm/nogc.c
src/vm/jit/codegen-common.c
src/vm/jit/dseg.c
src/vm/jit/parse.c
src/vm/linker.c

index 49f8e0c5b379621d00439e4062686f917ebc871f..d02c5376a08e95077b4084b71e1cd0749aa59827 100644 (file)
@@ -31,7 +31,7 @@
             Christian Thalinger
                        Edwin Steiner
 
-   $Id: headers.c 5854 2006-10-29 11:15:36Z edwin $
+   $Id: headers.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -567,7 +567,7 @@ static void addoutputsize (int len)
        u4 newsize,i;
        if (!dopadding) return;
 
-       newsize = ALIGN(outputsize, len);
+       newsize = MEMORY_ALIGN(outputsize, len);
        
        for (i = outputsize; i < newsize; i++) fprintf(file, "   u1 pad%d\n", (int) i);
        outputsize = newsize;
index c3a46253ac03cd4894058308511c088af6788d5a..c268a8ffd7432c3cbe2501b312db5662e1f19e2c 100644 (file)
@@ -29,7 +29,7 @@
    Changes: Christian Thalinger
                        Edwin Steiner
 
-   $Id: memory.c 5807 2006-10-20 00:37:37Z ajordan $
+   $Id: memory.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -162,7 +162,7 @@ void *memory_cnew(s4 size)
 
        LOCK_MONITOR_ENTER(lock_code_memory);
 
-       size = ALIGN(size, ALIGNSIZE);
+       size = MEMORY_ALIGN(size, ALIGNSIZE);
 
        /* check if enough memory is available */
 
@@ -178,7 +178,7 @@ void *memory_cnew(s4 size)
 
                /* align the size of the memory to be allocated */
 
-               code_memory_size = ALIGN(code_memory_size, pagesize);
+               code_memory_size = MEMORY_ALIGN(code_memory_size, pagesize);
 
 #if defined(ENABLE_STATISTICS)
                if (opt_stat) {
@@ -364,7 +364,7 @@ void *dump_alloc(s4 size)
        if (size == 0)
                return NULL;
 
-       size = ALIGN(size, ALIGNSIZE);
+       size = MEMORY_ALIGN(size, ALIGNSIZE);
 
        if (di->useddumpsize + size > di->allocateddumpsize) {
                dumpblock_t *newdumpblock;
index e4b9ad029cb910e2c944dade54700fb9a1d565b8..9c078b9b2ba658738cdaeca84b97b2339da3c915 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Christian Thalinger
 
-   $Id: memory.h 5803 2006-10-19 09:25:41Z twisti $
+   $Id: memory.h 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -118,8 +118,8 @@ These macros do the same except they operate on the dump area:
 
 Some more macros:
 
-       ALIGN (pos, size) ... make pos divisible by size. always returns an
-                                                 address >= pos.
+       MEMORY_ALIGN (pos, size) ... make pos divisible by size. always returns an
+                                 address >= pos.
                              
        
        OFFSET (s,el) ....... returns the offset of 'el' in structure 's' in bytes.
@@ -129,8 +129,8 @@ Some more macros:
 
 */
 
-#define ALIGN(pos,size)       ((((pos) + (size) - 1) / (size)) * (size))
-#define PADDING(pos,size)     (ALIGN((pos),(size)) - (pos))
+#define MEMORY_ALIGN(pos,size) ((((pos) + (size) - 1) / (size)) * (size))
+#define PADDING(pos,size)     (MEMORY_ALIGN((pos),(size)) - (pos))
 #define OFFSET(s,el)          ((s4) ((ptrint) &(((s*) 0)->el)))
 
 #if !defined(DISABLE_GC)
index 75f0fb7cde365cc64834de3e13347c8d1dfe7e1e..86d3951ff84635b8b622c689655990ee26751455 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes:
 
-   $Id: nogc.c 4437 2006-02-05 00:13:21Z twisti $
+   $Id: nogc.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -67,7 +67,7 @@ void *heap_allocate(u4 size, bool references, methodinfo *finalizer)
 {
        void *m;
 
-       mmapptr = (void *) ALIGN((ptrint) mmapptr, ALIGNSIZE);
+       mmapptr = (void *) MEMORY_ALIGN((ptrint) mmapptr, ALIGNSIZE);
        
        m = mmapptr;
        mmapptr = (void *) ((ptrint) mmapptr + size);
@@ -108,7 +108,7 @@ void heap_free(void *p)
 
 void nogc_init(u4 heapmaxsize, u4 heapstartsize)
 {
-       heapmaxsize = ALIGN(heapmaxsize, ALIGNSIZE);
+       heapmaxsize = MEMORY_ALIGN(heapmaxsize, ALIGNSIZE);
 
        mmapptr = mmap((void *) MMAP_HEAPADDRESS,
                                   (size_t) heapmaxsize,
index aa0e9584dcab3358bc26ecfdef6f193c08def450..272c73397ca3e11f129b879c261519ab7eebd16c 100644 (file)
@@ -48,7 +48,7 @@
    memory. All functions writing values into the data area return the offset
    relative the begin of the code area (start of procedure).   
 
-   $Id: codegen-common.c 5842 2006-10-27 10:41:02Z twisti $
+   $Id: codegen-common.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -633,7 +633,7 @@ void codegen_finish(jitdata *jd)
        }
 #endif
 
-       alignedmcodelen = ALIGN(mcodelen, MAX_ALIGN);
+       alignedmcodelen = MEMORY_ALIGN(mcodelen, MAX_ALIGN);
 
 #if defined(ENABLE_INTRP)
        if (opt_intrp)
@@ -643,7 +643,7 @@ void codegen_finish(jitdata *jd)
        }
 #endif
 
-       cd->dseglen = ALIGN(cd->dseglen, MAX_ALIGN);
+       cd->dseglen = MEMORY_ALIGN(cd->dseglen, MAX_ALIGN);
        alignedlen = alignedmcodelen + cd->dseglen;
 
 #if defined(ENABLE_INTRP)
index 607897b54b12ec9df368dcd28da2fd0fc24319bd..b96ecf257ecfdbb5edfeba65a3bcbe84f7652e84 100644 (file)
@@ -31,7 +31,7 @@
             Joseph Wenninger
                        Edwin Steiner
 
-   $Id: dseg.c 5852 2006-10-28 19:26:51Z twisti $
+   $Id: dseg.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -284,7 +284,7 @@ static s4 dseg_add_s8_intern(codegendata *cd, s8 value, u4 flags)
        /* Increase data segment size, which is also the displacement into
           the data segment. */
 
-       cd->dseglen = ALIGN(cd->dseglen + 8, 8);
+       cd->dseglen = MEMORY_ALIGN(cd->dseglen + 8, 8);
 
        /* allocate new entry */
 
@@ -430,7 +430,7 @@ static s4 dseg_add_double_intern(codegendata *cd, double value, u4 flags)
        /* Increase data segment size, which is also the displacement into
           the data segment. */
 
-       cd->dseglen = ALIGN(cd->dseglen + 8, 8);
+       cd->dseglen = MEMORY_ALIGN(cd->dseglen + 8, 8);
 
        /* allocate new entry */
 
@@ -504,7 +504,7 @@ static s4 dseg_add_address_intern(codegendata *cd, void *value, u4 flags)
           the data segment. */
 
 #if SIZEOF_VOID_P == 8
-       cd->dseglen = ALIGN(cd->dseglen + 8, 8);
+       cd->dseglen = MEMORY_ALIGN(cd->dseglen + 8, 8);
 #else
        cd->dseglen += 4;
 #endif
index 5d6ffd9bb1db9334b4cfa40153cf729681dd7570..aa0799b8abeec564aa96d5a640d17244a3ef9abc 100644 (file)
@@ -31,7 +31,7 @@
             Joseph Wenninger
             Christian Thalinger
 
-   $Id: parse.c 5866 2006-10-30 11:00:56Z edwin $
+   $Id: parse.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -962,7 +962,7 @@ jsr_tail:
                                s4 prevvalue = 0;
 #endif
                                blockend = true;
-                               nextp = ALIGN((p + 1), 4);
+                               nextp = MEMORY_ALIGN((p + 1), 4);
 
                                CHECK_END_OF_BYTECODE(nextp + 8);
 
@@ -1030,7 +1030,7 @@ jsr_tail:
                                branch_target_t *table;
 
                                blockend = true;
-                               nextp = ALIGN((p + 1), 4);
+                               nextp = MEMORY_ALIGN((p + 1), 4);
 
                                CHECK_END_OF_BYTECODE(nextp + 12);
 
index c76de6ca6e7b6fa328c72fe555f56581b232041d..a57849d8f78443dc8eaa36356798397fa6d8d013 100644 (file)
@@ -32,7 +32,7 @@
             Edwin Steiner
             Christian Thalinger
 
-   $Id: linker.c 5813 2006-10-20 14:26:50Z twisti $
+   $Id: linker.c 5868 2006-10-30 11:21:36Z edwin $
 
 */
 
@@ -862,9 +862,9 @@ static classinfo *link_class_intern(classinfo *c)
                        /* header structs like java_lang_Double must match the offsets */
                        /* of the Java fields (eg. java.lang.Double.value).            */
 #if defined(__I386__)
-                       c->instancesize = ALIGN(c->instancesize, 4);
+                       c->instancesize = MEMORY_ALIGN(c->instancesize, 4);
 #else
-                       c->instancesize = ALIGN(c->instancesize, dsize);
+                       c->instancesize = MEMORY_ALIGN(c->instancesize, dsize);
 #endif
 
                        f->offset = c->instancesize;