Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 840

Show
Ignore:
Timestamp:
01/03/11 06:23:20 (14 years ago)
Author:
walter
Message:

try again on 64 bit profiler

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/backend/cod3.c

    r828 r840  
    267268    } 
    268269#endif 
    269270} 
    270271 
    271272/******************************** 
    272273 * Fix global variables for I64. 
    273274 */ 
    274275 
    275276void cod3_set64() 
    276277{ 
    277278    inssize[0xA0] = T|5;                // MOV AL,mem 
    278279    inssize[0xA1] = T|5;                // MOV RAX,mem 
    279280    inssize[0xA2] = T|5;                // MOV mem,AL 
    280281    inssize[0xA3] = T|5;                // MOV mem,RAX 
    281282    BPRM = 5;                           // [RBP] addressing mode 
    282283    fregsaved = mBP | mBX | mR12 | mR13 | mR14 | mR15 | mES;      // saved across function calls 
    283284    FLOATREGS = FLOATREGS_64; 
    284285    FLOATREGS2 = FLOATREGS2_64; 
    285286    DOUBLEREGS = DOUBLEREGS_64; 
    286287    STACKALIGN = 16; 
     288 
     289#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 
     290    ALLREGS = mAX|mBX|mCX|mDX|mSI|mDI|  mR8|mR9|mR10|mR11|mR12|mR13|mR14|mR15; 
     291    BYTEREGS = ALLREGS; 
     292#endif 
    287293 
    288294    for (unsigned i = 0x80; i < 0x90; i++) 
    289295        inssize2[i] = W|T|6; 
    290296} 
    291297 
    292298/********************************* 
    293299 * Word or dword align start of function. 
    294300 */ 
    295301 
    296302void cod3_align() 
    297303{ 
    298304    static char nops[7] = { 0x90,0x90,0x90,0x90,0x90,0x90,0x90 }; 
    299305    unsigned nbytes; 
    300306#if OMFOBJ 
    301307    if (config.flags4 & CFG4speed)      // if optimized for speed 
    302308    { 
    303309        // Pick alignment based on CPU target 
    304310        if (config.target_cpu == TARGET_80486 || 
    305311            config.target_cpu >= TARGET_PentiumPro) 
    306312        {   // 486 does reads on 16 byte boundaries, so if we are near 
  • branches/dmd-1.x/src/linux.mak

    r717 r840  
    7777    $C/type.c $C/melf.h $C/mach.h $C/bcomplex.h \ 
    7878    $C/cdeflnx.h $C/outbuf.h $C/token.h $C/tassert.h \ 
    7979    $C/elfobj.c $C/cv4.h $C/dwarf2.h $C/cpp.h $C/exh.h $C/go.h \ 
    8080    $C/dwarf.c $C/dwarf.h $C/aa.h $C/aa.c $C/tinfo.h $C/ti_achar.c \ 
    8181    $C/machobj.c \ 
    8282    $(TK)/filespec.h $(TK)/mem.h $(TK)/list.h $(TK)/vec.h \ 
    8383    $(TK)/filespec.c $(TK)/mem.c $(TK)/vec.c $(TK)/list.c \ 
    8484    $(ROOT)/dchar.h $(ROOT)/dchar.c $(ROOT)/lstring.h \ 
    8585    $(ROOT)/lstring.c $(ROOT)/root.h $(ROOT)/root.c $(ROOT)/array.c \ 
    8686    $(ROOT)/rmem.h $(ROOT)/rmem.c $(ROOT)/port.h $(ROOT)/port.c \ 
    8787    $(ROOT)/gnuc.h $(ROOT)/gnuc.c $(ROOT)/man.c \ 
    8888    $(ROOT)/stringtable.h $(ROOT)/stringtable.c \ 
    8989    $(ROOT)/response.c $(ROOT)/async.h $(ROOT)/async.c \ 
    9090    $(ROOT)/aav.h $(ROOT)/aav.c \ 
    9191    $(ROOT)/speller.h $(ROOT)/speller.c 
    9292 
    9393 
    9494all: dmd 
    9595 
    9696dmd: $(DMD_OBJS) 
    97     gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd 
     97    $(CC) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd 
    9898 
    9999clean: 
    100100    rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \ 
    101101    impcnvtab.c optabgen debtab.c optab.c cdxxx.c elxxx.c fltables.c \ 
    102102    tytab.c core \ 
    103103    *.cov *.gcda *.gcno 
    104104 
    105105######## optabgen generates some source 
    106106 
    107107optabgen: $C/optabgen.c $C/cc.h $C/oper.h 
    108108    $(CC) $(MFLAGS) $< -o optabgen 
    109109    ./optabgen 
    110110 
    111111optabgen_output = debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c 
    112112$(optabgen_output) : optabgen 
    113113 
    114114######## idgen generates some source 
    115115 
    116116idgen_output = id.h id.c 
    117117$(idgen_output) : idgen 
     
    450450 
    451451s2ir.o : $C/rtlsym.h statement.h s2ir.c 
    452452    $(CC) -c -I$(ROOT) $(MFLAGS) s2ir.c 
    453453 
    454454scope.o: scope.c 
    455455    $(CC) -c $(CFLAGS) $< 
    456456 
    457457speller.o: $(ROOT)/speller.c 
    458458    $(CC) -c $(GFLAGS) -I$(ROOT) $< 
    459459 
    460460statement.o: statement.c 
    461461    $(CC) -c $(CFLAGS) $< 
    462462 
    463463staticassert.o: staticassert.h staticassert.c 
    464464    $(CC) -c $(CFLAGS) staticassert.c 
    465465 
    466466stringtable.o: $(ROOT)/stringtable.c 
    467467    $(CC) -c $(GFLAGS) -I$(ROOT) $< 
    468468 
    469469strtold.o: $C/strtold.c 
    470     gcc $(MODEL) -c $C/strtold.c 
     470    $(CC) -c $C/strtold.c 
    471471 
    472472struct.o: struct.c 
    473473    $(CC) -c $(CFLAGS) $< 
    474474 
    475475template.o: template.c 
    476476    $(CC) -c $(CFLAGS) $< 
    477477 
    478478ti_achar.o: $C/tinfo.h $C/ti_achar.c 
    479479    $(CC) -c $(MFLAGS) -I. $C/ti_achar.c 
    480480 
    481481tk.o: tk.c 
    482482    $(CC) -c $(MFLAGS) tk.c 
    483483 
    484484tocsym.o: $(CH) $(TOTALH) mars.h module.h tocsym.c 
    485485    $(CC) -c $(MFLAGS) -I$(ROOT) tocsym.c 
    486486 
    487487toctype.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h toctype.c 
    488488    $(CC) -c $(MFLAGS) -I$(ROOT) toctype.c 
    489489 
    490490todt.o : mtype.h expression.h $C/dt.h todt.c 
  • trunk/src/backend/cod3.c

    r828 r840  
    267268    } 
    268269#endif 
    269270} 
    270271 
    271272/******************************** 
    272273 * Fix global variables for I64. 
    273274 */ 
    274275 
    275276void cod3_set64() 
    276277{ 
    277278    inssize[0xA0] = T|5;                // MOV AL,mem 
    278279    inssize[0xA1] = T|5;                // MOV RAX,mem 
    279280    inssize[0xA2] = T|5;                // MOV mem,AL 
    280281    inssize[0xA3] = T|5;                // MOV mem,RAX 
    281282    BPRM = 5;                           // [RBP] addressing mode 
    282283    fregsaved = mBP | mBX | mR12 | mR13 | mR14 | mR15 | mES;      // saved across function calls 
    283284    FLOATREGS = FLOATREGS_64; 
    284285    FLOATREGS2 = FLOATREGS2_64; 
    285286    DOUBLEREGS = DOUBLEREGS_64; 
    286287    STACKALIGN = 16; 
     288 
     289#if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 
     290    ALLREGS = mAX|mBX|mCX|mDX|mSI|mDI|  mR8|mR9|mR10|mR11|mR12|mR13|mR14|mR15; 
     291    BYTEREGS = ALLREGS; 
     292#endif 
    287293 
    288294    for (unsigned i = 0x80; i < 0x90; i++) 
    289295        inssize2[i] = W|T|6; 
    290296} 
    291297 
    292298/********************************* 
    293299 * Word or dword align start of function. 
    294300 */ 
    295301 
    296302void cod3_align() 
    297303{ 
    298304    static char nops[7] = { 0x90,0x90,0x90,0x90,0x90,0x90,0x90 }; 
    299305    unsigned nbytes; 
    300306#if OMFOBJ 
    301307    if (config.flags4 & CFG4speed)      // if optimized for speed 
    302308    { 
    303309        // Pick alignment based on CPU target 
    304310        if (config.target_cpu == TARGET_80486 || 
    305311            config.target_cpu >= TARGET_PentiumPro) 
    306312        {   // 486 does reads on 16 byte boundaries, so if we are near 
  • trunk/src/linux.mak

    r769 r840  
    7777    $C/type.c $C/melf.h $C/mach.h $C/bcomplex.h \ 
    7878    $C/cdeflnx.h $C/outbuf.h $C/token.h $C/tassert.h \ 
    7979    $C/elfobj.c $C/cv4.h $C/dwarf2.h $C/cpp.h $C/exh.h $C/go.h \ 
    8080    $C/dwarf.c $C/dwarf.h $C/aa.h $C/aa.c $C/tinfo.h $C/ti_achar.c \ 
    8181    $C/machobj.c \ 
    8282    $(TK)/filespec.h $(TK)/mem.h $(TK)/list.h $(TK)/vec.h \ 
    8383    $(TK)/filespec.c $(TK)/mem.c $(TK)/vec.c $(TK)/list.c \ 
    8484    $(ROOT)/dchar.h $(ROOT)/dchar.c $(ROOT)/lstring.h \ 
    8585    $(ROOT)/lstring.c $(ROOT)/root.h $(ROOT)/root.c $(ROOT)/array.c \ 
    8686    $(ROOT)/rmem.h $(ROOT)/rmem.c $(ROOT)/port.h $(ROOT)/port.c \ 
    8787    $(ROOT)/gnuc.h $(ROOT)/gnuc.c $(ROOT)/man.c \ 
    8888    $(ROOT)/stringtable.h $(ROOT)/stringtable.c \ 
    8989    $(ROOT)/response.c $(ROOT)/async.h $(ROOT)/async.c \ 
    9090    $(ROOT)/aav.h $(ROOT)/aav.c \ 
    9191    $(ROOT)/speller.h $(ROOT)/speller.c 
    9292 
    9393 
    9494all: dmd 
    9595 
    9696dmd: $(DMD_OBJS) 
    97     gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd 
     97    $(CC) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd 
    9898 
    9999clean: 
    100100    rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \ 
    101101    impcnvtab.c optabgen debtab.c optab.c cdxxx.c elxxx.c fltables.c \ 
    102102    tytab.c core \ 
    103103    *.cov *.gcda *.gcno 
    104104 
    105105######## optabgen generates some source 
    106106 
    107107optabgen: $C/optabgen.c $C/cc.h $C/oper.h 
    108108    $(CC) $(MFLAGS) $< -o optabgen 
    109109    ./optabgen 
    110110 
    111111optabgen_output = debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c 
    112112$(optabgen_output) : optabgen 
    113113 
    114114######## idgen generates some source 
    115115 
    116116idgen_output = id.h id.c 
    117117$(idgen_output) : idgen 
     
    450450 
    451451s2ir.o : $C/rtlsym.h statement.h s2ir.c 
    452452    $(CC) -c -I$(ROOT) $(MFLAGS) s2ir.c 
    453453 
    454454scope.o: scope.c 
    455455    $(CC) -c $(CFLAGS) $< 
    456456 
    457457speller.o: $(ROOT)/speller.c 
    458458    $(CC) -c $(GFLAGS) -I$(ROOT) $< 
    459459 
    460460statement.o: statement.c 
    461461    $(CC) -c $(CFLAGS) $< 
    462462 
    463463staticassert.o: staticassert.h staticassert.c 
    464464    $(CC) -c $(CFLAGS) staticassert.c 
    465465 
    466466stringtable.o: $(ROOT)/stringtable.c 
    467467    $(CC) -c $(GFLAGS) -I$(ROOT) $< 
    468468 
    469469strtold.o: $C/strtold.c 
    470     gcc $(MODEL) -c $C/strtold.c 
     470    $(CC) -c $C/strtold.c 
    471471 
    472472struct.o: struct.c 
    473473    $(CC) -c $(CFLAGS) $< 
    474474 
    475475template.o: template.c 
    476476    $(CC) -c $(CFLAGS) $< 
    477477 
    478478ti_achar.o: $C/tinfo.h $C/ti_achar.c 
    479479    $(CC) -c $(MFLAGS) -I. $C/ti_achar.c 
    480480 
    481481tk.o: tk.c 
    482482    $(CC) -c $(MFLAGS) tk.c 
    483483 
    484484tocsym.o: $(CH) $(TOTALH) mars.h module.h tocsym.c 
    485485    $(CC) -c $(MFLAGS) -I$(ROOT) tocsym.c 
    486486 
    487487toctype.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h toctype.c 
    488488    $(CC) -c $(MFLAGS) -I$(ROOT) toctype.c 
    489489 
    490490todt.o : mtype.h expression.h $C/dt.h todt.c