Changeset 1475 in svn for trunk/processor/main.m4


Ignore:
Timestamp:
2013-11-13T09:20:22+01:00 (20 months ago)
Author:
Xuefer
Message:

processor: code clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/processor/main.m4

    r1474 r1475  
    242242define(`IFCOPY', `IFSTORE(`$1', `IFRESTORE(`$1', `$2')')')
    243243define(`IFCALCCOPY', `IFCALC(`$1', `IFCOPY(`$1', `$2')')')
    244 define(`IFRELOCATEONLY', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
    245 define(`IFRELOCATE', `IFSTORE(`$1', `IFRELOCATEONLY(`$1', `$2')')')
     244define(`PROCRELOCATE', `ifelse(PROCESSOR_TYPE, `relocate', `$1', `$2')')
     245define(`IFRELOCATE', `ifelse(defn(`RELOCATE_EX'), `', `$2', `$1')')
    246246define(`IFDPRINT', `ifelse(PROCESSOR_TYPE, `dprint', `$1', `$2')')
    247247define(`IFDASM', `ifelse(PROCESSOR_TYPE, `dasm', `$1', `$2')')
     
    259259include(__dir__`/head.m4')
    260260
    261 REDEF(`PROCESSOR_TYPE', `calc') include(__dir__`/processor.m4')
    262 
     261dnl ==== calc ====
     262REDEF(`PROCESSOR_TYPE', `calc')
     263include(__dir__`/processor.m4')
     264
     265dnl ==== store ====
    263266pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), processor->relocatediff);')
    264 REDEF(`PROCESSOR_TYPE', `store') include(__dir__`/processor.m4')
     267REDEF(`PROCESSOR_TYPE', `store')
     268include(__dir__`/processor.m4')
    265269popdef(`RELOCATE_EX')
    266270
    267 REDEF(`PROCESSOR_TYPE', `restore') include(__dir__`/processor.m4')
    268 
     271dnl ==== restore ====
     272REDEF(`PROCESSOR_TYPE', `restore')
     273include(__dir__`/processor.m4')
     274
     275dnl ==== relocate ====
    269276pushdef(`PTR_FROM_VIRTUAL_EX', `ptradd($1 *, notnullable($2), ptrdiff)')
    270277pushdef(`RELOCATE_EX', `$2 = ptradd($1 *, notnullable($2), relocatediff);')
    271278pushdef(`SRC', defn(`DST'))
    272 REDEF(`PROCESSOR_TYPE', `relocate') include(__dir__`/processor.m4')
     279REDEF(`PROCESSOR_TYPE', `relocate')
     280include(__dir__`/processor.m4')
    273281popdef(`SRC')
    274282popdef(`RELOCATE_EX')
    275283popdef(`PTR_FROM_VIRTUAL_EX')
    276284
     285dnl ==== dprint ====
    277286#ifdef HAVE_XCACHE_DPRINT
    278287REDEF(`PROCESSOR_TYPE', `dprint') include(__dir__`/processor.m4')
    279288#endif /* HAVE_XCACHE_DPRINT */
     289
     290dnl ==== dasm ====
    280291#ifdef HAVE_XCACHE_DISASSEMBLER
    281292REDEF(`PROCESSOR_TYPE', `dasm') include(__dir__`/processor.m4')
Note: See TracChangeset for help on using the changeset viewer.