Changeset 300


Ignore:
Timestamp:
2006-12-03T08:58:23+01:00 (8 years ago)
Author:
moo
Message:

debug code to check compiler result size

Location:
trunk/processor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/head.m4

    r295 r300  
    3939m4_errprint(`AUTOCHECK INFO: runtime autocheck Disabled (optimized build)') 
    4040') 
     41ifdef(`DEBUG_SIZE', `static int xc_totalsize = 0;') 
     42 
    4143sinclude(builddir`/structinfo.m4') 
    4244 
  • trunk/processor/main.m4

    r295 r300  
    22dnl ================ start ====================== 
    33dnl define(`XCACHE_ENABLE_TEST') 
     4dnl define(`DEBUG_SIZE') 
    45define(`USEMEMCPY') 
    56 
     
    5051            } 
    5152        }') 
     53        void *oldp = processor->p; 
    5254        $1 = (FORCETYPE *) (processor->p = (char *) ALIGN(processor->p)); 
    5355        ifelse(`$4', `', ` 
     
    5759        ') 
    5860        processor->p += SIZE; 
     61 
     62        ifdef(`DEBUG_SIZE', ` 
     63            xc_totalsize += (char *) processor->p - (char *) oldp; 
     64            fprintf(stderr, "%d\t%d\t`'SIZE()\n", (char *) processor->p - (char *) oldp, xc_totalsize); 
     65        ') 
    5966    ') 
    6067    IFRESTORE(`ifelse(`$4', `', ` 
Note: See TracChangeset for help on using the changeset viewer.