Changeset 605
- Timestamp:
- 08/09/10 03:51:22 (14 years ago)
- Files:
-
- trunk/src/backend/cgen.c (modified) (1 diff)
- trunk/src/backend/cod1.c (modified) (1 diff)
- trunk/src/backend/cod3.c (modified) (1 diff)
- trunk/src/backend/iasm.h (modified) (1 diff)
- trunk/src/backend/ptrntab.c (modified) (2 diffs)
- trunk/src/backend/ty.h (modified) (1 diff)
- trunk/src/freebsd.mak (modified) (1 diff)
- trunk/src/glue.c (modified) (1 diff)
- trunk/src/iasm.c (modified) (6 diffs)
- trunk/src/mtype.c (modified) (1 diff)
- trunk/src/win32.mak (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/backend/cgen.c
r596 r605 279 279 * Generate a MOV to,from register instruction. 280 280 * Smart enough to dump redundant register moves, and segment 281 281 * register moves. 282 282 */ 283 283 284 284 code *genmovreg(code *c,unsigned to,unsigned from) 285 285 { 286 286 #if DEBUG 287 287 if (to > ES || from > ES) 288 288 printf("genmovreg(c = %p, to = %d, from = %d)\n",c,to,from); 289 289 #endif 290 290 assert(to <= ES && from <= ES); 291 291 if (to != from) 292 292 { 293 293 if (to == ES) 294 294 c = genregs(c,0x8E,0,from); 295 295 else if (from == ES) 296 296 c = genregs(c,0x8C,0,to); 297 297 else 298 298 c = genregs(c,0x89,from,to); 299 if (I64) 300 code_orrex(c, REX_W); 299 301 } 300 302 return c; 301 303 } 302 304 303 305 /************************** 304 306 * Generate a jump instruction. 305 307 */ 306 308 307 309 code *genjmp(code *c,unsigned op,unsigned fltarg,block *targ) 308 310 { code cs; 309 311 code *cj; 310 312 code *cnop; 311 313 312 314 cs.Iop = op & 0xFF; 313 315 cs.Iflags = 0; 314 316 cs.Irex = 0; 315 317 if (op != JMP) /* if not already long branch */ 316 318 cs.Iflags = CFjmp16; /* assume long branch for op = 0x7x */ 317 319 cs.IFL2 = fltarg; /* FLblock (or FLcode) */ 318 320 cs.IEV2.Vblock = targ; /* target block (or code) */ trunk/src/backend/cod1.c
r596 r605 2804 2804 { /* Then symbol must be allocated on stack */ 2805 2805 needframe = TRUE; 2806 2806 break; 2807 2807 } 2808 2808 } 2809 2809 else 2810 2810 { if (mfuncreg == 0) /* if no registers left */ 2811 2811 { needframe = TRUE; 2812 2812 break; 2813 2813 } 2814 2814 } 2815 2815 } 2816 2816 } 2817 2817 } 2818 2818 } 2819 2819 #endif 2820 2820 2821 2821 retregs = regmask(e->Ety, tym1); 2822 2822 2823 2823 // If stack needs cleanup 2824 if (OTbinary(e->Eoper) && !typfunc(tym1) && 2824 if (OTbinary(e->Eoper) && 2825 (!typfunc(tym1) || I64) && 2825 2826 !(s && s->Sflags & SFLexit)) 2826 2827 { 2827 2828 if (tym1 == TYhfunc) 2828 2829 { // Hidden parameter is popped off by the callee 2829 2830 c = genadjesp(c, -4); 2830 2831 stackpush -= 4; 2831 2832 if (numpara + numalign > 4) 2832 2833 c = genstackclean(c, numpara + numalign - 4, retregs); 2833 2834 } 2834 2835 else 2835 2836 c = genstackclean(c,numpara + numalign,retregs); 2836 2837 } 2837 2838 else 2838 2839 { 2839 2840 c = genadjesp(c,-numpara); 2840 2841 stackpush -= numpara; 2841 2842 if (numalign) 2842 2843 c = genstackclean(c,numalign,retregs); 2843 2844 } 2844 2845 trunk/src/backend/cod3.c
r596 r605 2003 2003 } 2004 2004 else if (xlocalsize == REGSIZE && (!I16 || b->BC == BCret)) 2005 2005 { mfuncreg &= ~mask[regx]; 2006 2006 c = gen1(c,0x58 + regx); // POP regx 2007 2007 } 2008 2008 else if (xlocalsize) 2009 2009 { 2010 2010 c = genc2(c,0x81,modregrm(3,0,SP),xlocalsize); // ADD SP,xlocalsize 2011 2011 if (I64) 2012 2012 code_orrex(c, REX_W); 2013 2013 } 2014 2014 } 2015 2015 if (b->BC == BCret || b->BC == BCretexp) 2016 2016 { 2017 2017 Lret: 2018 2018 op = tyfarfunc(tym) ? 0xCA : 0xC2; 2019 2019 if (tym == TYhfunc) 2020 2020 { 2021 2021 c = genc2(c,0xC2,0,4); // RET 4 2022 2022 } 2023 else if (!typfunc(tym) || Poffset == 0 )2023 else if (!typfunc(tym) || Poffset == 0 || I64) 2024 2024 { op++; // to a regular RET 2025 2025 c = gen1(c,op); 2026 2026 } 2027 2027 else 2028 2028 { // Stack is always aligned on register size boundary 2029 2029 Poffset = (Poffset + (REGSIZE - 1)) & ~(REGSIZE - 1); 2030 2030 c = genc2(c,op,0,Poffset); // RET Poffset 2031 2031 } 2032 2032 } 2033 2033 2034 2034 Lopt: 2035 2035 // If last instruction in ce is ADD SP,imm, and first instruction 2036 2036 // in c sets SP, we can dump the ADD. 2037 2037 cr = code_last(ce); 2038 2038 if (cr && c && !I64) 2039 2039 { 2040 2040 if (cr->Iop == 0x81 && cr->Irm == modregrm(3,0,SP)) // if ADD SP,imm 2041 2041 { 2042 2042 if ( 2043 2043 c->Iop == 0xC9 || // LEAVE trunk/src/backend/iasm.h
r577 r605 19 19 // 20 20 // 21 21 22 22 // This is for when the reg field of modregrm specifies which instruction it is 23 23 #define NUM_MASK 0x7 24 24 #define _0 (0x0 | _modrm) // insure that some _modrm bit is set 25 25 #define _1 0x1 // with _0 26 26 #define _2 0x2 27 27 #define _3 0x3 28 28 #define _4 0x4 29 29 #define _5 0x5 30 30 #define _6 0x6 31 31 #define _7 0x7 32 32 33 33 #define _modrm 0x10 34 34 35 35 #define _r _modrm 36 36 #define _cb _modrm 37 37 #define _cw _modrm 38 38 #define _cd _modrm 39 #define _cq _modrm 39 40 #define _cp _modrm 40 41 #define _ib 0 41 42 #define _iw 0 42 43 #define _id 0 43 44 #define _rb 0 44 45 #define _rw 0 45 46 #define _rd 0 46 47 #define _16_bit 0x20 47 48 #define _32_bit 0x40 48 49 #define _64_bit 0x10000 49 50 #define _I386 0x80 // opcode is only for 386 and later 50 51 #define _16_bit_addr 0x100 51 52 #define _32_bit_addr 0x200 52 53 #define _fwait 0x400 // Add an FWAIT prior to the instruction opcode 53 54 #define _nfwait 0x800 // Do not add an FWAIT prior to the instruction 54 55 55 56 #define MOD_MASK 0xF000 // Mod mask 56 57 #define _modsi 0x1000 // Instruction modifies SI 57 58 #define _moddx 0x2000 // Instruction modifies DX 58 59 #define _mod2 0x3000 // Instruction modifies second operand trunk/src/backend/ptrntab.c
r577 r605 795 795 { 0x38, _r|_modnot1, _rm8, _r8 }, 796 796 { 0x39, _r|_16_bit|_modnot1, _rm16, _r16 }, 797 797 { 0x39, _r|_32_bit|_modnot1, _rm32, _r32 }, 798 798 { 0x3a, _r|_modnot1, _r8, _rm8 }, 799 799 { 0x3b, _r|_16_bit|_modnot1, _r16, _rm16 }, 800 800 { 0x3b, _r|_32_bit|_modnot1, _r32, _rm32 }, 801 801 { ASM_END, 0, 0, 0 } 802 802 }; 803 803 PTRNTAB2 aptb2CMPS[] = /* CMPS */ { 804 804 { 0xa6, _modsidi, _m8, _m8 }, 805 805 { 0xa7, _modsidi, _m16, _m16 }, 806 806 { 0xa7, _modsidi, _m32, _m32 }, 807 807 { ASM_END, 0, 0, 0 } 808 808 }; 809 809 PTRNTAB2 aptb2CMPXCHG[] = /* CMPXCHG */ { 810 810 { 0xfb0, _I386 | _cb|_mod2, _rm8, _r8 }, 811 811 // This is really a 486 only 812 812 // instruction 813 813 { 0xfb1, _I386 | _cw | _16_bit|_mod2, _rm16, _r16 }, 814 814 { 0xfb1, _I386 | _cd | _32_bit|_mod2, _rm32, _r32 }, 815 { 0xfb1, _I386 | _cq | _64_bit|_mod2, _rm64, _r64 }, 815 816 { ASM_END, 0, 0, 0 } 816 817 }; 817 818 PTRNTAB2 aptb2DIV[] = /* DIV */ { 818 819 { 0xf6, _6, _al, _rm8 }, 819 820 { 0xf7, _6 | _16_bit | _moddx, _ax, _rm16 }, 820 821 { 0xf7, _6 | _32_bit | _moddx, _eax, _rm32 }, 821 822 { 0xf6, _6 | _modax, _rm8, 0 }, 822 823 { 0xf7, _6 | _16_bit | _modaxdx, _rm16, 0 }, 823 824 { 0xf7, _6 | _32_bit | _modaxdx, _rm32, 0 }, 824 825 { ASM_END, 0, 0, 0 } 825 826 }; 826 827 PTRNTAB2 aptb2ENTER[] = /* ENTER */ { 827 828 { 0xc8, _iw|_ib, _imm16, _imm8 }, 828 829 { ASM_END, 0, 0, 0 } 829 830 }; 830 831 PTRNTAB2 aptb2IDIV[] = /* IDIV */ { 831 832 { 0xf6, _7, _al, _rm8 }, 832 833 { 0xf7, _7|_16_bit|_moddx, _ax, _rm16 }, 833 834 { 0xf7, _7|_32_bit|_moddx, _eax, _rm32 }, 834 835 { 0xf6, _7 | _modax, _rm8, 0 }, … … 891 892 { ASM_END, 0, 0, 0 } 892 893 }; 893 894 PTRNTAB2 aptb2LSL[] = /* LSL */ { 894 895 { 0x0f03, _r|_16_bit, _r16, _rm16 }, 895 896 { 0x0f03, _r|_32_bit, _r32, _rm32 }, 896 897 { ASM_END, 0, 0, 0 } 897 898 }; 898 899 899 900 PTRNTAB2 aptb2MOV[] = /* MOV */ { 900 901 #if 0 // Let pinholeopt() do this 901 902 { 0xa0, 0, _al, _moffs8 }, 902 903 { 0xa1, _16_bit, _ax, _moffs16 }, 903 904 { 0xa1, _32_bit, _eax, _moffs32 }, 904 905 { 0xa2, 0, _moffs8, _al }, 905 906 { 0xa3, _16_bit, _moffs16, _ax }, 906 907 { 0xa3, _32_bit, _moffs32, _eax }, 907 908 #endif 908 909 { 0x88, _r, _rm8, _r8 }, 909 910 { 0x89, _r|_16_bit, _rm16, _r16 }, 910 911 { 0x89, _r|_32_bit, _rm32, _r32 }, 912 { 0x89, _r|_64_bit, _rm64, _r64 }, 911 913 { 0x8a, _r, _r8, _rm8 }, 912 914 { 0x8b, _r|_16_bit, _r16, _rm16 }, 913 915 { 0x8b, _r|_32_bit, _r32, _rm32 }, 916 { 0x8b, _r|_64_bit, _r64, _rm64 }, 914 917 { 0x8c, _r, _rm16, _seg|_ds|_es| _ss | _fs | _gs | _cs }, 915 918 { 0x8e, _r, _seg|_ds|_es|_ss|_fs|_gs|_cs, _rm16 }, 916 919 { 0xb0, _rb, _r8 | _plus_r, _imm8 }, 917 920 { 0xb8, _rw | _16_bit, _r16 | _plus_r, _imm16 }, 918 921 { 0xb8, _rd|_32_bit, _r32 | _plus_r, _imm32 }, 919 922 { 0xc6, _cb, _rm8, _imm8 }, 920 923 { 0xc7, _cw|_16_bit, _rm16, _imm16 }, 921 924 { 0xc7, _cd|_32_bit, _rm32, _imm32 }, 922 925 #if 0 // Let pinholeopt() do this 923 926 { 0xc6, _cb, _moffs8, _imm8 }, 924 927 { 0xc7, _cw|_16_bit, _moffs16, _imm16 }, 925 928 { 0xc7, _cd|_32_bit, _moffs32, _imm32 }, 926 929 #endif 927 930 { 0x0f20, _r, _r32, _special | _crn }, 928 931 { 0x0f22, _r, _special|_crn, _r32 }, 929 932 { 0x0f21, _r, _r32, _special | _drn }, 930 933 { 0x0f23, _r, _special|_drn, _r32 }, 931 934 { 0x0f24, _r, _r32, _special | _trn }, 932 935 { 0x0f26, _r, _special|_trn, _r32 }, 933 936 { ASM_END, 0, 0, 0 } trunk/src/backend/ty.h
r579 r605 276 276 #else 277 277 /* Detect cpp function type (callee cleans up stack) */ 278 278 #ifndef typfunc 279 279 #define typfunc(ty) (tytab[(ty) & 0xFF] & TYFLcallstkc) 280 280 #endif 281 281 #endif 282 282 283 283 /* Array to convert a type to its unsigned equivalent */ 284 284 extern const tym_t tytouns[]; 285 285 #ifndef touns 286 286 #define touns(ty) (tytouns[(ty) & 0xFF]) 287 287 #endif 288 288 289 289 /* Determine if TYffunc or TYfpfunc (a far function) */ 290 290 #ifndef tyfarfunc 291 291 #define tyfarfunc(ty) (tytab[(ty) & 0xFF] & TYFLfarfunc) 292 292 #endif 293 293 294 294 // Determine if parameter can go in register for TYjfunc 295 295 #ifndef tyjparam 296 #define tyjparam(ty) (tysize(ty) <= intsize&& !tyfloating(ty) && tybasic(ty) != TYstruct && tybasic(ty) != TYarray)296 #define tyjparam(ty) (tysize(ty) <= NPTRSIZE && !tyfloating(ty) && tybasic(ty) != TYstruct && tybasic(ty) != TYarray) 297 297 #endif 298 298 299 299 /* Determine relaxed type */ 300 300 #ifndef tyrelax 301 301 #define tyrelax(ty) (_tyrelax[tybasic(ty)]) 302 302 #endif 303 303 304 304 /* Array to give the 'relaxed' type for relaxed type checking */ 305 305 extern unsigned char _tyrelax[]; 306 306 #define type_relax (config.flags3 & CFG3relax) // !=0 if relaxed type checking 307 307 #if TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_SOLARIS 308 308 #define type_semirelax (config.flags3 & CFG3semirelax) // !=0 if semi-relaxed type checking 309 309 #else 310 310 #define type_semirelax type_relax 311 311 #endif 312 312 313 313 /* Determine functionally equivalent type */ 314 314 extern unsigned char tyequiv[]; 315 315 316 316 /* Give an ascii string for a type */ trunk/src/freebsd.mak
r599 r605 1 1 2 C=backend 3 TK=tk 4 ROOT=root 5 6 MODEL=-m32 7 8 CC=g++ $(MODEL) 9 10 #OPT=-g -g3 11 #OPT=-O2 12 13 #COV=-fprofile-arcs -ftest-coverage 14 15 WARNINGS=-Wno-deprecated -Wstrict-aliasing 16 17 #GFLAGS = $(WARNINGS) -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 -DUNITTEST $(COV) 18 GFLAGS = $(WARNINGS) -D__near= -D__pascal= -fno-exceptions -O2 19 20 CFLAGS = $(GFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_FREEBSD=1 -D_DH 21 MFLAGS = $(GFLAGS) -I$C -I$(TK) -D__I86__=1 -DMARS=1 -DTARGET_FREEBSD=1 -D_DH 22 23 CH= $C/cc.h $C/global.h $C/parser.h $C/oper.h $C/code.h $C/type.h \ 24 $C/dt.h $C/cgcv.h $C/el.h $C/iasm.h 25 TOTALH= 26 27 DMD_OBJS = \ 28 access.o array.o attrib.o bcomplex.o bit.o blockopt.o \ 29 cast.o code.o cg.o cg87.o cgcod.o cgcs.o cgelem.o cgen.o \ 30 cgreg.o cgsched.o class.o cod1.o cod2.o cod3.o cod4.o cod5.o \ 31 constfold.o irstate.o dchar.o cond.o debug.o \ 32 declaration.o dsymbol.o dt.o dump.o e2ir.o ee.o eh.o el.o \ 33 dwarf.o enum.o evalu8.o expression.o func.o gdag.o gflow.o \ 34 glocal.o gloop.o glue.o gnuc.o go.o gother.o html.o iasm.o id.o \ 35 identifier.o impcnvtab.o import.o inifile.o init.o inline.o \ 36 lexer.o link.o lstring.o mangle.o mars.o rmem.o module.o msc.o mtype.o \ 37 nteh.o cppmangle.o opover.o optimize.o os.o out.o outbuf.o \ 38 parse.o ph.o ptrntab.o root.o rtlsym.o s2ir.o scope.o statement.o \ 39 stringtable.o struct.o csymbol.o template.o tk.o tocsym.o todt.o \ 40 type.o typinf.o util.o var.o version.o strtold.o utf.o staticassert.o \ 41 unialpha.o toobj.o toctype.o toelfdebug.o entity.o doc.o macro.o \ 42 hdrgen.o delegatize.o aa.o ti_achar.o toir.o interpret.o traits.o \ 43 builtin.o clone.o aliasthis.o \ 44 man.o arrayop.o port.o response.o async.o json.o speller.o aav.o unittests.o \ 45 imphint.o \ 46 libelf.o elfobj.o 47 48 SRC = win32.mak linux.mak osx.mak freebsd.mak solaris.mak \ 49 mars.c enum.c struct.c dsymbol.c import.c idgen.c impcnvgen.c \ 50 identifier.c mtype.c expression.c optimize.c template.h \ 51 template.c lexer.c declaration.c cast.c cond.h cond.c link.c \ 52 aggregate.h parse.c statement.c constfold.c version.h version.c \ 53 inifile.c iasm.c module.c scope.c dump.c init.h init.c attrib.h \ 54 attrib.c opover.c class.c mangle.c bit.c tocsym.c func.c inline.c \ 55 access.c complex_t.h irstate.h irstate.c glue.c msc.c ph.c tk.c \ 56 s2ir.c todt.c e2ir.c util.c identifier.h parse.h \ 57 scope.h enum.h import.h mars.h module.h mtype.h dsymbol.h \ 58 declaration.h lexer.h expression.h irstate.h statement.h eh.c \ 59 utf.h utf.c staticassert.h staticassert.c unialpha.c \ 60 typinf.c toobj.c toctype.c tocvdebug.c toelfdebug.c entity.c \ 61 doc.h doc.c macro.h macro.c hdrgen.h hdrgen.c arraytypes.h \ 62 delegatize.c toir.h toir.c interpret.c traits.c cppmangle.c \ 63 builtin.c clone.c lib.h libomf.c libelf.c libmach.c arrayop.c \ 64 aliasthis.h aliasthis.c json.h json.c unittests.c imphint.c \ 65 $C/cdef.h $C/cc.h $C/oper.h $C/ty.h $C/optabgen.c \ 66 $C/global.h $C/parser.h $C/code.h $C/type.h $C/dt.h $C/cgcv.h \ 67 $C/el.h $C/iasm.h $C/rtlsym.h $C/html.h \ 68 $C/bcomplex.c $C/blockopt.c $C/cg.c $C/cg87.c \ 69 $C/cgcod.c $C/cgcs.c $C/cgcv.c $C/cgelem.c $C/cgen.c $C/cgobj.c \ 70 $C/cgreg.c $C/var.c $C/strtold.c \ 71 $C/cgsched.c $C/cod1.c $C/cod2.c $C/cod3.c $C/cod4.c $C/cod5.c \ 72 $C/code.c $C/symbol.c $C/debug.c $C/dt.c $C/ee.c $C/el.c \ 73 $C/evalu8.c $C/go.c $C/gflow.c $C/gdag.c \ 74 $C/gother.c $C/glocal.c $C/gloop.c $C/html.c $C/newman.c \ 75 $C/nteh.c $C/os.c $C/out.c $C/outbuf.c $C/ptrntab.c $C/rtlsym.c \ 76 $C/type.c $C/melf.h $C/mach.h $C/bcomplex.h \ 77 $C/cdeflnx.h $C/outbuf.h $C/token.h $C/tassert.h \ 78 $C/elfobj.c $C/cv4.h $C/dwarf2.h $C/cpp.h $C/exh.h $C/go.h \ 79 $C/dwarf.c $C/dwarf.h $C/aa.h $C/aa.c $C/tinfo.h $C/ti_achar.c \ 80 $C/machobj.c \ 81 $(TK)/filespec.h $(TK)/mem.h $(TK)/list.h $(TK)/vec.h \ 82 $(TK)/filespec.c $(TK)/mem.c $(TK)/vec.c $(TK)/list.c \ 83 $(ROOT)/dchar.h $(ROOT)/dchar.c $(ROOT)/lstring.h \ 84 $(ROOT)/lstring.c $(ROOT)/root.h $(ROOT)/root.c $(ROOT)/array.c \ 85 $(ROOT)/rmem.h $(ROOT)/rmem.c $(ROOT)/port.h $(ROOT)/port.c \ 86 $(ROOT)/gnuc.h $(ROOT)/gnuc.c $(ROOT)/man.c \ 87 $(ROOT)/stringtable.h $(ROOT)/stringtable.c \ 88 $(ROOT)/response.c $(ROOT)/async.h $(ROOT)/async.c \ 89 $(ROOT)/aav.h $(ROOT)/aav.c \ 90 $(ROOT)/speller.h $(ROOT)/speller.c 91 92 93 all: dmd 94 95 dmd: $(DMD_OBJS) 96 gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd 97 98 clean: 99 rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \ 100 impcnvtab.c optabgen debtab.c optab.c cdxxx.c elxxx.c fltables.c \ 101 tytab.c core \ 102 *.cov *.gcda *.gcno 103 104 ######## optabgen generates some source 105 106 optabgen: $C/optabgen.c $C/cc.h $C/oper.h 107 $(CC) $(MFLAGS) $< -o optabgen 108 ./optabgen 109 110 optabgen_output = debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c 111 $(optabgen_output) : optabgen 112 113 ######## idgen generates some source 114 115 idgen_output = id.h id.c 116 $(idgen_output) : idgen 117 118 idgen : idgen.c 119 $(CC) idgen.c -o idgen 120 ./idgen 121 122 ######### impcnvgen generates some source 123 124 impcnvtab_output = impcnvtab.c 125 $(impcnvtab_output) : impcnvgen 126 127 impcnvgen : mtype.h impcnvgen.c 128 $(CC) $(CFLAGS) impcnvgen.c -o impcnvgen 129 ./impcnvgen 130 131 ######### 132 133 $(DMD_OBJS) : $(idgen_output) $(optabgen_output) $(impcnvgen_output) 134 135 aa.o: $C/aa.h $C/tinfo.h $C/aa.c 136 $(CC) -c $(MFLAGS) -I. $C/aa.c 137 138 aav.o: $(ROOT)/aav.c 139 $(CC) -c $(GFLAGS) -I$(ROOT) $< 140 141 access.o: access.c 142 $(CC) -c $(CFLAGS) $< 143 144 aliasthis.o: aliasthis.c 145 $(CC) -c $(CFLAGS) $< 146 147 array.o: $(ROOT)/array.c 148 $(CC) -c $(GFLAGS) -I$(ROOT) $< 149 150 arrayop.o: arrayop.c 151 $(CC) -c $(CFLAGS) $< 152 153 async.o: $(ROOT)/async.c 154 $(CC) -c $(GFLAGS) -I$(ROOT) $< 155 156 attrib.o: attrib.c 157 $(CC) -c $(CFLAGS) $< 158 159 bcomplex.o: $C/bcomplex.c 160 $(CC) -c $(MFLAGS) $< 161 162 bit.o: expression.h bit.c 163 $(CC) -c -I$(ROOT) $(MFLAGS) bit.c 164 165 blockopt.o: $C/blockopt.c 166 $(CC) -c $(MFLAGS) $C/blockopt.c 167 168 builtin.o: builtin.c 169 $(CC) -c $(CFLAGS) $< 170 171 cast.o: cast.c 172 $(CC) -c $(CFLAGS) $< 173 174 cg.o: fltables.c $C/cg.c 175 $(CC) -c $(MFLAGS) -I. $C/cg.c 176 177 cg87.o: $C/cg87.c 178 $(CC) -c $(MFLAGS) $< 179 180 cgcod.o: $C/cgcod.c 181 $(CC) -c $(MFLAGS) -I. $< 182 183 cgcs.o: $C/cgcs.c 184 $(CC) -c $(MFLAGS) $< 185 186 cgcv.o: $C/cgcv.c 187 $(CC) -c $(MFLAGS) $< 188 189 cgelem.o: $C/rtlsym.h $C/cgelem.c 190 $(CC) -c $(MFLAGS) -I. $C/cgelem.c 191 192 cgen.o: $C/rtlsym.h $C/cgen.c 193 $(CC) -c $(MFLAGS) $C/cgen.c 194 195 cgobj.o: $C/cgobj.c 196 $(CC) -c $(MFLAGS) $< 197 198 cgreg.o: $C/cgreg.c 199 $(CC) -c $(MFLAGS) $< 200 201 cgsched.o: $C/rtlsym.h $C/cgsched.c 202 $(CC) -c $(MFLAGS) $C/cgsched.c 203 204 class.o: class.c 205 $(CC) -c $(CFLAGS) $< 206 207 clone.o: clone.c 208 $(CC) -c $(CFLAGS) $< 209 210 cod1.o: $C/rtlsym.h $C/cod1.c 211 $(CC) -c $(MFLAGS) $C/cod1.c 212 213 cod2.o: $C/rtlsym.h $C/cod2.c 214 $(CC) -c $(MFLAGS) $C/cod2.c 215 216 cod3.o: $C/rtlsym.h $C/cod3.c 217 $(CC) -c $(MFLAGS) $C/cod3.c 218 219 cod4.o: $C/cod4.c 220 $(CC) -c $(MFLAGS) $< 221 222 cod5.o: $C/cod5.c 223 $(CC) -c $(MFLAGS) $< 224 225 code.o: $C/code.c 226 $(CC) -c $(MFLAGS) $< 227 228 constfold.o: constfold.c 229 $(CC) -c $(CFLAGS) $< 230 231 irstate.o: irstate.h irstate.c 232 $(CC) -c $(MFLAGS) -I$(ROOT) irstate.c 233 234 csymbol.o : $C/symbol.c 235 $(CC) -c $(MFLAGS) $C/symbol.c -o csymbol.o 236 237 dchar.o: $(ROOT)/dchar.c 238 $(CC) -c $(GFLAGS) -I$(ROOT) $< 239 240 cond.o: cond.c 241 $(CC) -c $(CFLAGS) $< 242 243 cppmangle.o: cppmangle.c 244 $(CC) -c $(CFLAGS) $< 245 246 debug.o: $C/debug.c 247 $(CC) -c $(MFLAGS) -I. $< 248 249 declaration.o: declaration.c 250 $(CC) -c $(CFLAGS) $< 251 252 delegatize.o: delegatize.c 253 $(CC) -c $(CFLAGS) $< 254 255 doc.o: doc.c 256 $(CC) -c $(CFLAGS) $< 257 258 dsymbol.o: dsymbol.c 259 $(CC) -c $(CFLAGS) $< 260 261 dt.o: $C/dt.h $C/dt.c 262 $(CC) -c $(MFLAGS) $C/dt.c 263 264 dump.o: dump.c 265 $(CC) -c $(CFLAGS) $< 266 267 dwarf.o: $C/dwarf.h $C/dwarf.c 268 $(CC) -c $(MFLAGS) -I. $C/dwarf.c 269 270 e2ir.o: $C/rtlsym.h expression.h toir.h e2ir.c 271 $(CC) -c -I$(ROOT) $(MFLAGS) e2ir.c 272 273 ee.o: $C/ee.c 274 $(CC) -c $(MFLAGS) $< 275 276 eh.o : $C/cc.h $C/code.h $C/type.h $C/dt.h eh.c 277 $(CC) -c $(MFLAGS) eh.c 278 279 el.o: $C/rtlsym.h $C/el.h $C/el.c 280 $(CC) -c $(MFLAGS) $C/el.c 281 282 elfobj.o: $C/elfobj.c 283 $(CC) -c $(MFLAGS) $< 284 285 entity.o: entity.c 286 $(CC) -c $(CFLAGS) $< 287 288 enum.o: enum.c 289 $(CC) -c $(CFLAGS) $< 290 291 evalu8.o: $C/evalu8.c 292 $(CC) -c $(MFLAGS) $< 293 294 expression.o: expression.c 295 $(CC) -c $(CFLAGS) $< 296 297 func.o: func.c 298 $(CC) -c $(CFLAGS) $< 299 300 gdag.o: $C/gdag.c 301 $(CC) -c $(MFLAGS) $< 302 303 gflow.o: $C/gflow.c 304 $(CC) -c $(MFLAGS) $< 305 306 #globals.o: globals.c 307 # $(CC) -c $(CFLAGS) $< 308 309 glocal.o: $C/rtlsym.h $C/glocal.c 310 $(CC) -c $(MFLAGS) $C/glocal.c 311 312 gloop.o: $C/gloop.c 313 $(CC) -c $(MFLAGS) $< 314 315 glue.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h glue.c 316 $(CC) -c $(MFLAGS) -I$(ROOT) glue.c 317 318 gnuc.o: $(ROOT)/gnuc.h $(ROOT)/gnuc.c 319 $(CC) -c $(GFLAGS) $(ROOT)/gnuc.c 320 321 go.o: $C/go.c 322 $(CC) -c $(MFLAGS) $< 323 324 gother.o: $C/gother.c 325 $(CC) -c $(MFLAGS) $< 326 327 hdrgen.o: hdrgen.c 328 $(CC) -c $(CFLAGS) $< 329 330 html.o: $(CH) $(TOTALH) $C/html.h $C/html.c 331 $(CC) -c -I$(ROOT) $(MFLAGS) $C/html.c 332 333 iasm.o : $(CH) $(TOTALH) $C/iasm.h iasm.c 334 $(CC) -c $(MFLAGS) -I$(ROOT) iasm.c 335 336 id.o : id.h id.c 337 $(CC) -c $(CFLAGS) id.c 338 339 identifier.o: identifier.c 340 $(CC) -c $(CFLAGS) $< 341 342 impcnvtab.o: mtype.h impcnvtab.c 343 $(CC) -c $(CFLAGS) -I$(ROOT) impcnvtab.c 344 345 imphint.o: imphint.c 346 $(CC) -c $(CFLAGS) $< 347 348 import.o: import.c 349 $(CC) -c $(CFLAGS) $< 350 351 inifile.o: inifile.c 352 $(CC) -c $(CFLAGS) $< 353 354 init.o: init.c 355 $(CC) -c $(CFLAGS) $< 356 357 inline.o: inline.c 358 $(CC) -c $(CFLAGS) $< 359 360 interpret.o: interpret.c 361 $(CC) -c $(CFLAGS) $< 362 363 json.o: json.c 364 $(CC) -c $(CFLAGS) $< 365 366 lexer.o: lexer.c 367 $(CC) -c $(CFLAGS) $< 368 369 libelf.o: libelf.c $C/melf.h 370 $(CC) -c $(CFLAGS) -I$C $< 371 372 libmach.o: libmach.c $C/mach.h 373 $(CC) -c $(CFLAGS) -I$C $< 374 375 link.o: link.c 376 $(CC) -c $(CFLAGS) $< 377 378 lstring.o: $(ROOT)/lstring.c 379 $(CC) -c $(GFLAGS) -I$(ROOT) $< 380 381 machobj.o: $C/machobj.c 382 $(CC) -c $(MFLAGS) $< 383 384 macro.o: macro.c 385 $(CC) -c $(CFLAGS) $< 386 387 man.o: $(ROOT)/man.c 388 $(CC) -c $(GFLAGS) -I$(ROOT) $< 389 390 mangle.o: mangle.c 391 $(CC) -c $(CFLAGS) $< 392 393 mars.o: mars.c 394 $(CC) -c $(CFLAGS) $< 395 396 rmem.o: $(ROOT)/rmem.c 397 $(CC) -c $(GFLAGS) -I$(ROOT) $(ROOT)/rmem.c 398 399 module.o: $(TOTALH) $C/html.h module.c 400 $(CC) -c $(CFLAGS) -I$C module.c 401 402 msc.o: $(CH) mars.h msc.c 403 $(CC) -c $(MFLAGS) msc.c 404 405 mtype.o: mtype.c 406 $(CC) -c $(CFLAGS) $< 407 408 nteh.o: $C/rtlsym.h $C/nteh.c 409 $(CC) -c $(MFLAGS) $C/nteh.c 410 411 opover.o: opover.c 412 $(CC) -c $(CFLAGS) $< 413 414 optimize.o: optimize.c 415 $(CC) -c $(CFLAGS) $< 416 417 os.o: $C/os.c 418 $(CC) -c $(MFLAGS) $< 419 420 out.o: $C/out.c 421 $(CC) -c $(MFLAGS) $< 422 423 outbuf.o : $C/outbuf.h $C/outbuf.c 424 $(CC) -c $(MFLAGS) $C/outbuf.c 425 426 parse.o: parse.c 427 $(CC) -c $(CFLAGS) $< 428 429 ph.o: ph.c 430 $(CC) -c $(MFLAGS) $< 431 432 port.o: $(ROOT)/port.c 433 $(CC) -c $(GFLAGS) -I$(ROOT) $< 434 435 ptrntab.o: $C/iasm.h $C/ptrntab.c 436 $(CC) -c $(MFLAGS) $C/ptrntab.c 437 438 response.o: $(ROOT)/response.c 439 $(CC) -c $(GFLAGS) -I$(ROOT) $< 440 441 root.o: $(ROOT)/root.c 442 $(CC) -c $(GFLAGS) -I$(ROOT) $< 443 444 rtlsym.o: $C/rtlsym.h $C/rtlsym.c 445 $(CC) -c $(MFLAGS) $C/rtlsym.c 446 447 s2ir.o : $C/rtlsym.h statement.h s2ir.c 448 $(CC) -c -I$(ROOT) $(MFLAGS) s2ir.c 449 450 scope.o: scope.c 451 $(CC) -c $(CFLAGS) $< 452 453 speller.o: $(ROOT)/speller.c 454 $(CC) -c $(GFLAGS) -I$(ROOT) $< 455 456 statement.o: statement.c 457 $(CC) -c $(CFLAGS) $< 458 459 staticassert.o: staticassert.h staticassert.c 460 $(CC) -c $(CFLAGS) staticassert.c 461 462 stringtable.o: $(ROOT)/stringtable.c 463 $(CC) -c $(GFLAGS) -I$(ROOT) $< 464 465 strtold.o: $C/strtold.c 466 gcc $(MODEL) -c $C/strtold.c 467 468 struct.o: struct.c 469 $(CC) -c $(CFLAGS) $< 470 471 template.o: template.c 472 $(CC) -c $(CFLAGS) $< 473 474 ti_achar.o: $C/tinfo.h $C/ti_achar.c 475 $(CC) -c $(MFLAGS) -I. $C/ti_achar.c 476 477 tk.o: tk.c 478 $(CC) -c $(MFLAGS) tk.c 479 480 tocsym.o: $(CH) $(TOTALH) mars.h module.h tocsym.c 481 $(CC) -c $(MFLAGS) -I$(ROOT) tocsym.c 482 483 toctype.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h toctype.c 484 $(CC) -c $(MFLAGS) -I$(ROOT) toctype.c 485 486 todt.o : mtype.h expression.h $C/dt.h todt.c 487 $(CC) -c -I$(ROOT) $(MFLAGS) todt.c 488 489 toelfdebug.o: $(CH) $(TOTALH) mars.h toelfdebug.c 490 $(CC) -c $(MFLAGS) -I$(ROOT) toelfdebug.c 491 492 toir.o: $C/rtlsym.h expression.h toir.h toir.c 493 $(CC) -c -I$(ROOT) $(MFLAGS) toir.c 494 495 toobj.o: $(CH) $(TOTALH) mars.h module.h toobj.c 496 $(CC) -c $(MFLAGS) -I$(ROOT) toobj.c 497 498 traits.o: $(TOTALH) traits.c 499 $(CC) -c $(CFLAGS) $< 500 501 type.o: $C/type.c 502 $(CC) -c $(MFLAGS) $C/type.c 503 504 typinf.o: $(CH) $(TOTALH) mars.h module.h mtype.h typinf.c 505 $(CC) -c $(MFLAGS) -I$(ROOT) typinf.c 506 507 util.o: util.c 508 $(CC) -c $(MFLAGS) $< 509 510 utf.o: utf.h utf.c 511 $(CC) -c $(CFLAGS) utf.c 512 513 unialpha.o: unialpha.c 514 $(CC) -c $(CFLAGS) $< 515 516 unittests.o: unittests.c 517 $(CC) -c $(CFLAGS) $< 518 519 var.o: $C/var.c optab.c 520 $(CC) -c $(MFLAGS) -I. $C/var.c 521 522 version.o: version.c 523 $(CC) -c $(CFLAGS) $< 524 525 ###################################################### 526 527 gcov: 528 gcov access.c 529 gcov aliasthis.c 530 gcov arrayop.c 531 gcov attrib.c 532 gcov bit.c 533 gcov builtin.c 534 gcov cast.c 535 gcov class.c 536 gcov clone.c 537 gcov cond.c 538 gcov constfold.c 539 gcov declaration.c 540 gcov delegatize.c 541 gcov doc.c 542 gcov dsymbol.c 543 gcov dump.c 544 gcov e2ir.c 545 gcov eh.c 546 gcov entity.c 547 gcov enum.c 548 gcov expression.c 549 gcov func.c 550 gcov glue.c 551 gcov iasm.c 552 gcov identifier.c 553 gcov imphint.c 554 gcov import.c 555 gcov inifile.c 556 gcov init.c 557 gcov inline.c 558 gcov interpret.c 559 gcov irstate.c 560 gcov json.c 561 gcov lexer.c 562 gcov libelf.c 563 gcov link.c 564 gcov macro.c 565 gcov mangle.c 566 gcov mars.c 567 gcov module.c 568 gcov msc.c 569 gcov mtype.c 570 gcov opover.c 571 gcov optimize.c 572 gcov parse.c 573 gcov ph.c 574 gcov scope.c 575 gcov statement.c 576 gcov staticassert.c 577 gcov s2ir.c 578 gcov struct.c 579 gcov template.c 580 gcov tk.c 581 gcov tocsym.c 582 gcov todt.c 583 gcov toobj.c 584 gcov toctype.c 585 gcov toelfdebug.c 586 gcov typinf.c 587 gcov unialpha.c 588 gcov utf.c 589 gcov util.c 590 gcov version.c 591 592 # gcov hdrgen.c 593 # gcov tocvdebug.c 594 595 ###################################################### 596 597 zip: 598 -rm -f dmdsrc.zip 599 zip dmdsrc $(SRC) trunk/src/glue.c
r592 r605 790 790 791 791 // Determine register assignments 792 792 if (pi) 793 793 { 794 794 if (global.params.isX86_64) 795 795 { 796 796 // Order of assignment of pointer or integer parameters 797 797 static const unsigned char argregs[6] = { DI,SI,DX,CX,R8,R9 }; 798 798 int r = 0; 799 799 int xmmcnt = XMM0; 800 800 801 801 for (int i = 0; i < pi; i++) 802 802 { Symbol *sp = params[i]; 803 803 tym_t ty = tybasic(sp->Stype->Tty); 804 804 // BUG: doesn't work for structs 805 805 if (r < sizeof(argregs)/sizeof(argregs[0])) 806 806 { 807 807 if (type_jparam(sp->Stype)) 808 808 { 809 809 sp->Sclass = SCfastpar; 810 sp->Spreg = r;810 sp->Spreg = argregs[r]; 811 811 sp->Sfl = FLauto; 812 812 ++r; 813 813 } 814 814 } 815 815 if (xmmcnt < XMM7) 816 816 { 817 817 if (tyfloating(ty) && tysize(ty) <= 8) 818 818 { 819 819 sp->Sclass = SCfastpar; 820 820 sp->Spreg = xmmcnt; 821 821 sp->Sfl = FLauto; 822 822 ++xmmcnt; 823 823 } 824 824 } 825 825 } 826 826 } 827 827 else 828 828 { 829 829 // First parameter goes in register 830 830 Symbol *sp = params[0]; trunk/src/iasm.c
r596 r605 534 534 { 535 535 if (tok_value == toknum) 536 536 asm_token(); // scan past token 537 537 else 538 538 /* When we run out of tokens, asmtok is NULL. 539 539 * But when this happens when a ';' was hit. 540 540 */ 541 541 asmerr(errnum, asmtok ? asmtok->toChars() : ";"); 542 542 } 543 543 544 544 545 545 /******************************* 546 546 */ 547 547 548 548 STATIC PTRNTAB asm_classify(OP *pop, OPND *popnd1, OPND *popnd2, OPND *popnd3, 549 549 unsigned *pusNumops) 550 550 { 551 551 unsigned usNumops; 552 552 unsigned usActual; 553 553 PTRNTAB ptbRet = { NULL }; 554 opflag_t usFlags1 = 0 ; 555 opflag_t usFlags2 = 0; 556 opflag_t usFlags3 = 0; 557 PTRNTAB1 *pptb1; 558 PTRNTAB2 *pptb2; 559 PTRNTAB3 *pptb3; 554 opflag_t opflags1 = 0 ; 555 opflag_t opflags2 = 0; 556 opflag_t opflags3 = 0; 560 557 char bFake = FALSE; 561 558 562 559 unsigned char bMatch1, bMatch2, bMatch3, bRetry = FALSE; 563 560 564 561 // How many arguments are there? the parser is strictly left to right 565 562 // so this should work. 566 563 567 564 if (!popnd1) 568 565 usNumops = 0; 569 566 else 570 567 { 571 popnd1->usFlags = usFlags1 = asm_determine_operand_flags(popnd1);568 popnd1->usFlags = opflags1 = asm_determine_operand_flags(popnd1); 572 569 if (!popnd2) 573 570 usNumops = 1; 574 571 else 575 572 { 576 popnd2->usFlags = usFlags2 = asm_determine_operand_flags(popnd2);573 popnd2->usFlags = opflags2 = asm_determine_operand_flags(popnd2); 577 574 if (!popnd3) 578 575 usNumops = 2; 579 576 else 580 577 { 581 popnd3->usFlags = usFlags3 = asm_determine_operand_flags(popnd3);578 popnd3->usFlags = opflags3 = asm_determine_operand_flags(popnd3); 582 579 usNumops = 3; 583 580 } 584 581 } 585 582 } 586 583 587 584 // Now check to insure that the number of operands is correct 588 585 usActual = (pop->usNumops & ITSIZE); 589 586 if (usActual != usNumops && asmstate.ucItype != ITopt && 590 587 asmstate.ucItype != ITfloat) 591 588 { 592 589 PARAM_ERROR: 593 590 asmerr(EM_nops_expected, usActual, asm_opstr(pop), usNumops); 594 591 } 595 592 if (usActual < usNumops) 596 593 *pusNumops = usActual; 597 594 else 598 595 *pusNumops = usNumops; 599 596 // 600 597 // The number of arguments matches, now check to find the opcode 601 598 // in the associated opcode table 602 599 // 603 600 RETRY: 604 601 //printf("usActual = %d\n", usActual); 605 602 switch (usActual) 606 603 { 607 604 case 0: 608 605 ptbRet = pop->ptb ; 609 606 goto RETURN_IT; 610 607 611 608 case 1: 612 //printf("usFlags1 = "); asm_output_flags(usFlags1); printf("\n"); 613 for (pptb1 = pop->ptb.pptb1; pptb1->usOpcode != ASM_END; 614 pptb1++) 609 { //printf("opflags1 = "); asm_output_flags(opflags1); printf("\n"); 610 PTRNTAB1 *table1; 611 for (table1 = pop->ptb.pptb1; table1->usOpcode != ASM_END; 612 table1++) 615 613 { 616 //printf("table = "); asm_output_flags( pptb1->usOp1); printf("\n");617 bMatch1 = asm_match_flags( usFlags1, pptb1->usOp1);614 //printf("table = "); asm_output_flags(table1->usOp1); printf("\n"); 615 bMatch1 = asm_match_flags(opflags1, table1->usOp1); 618 616 //printf("bMatch1 = x%x\n", bMatch1); 619 617 if (bMatch1) 620 { if ( pptb1->usOpcode == 0x68 &&618 { if (table1->usOpcode == 0x68 && 621 619 !I16 && 622 pptb1->usOp1 == _imm16620 table1->usOp1 == _imm16 623 621 ) 624 622 // Don't match PUSH imm16 in 32 bit code 625 623 continue; 626 624 break; 627 625 } 628 626 if ((asmstate.ucItype == ITimmed) && 629 asm_match_flags( usFlags1,627 asm_match_flags(opflags1, 630 628 CONSTRUCT_FLAGS(_8 | _16 | _32, _imm, _normal, 631 629 0)) && 632 popnd1->disp == pptb1->usFlags)630 popnd1->disp == table1->usFlags) 633 631 break; 634 632 if ((asmstate.ucItype == ITopt || 635 633 asmstate.ucItype == ITfloat) && 636 634 !usNumops && 637 ! pptb1->usOp1)635 !table1->usOp1) 638 636 { 639 637 if (usNumops > 1) 640 638 goto PARAM_ERROR; 641 639 break; 642 640 } 643 641 } 644 if ( pptb1->usOpcode == ASM_END)642 if (table1->usOpcode == ASM_END) 645 643 { 646 644 #ifdef DEBUG 647 645 if (debuga) 648 646 { printf("\t%s\t", asm_opstr(pop)); 649 647 if (popnd1) 650 648 asm_output_popnd(popnd1); 651 649 if (popnd2) { 652 650 printf(","); 653 651 asm_output_popnd(popnd2); 654 652 } 655 653 if (popnd3) { 656 654 printf(","); 657 655 asm_output_popnd(popnd3); 658 656 } 659 657 printf("\n"); 660 658 661 659 printf("OPCODE mism = "); 662 660 if (popnd1) 663 661 asm_output_flags(popnd1->usFlags); 664 662 else 665 663 printf("NONE"); 666 664 printf("\n"); 667 665 } 668 666 #endif 669 667 TYPE_SIZE_ERROR: 670 668 if (popnd1 && ASM_GET_aopty(popnd1->usFlags) != _reg) 671 669 { 672 usFlags1 = popnd1->usFlags |= _anysize;670 opflags1 = popnd1->usFlags |= _anysize; 673 671 if (asmstate.ucItype == ITjump) 674 672 { 675 673 if (bRetry && popnd1->s && !popnd1->s->isLabel()) 676 674 { 677 675 asmerr(EM_label_expected, popnd1->s->toChars()); 678 676 } 679 677 680 678 popnd1->usFlags |= CONSTRUCT_FLAGS(0, 0, 0, 681 679 _fanysize); 682 680 } 683 681 } 684 682 if (popnd2 && ASM_GET_aopty(popnd2->usFlags) != _reg) { 685 usFlags2 = popnd2->usFlags |= (_anysize);683 opflags2 = popnd2->usFlags |= (_anysize); 686 684 if (asmstate.ucItype == ITjump) 687 685 popnd2->usFlags |= CONSTRUCT_FLAGS(0, 0, 0, 688 686 _fanysize); 689 687 } 690 688 if (popnd3 && ASM_GET_aopty(popnd3->usFlags) != _reg) { 691 usFlags3 = popnd3->usFlags |= (_anysize);689 opflags3 = popnd3->usFlags |= (_anysize); 692 690 if (asmstate.ucItype == ITjump) 693 691 popnd3->usFlags |= CONSTRUCT_FLAGS(0, 0, 0, 694 692 _fanysize); 695 693 } 696 694 if (bRetry) 697 695 { 698 696 asmerr(EM_bad_op, asm_opstr(pop)); // illegal type/size of operands 699 697 } 700 698 bRetry = TRUE; 701 699 goto RETRY; 702 700 703 701 } 704 ptbRet.pptb1 = pptb1;702 ptbRet.pptb1 = table1; 705 703 goto RETURN_IT; 706 704 } 707 705 case 2: 708 //printf("usFlags1 = "); asm_output_flags(usFlags1); printf(" "); 709 //printf("usFlags2 = "); asm_output_flags(usFlags2); printf("\n"); 710 for (pptb2 = pop->ptb.pptb2; 711 pptb2->usOpcode != ASM_END; 712 pptb2++) 706 { //printf("opflags1 = "); asm_output_flags(opflags1); printf(" "); 707 //printf("opflags2 = "); asm_output_flags(opflags2); printf("\n"); 708 PTRNTAB2 *table2; 709 for (table2 = pop->ptb.pptb2; 710 table2->usOpcode != ASM_END; 711 table2++) 713 712 { 714 //printf("table1 = "); asm_output_flags( pptb2->usOp1); printf(" ");715 //printf("table2 = "); asm_output_flags( pptb2->usOp2); printf("\n");716 bMatch1 = asm_match_flags( usFlags1, pptb2->usOp1);717 bMatch2 = asm_match_flags( usFlags2, pptb2->usOp2);713 //printf("table1 = "); asm_output_flags(table2->usOp1); printf(" "); 714 //printf("table2 = "); asm_output_flags(table2->usOp2); printf("\n"); 715 bMatch1 = asm_match_flags(opflags1, table2->usOp1); 716 bMatch2 = asm_match_flags(opflags2, table2->usOp2); 718 717 //printf("match1 = %d, match2 = %d\n",bMatch1,bMatch2); 719 718 if (bMatch1 && bMatch2) { 720 719 721 720 //printf("match\n"); 722 721 723 // OK, if they both match and the first op in the table is not AL724 //or size of 8 and the second is immediate 8,725 //then check to see if the constant726 //is a signed 8 bit constant. If so, then do not match, otherwise match727 //722 /* If they both match and the first op in the table is not AL 723 * or size of 8 and the second is immediate 8, 724 * then check to see if the constant 725 * is a signed 8 bit constant. If so, then do not match, otherwise match 726 */ 728 727 if (!bRetry && 729 !((ASM_GET_uSizemask( pptb2->usOp1) & _8) ||730 (ASM_GET_uRegmask( pptb2->usOp1) & _al)) &&731 (ASM_GET_aopty( pptb2->usOp2) == _imm) &&732 (ASM_GET_uSizemask( pptb2->usOp2) & _8))728 !((ASM_GET_uSizemask(table2->usOp1) & _8) || 729 (ASM_GET_uRegmask(table2->usOp1) & _al)) && 730 (ASM_GET_aopty(table2->usOp2) == _imm) && 731 (ASM_GET_uSizemask(table2->usOp2) & _8)) 733 732 { 734 733 735 734 if (popnd2->disp <= SCHAR_MAX) 736 735 break; 737 736 else 738 737 bFake = TRUE; 739 738 } 740 739 else 741 740 break; 742 741 } 743 742 if (asmstate.ucItype == ITopt || 744 743 asmstate.ucItype == ITfloat) 745 744 { 746 745 switch (usNumops) 747 746 { 748 747 case 0: 749 if (! pptb2->usOp1)748 if (!table2->usOp1) 750 749 goto Lfound2; 751 750 break; 752 751 case 1: 753 if (bMatch1 && ! pptb2->usOp2)752 if (bMatch1 && !table2->usOp2) 754 753 goto Lfound2; 755 754 break; 756 755 case 2: 757 756 break; 758 757 default: 759 758 goto PARAM_ERROR; 760 759 } 761 760 } 762 761 #if 0 763 762 if (asmstate.ucItype == ITshift && 764 ! pptb2->usOp2 &&763 !table2->usOp2 && 765 764 bMatch1 && popnd2->disp == 1 && 766 asm_match_flags( usFlags2,765 asm_match_flags(opflags2, 767 766 CONSTRUCT_FLAGS(_8|_16|_32, _imm,_normal,0)) 768 767 ) 769 768 break; 770 769 #endif 771 770 } 772 771 Lfound2: 773 if ( pptb2->usOpcode == ASM_END)772 if (table2->usOpcode == ASM_END) 774 773 { 775 774 #ifdef DEBUG 776 775 if (debuga) 777 776 { printf("\t%s\t", asm_opstr(pop)); 778 777 if (popnd1) 779 778 asm_output_popnd(popnd1); 780 779 if (popnd2) { 781 780 printf(","); 782 781 asm_output_popnd(popnd2); 783 782 } 784 783 if (popnd3) { 785 784 printf(","); 786 785 asm_output_popnd(popnd3); 787 786 } 788 787 printf("\n"); 789 788 790 789 printf("OPCODE mismatch = "); 791 790 if (popnd1) 792 791 asm_output_flags(popnd1->usFlags); 793 792 else 794 793 printf("NONE"); 795 794 printf( " Op2 = "); 796 795 if (popnd2) 797 796 asm_output_flags(popnd2->usFlags); 798 797 else 799 798 printf("NONE"); 800 799 printf("\n"); 801 800 } 802 801 #endif 803 802 goto TYPE_SIZE_ERROR; 804 803 } 805 ptbRet.pptb2 = pptb2;804 ptbRet.pptb2 = table2; 806 805 goto RETURN_IT; 807 case 3: 808 for (pptb3 = pop->ptb.pptb3; 809 pptb3->usOpcode != ASM_END; 810 pptb3++) 806 } 807 case 3: 808 { 809 PTRNTAB3 *table3; 810 for (table3 = pop->ptb.pptb3; 811 table3->usOpcode != ASM_END; 812 table3++) 811 813 { 812 bMatch1 = asm_match_flags( usFlags1, pptb3->usOp1);813 bMatch2 = asm_match_flags( usFlags2, pptb3->usOp2);814 bMatch3 = asm_match_flags( usFlags3, pptb3->usOp3);814 bMatch1 = asm_match_flags(opflags1, table3->usOp1); 815 bMatch2 = asm_match_flags(opflags2, table3->usOp2); 816 bMatch3 = asm_match_flags(opflags3, table3->usOp3); 815 817 if (bMatch1 && bMatch2 && bMatch3) 816 818 goto Lfound3; 817 819 if (asmstate.ucItype == ITopt) 818 820 { 819 821 switch (usNumops) 820 822 { 821 823 case 0: 822 if (! pptb3->usOp1)824 if (!table3->usOp1) 823 825 goto Lfound3; 824 826 break; 825 827 case 1: 826 if (bMatch1 && ! pptb3->usOp2)828 if (bMatch1 && !table3->usOp2) 827 829 goto Lfound3; 828 830 break; 829 831 case 2: 830 if (bMatch1 && bMatch2 && ! pptb3->usOp3)832 if (bMatch1 && bMatch2 && !table3->usOp3) 831 833 goto Lfound3; 832 834 break; 833 835 case 3: 834 836 break; 835 837 default: 836 838 goto PARAM_ERROR; 837 839 } 838 840 } 839 841 } 840 842 Lfound3: 841 if ( pptb3->usOpcode == ASM_END)843 if (table3->usOpcode == ASM_END) 842 844 { 843 845 #ifdef DEBUG 844 846 if (debuga) 845 847 { printf("\t%s\t", asm_opstr(pop)); 846 848 if (popnd1) 847 849 asm_output_popnd(popnd1); 848 850 if (popnd2) { 849 851 printf(","); 850 852 asm_output_popnd(popnd2); 851 853 } 852 854 if (popnd3) { 853 855 printf(","); 854 856 asm_output_popnd(popnd3); 855 857 } 856 858 printf("\n"); 857 859 858 860 printf("OPCODE mismatch = "); 859 861 if (popnd1) 860 862 asm_output_flags(popnd1->usFlags); 861 863 else 862 864 printf("NONE"); 863 865 printf( " Op2 = "); 864 866 if (popnd2) 865 867 asm_output_flags(popnd2->usFlags); 866 868 else 867 869 printf("NONE"); 868 870 if (popnd3) 869 871 asm_output_flags(popnd3->usFlags); 870 872 printf("\n"); 871 873 } 872 874 #endif 873 875 goto TYPE_SIZE_ERROR; 874 876 } 875 ptbRet.pptb3 = pptb3;877 ptbRet.pptb3 = table3; 876 878 goto RETURN_IT; 879 } 877 880 } 878 881 RETURN_IT: 879 882 if (bRetry && !bFake) 880 883 { 881 884 asmerr(EM_bad_op, asm_opstr(pop)); 882 885 } 883 886 return ptbRet; 884 887 } 885 888 886 889 /******************************* 887 890 */ 888 891 889 892 STATIC opflag_t asm_determine_float_flags(OPND *popnd) 890 893 { 891 894 //printf("asm_determine_float_flags()\n"); 892 895 893 896 opflag_t us, usFloat; 894 897 895 898 // Insure that if it is a register, that it is not a normal processor 896 899 // register. … … 969 972 if (asmstate.ucItype == ITfloat) 970 973 return asm_determine_float_flags(popnd); 971 974 972 975 // If just a register 973 976 if (popnd->base && !popnd->s && !popnd->disp && !popnd->real) 974 977 return popnd->base->ty; 975 978 #if DEBUG 976 979 if (debuga) 977 980 printf("popnd->base = %s\n, popnd->pregDisp1 = %p\n", popnd->base ? popnd->base->regstr : "NONE", popnd->pregDisp1); 978 981 #endif 979 982 ps = popnd->s; 980 983 Declaration *ds = ps ? ps->isDeclaration() : NULL; 981 984 if (ds && ds->storage_class & STClazy) 982 985 sz = _anysize; 983 986 else 984 987 sz = asm_type_size((ds && ds->storage_class & (STCout | STCref)) ? popnd->ptype->pointerTo() : popnd->ptype); 985 988 if (popnd->pregDisp1 && !popnd->base) 986 989 { 987 990 if (ps && ps->isLabel() && sz == _anysize) 988 991 sz = I16 ? _16 : _32; 989 return (popnd->pregDisp1->ty & _r32)992 return (popnd->pregDisp1->ty & (_r32 | _r64)) 990 993 ? CONSTRUCT_FLAGS(sz, _m, _addr32, 0) 991 994 : CONSTRUCT_FLAGS(sz, _m, _addr16, 0); 992 995 } 993 996 else if (ps) 994 997 { 995 998 if (popnd->bOffset || popnd->bSeg || ps == asmstate.psLocalsize) 996 999 return I16 997 1000 ? CONSTRUCT_FLAGS(_16, _imm, _normal, 0) 998 1001 : CONSTRUCT_FLAGS(_32, _imm, _normal, 0); 999 1002 1000 1003 if (ps->isLabel()) 1001 1004 { 1002 1005 switch (popnd->ajt) 1003 1006 { 1004 1007 case ASM_JUMPTYPE_UNSPECIFIED: 1005 1008 if (ps == asmstate.psDollar) 1006 1009 { 1007 1010 if (popnd->disp >= CHAR_MIN && 1008 1011 popnd->disp <= CHAR_MAX) 1009 1012 us = CONSTRUCT_FLAGS(_8, _rel, _flbl,0); … … 1571 1574 pc->IFL2 = FLconst; 1572 1575 break; 1573 1576 } 1574 1577 if (aoptyTable2 == _m || 1575 1578 aoptyTable2 == _rel || 1576 1579 // If not MMX register (_mm) or XMM register (_xmm) 1577 1580 (amodTable1 == _rspecial && !(uRegmaskTable1 & (0x08 | 0x10)) && !uSizemaskTable1) || 1578 1581 aoptyTable2 == _rm || 1579 1582 (popnd1->usFlags == _r32 && popnd2->usFlags == _xmm) || 1580 1583 (popnd1->usFlags == _r32 && popnd2->usFlags == _mm)) 1581 1584 { 1582 1585 #if 0 1583 1586 printf("test4 %d,%d,%d,%d\n", 1584 1587 (aoptyTable2 == _m), 1585 1588 (aoptyTable2 == _rel), 1586 1589 (amodTable1 == _rspecial && !(uRegmaskTable1 & (0x08 | 0x10))), 1587 1590 (aoptyTable2 == _rm) 1588 1591 ); 1589 1592 printf("usOpcode = %x\n", usOpcode); 1590 1593 #endif 1594 if (popnd1->usFlags == _r64) 1595 pc->Irex |= REX_W; 1591 1596 if (ptb.pptb0->usOpcode == 0x0F7E || // MOVD _rm32,_mm 1592 1597 ptb.pptb0->usOpcode == 0x660F7E // MOVD _rm32,_xmm 1593 1598 ) 1594 1599 { 1595 1600 asm_make_modrm_byte( 1596 1601 #ifdef DEBUG 1597 1602 auchOpcode, &usIdx, 1598 1603 #endif 1599 1604 pc, 1600 1605 ptb.pptb1->usFlags, 1601 1606 popnd1, popnd2); 1602 1607 } 1603 1608 else 1604 1609 { 1605 1610 asm_make_modrm_byte( 1606 1611 #ifdef DEBUG 1607 1612 auchOpcode, &usIdx, 1608 1613 #endif 1609 1614 pc, 1610 1615 ptb.pptb1->usFlags, 1611 1616 popnd2, popnd1); 1612 1617 } 1613 1618 popndTmp = popnd1; 1614 1619 aoptyTmp = aoptyTable1; 1615 1620 uSizemaskTmp = uSizemaskTable1; 1616 1621 } 1617 1622 else 1618 1623 { 1624 if (popnd2->usFlags == _r64) 1625 pc->Irex |= REX_W; 1626 1619 1627 if (((aoptyTable1 == _reg || aoptyTable1 == _float) && 1620 1628 amodTable1 == _normal && 1621 1629 (uRegmaskTable1 & _rplus_r))) 1622 1630 { 1623 1631 unsigned reg = popnd1->base->val; 1624 1632 if (reg & 8) 1625 1633 { reg &= 7; 1626 1634 pc->Irex |= REX_B; 1627 1635 assert(I64); 1628 1636 } 1629 1637 if (asmstate.ucItype == ITfloat) 1630 1638 pc->Irm += reg; 1631 1639 else 1632 1640 pc->Iop += reg; 1633 1641 #ifdef DEBUG 1634 1642 auchOpcode[usIdx-1] += reg; 1635 1643 #endif 1636 1644 } 1637 1645 else 1638 1646 if (((aoptyTable2 == _reg || aoptyTable2 == _float) && … … 1822 1830 1823 1831 1824 1832 /******************************* 1825 1833 */ 1826 1834 1827 1835 STATIC void asmerr(int errnum, ...) 1828 1836 { const char *format; 1829 1837 1830 1838 const char *p = asmstate.loc.toChars(); 1831 1839 if (*p) 1832 1840 printf("%s: ", p); 1833 1841 1834 1842 format = asmerrmsgs[errnum]; 1835 1843 va_list ap; 1836 1844 va_start(ap, errnum); 1837 1845 vprintf(format, ap); 1838 1846 va_end(ap); 1839 1847 1840 1848 printf("\n"); 1841 1849 fflush(stdout); 1842 1850 halt(); 1843 1851 longjmp(asmstate.env,1); 1844 1852 } 1845 1853 1846 1854 /******************************* 1847 1855 */ 1848 1856 1849 1857 STATIC void asmerr(const char *format, ...) 1850 1858 { 1851 1859 const char *p = asmstate.loc.toChars(); 1852 1860 if (*p) 1853 1861 printf("%s: ", p); 1854 1862 1855 1863 va_list ap; 1856 1864 va_start(ap, format); 1857 1865 vprintf(format, ap); 1858 1866 va_end(ap); 1859 1867 1860 1868 printf("\n"); 1861 1869 fflush(stdout); 1862 1870 … … 2373 2381 r1r2 = Y(popnd->pregDisp1->val); 2374 2382 switch (r1r2) 2375 2383 { 2376 2384 case X(_BX,_SI): rm = 0; break; 2377 2385 case X(_BX,_DI): rm = 1; break; 2378 2386 case Y(_BX): rm = 7; break; 2379 2387 2380 2388 case X(_BP,_SI): rm = 2; break; 2381 2389 case X(_BP,_DI): rm = 3; break; 2382 2390 case Y(_BP): rm = 6; bDisp = TRUE; break; 2383 2391 2384 2392 case X(_SI,_BX): rm = 0; break; 2385 2393 case X(_SI,_BP): rm = 2; break; 2386 2394 case Y(_SI): rm = 4; break; 2387 2395 2388 2396 case X(_DI,_BX): rm = 1; break; 2389 2397 case X(_DI,_BP): rm = 3; break; 2390 2398 case Y(_DI): rm = 5; break; 2391 2399 2392 2400 default: 2393 asmerr( EM_bad_addr_mode); // illegal addressing mode2401 asmerr("bad 16 bit index address mode"); 2394 2402 } 2395 2403 #undef X 2396 2404 #undef Y 2397 2405 } 2398 2406 mrmb.modregrm.rm = rm; 2399 2407 2400 2408 #ifdef DEBUG 2401 2409 if (debuga) 2402 2410 printf("This is an mod = %d, popnd->s =%p, popnd->disp = %ld\n", 2403 2411 mrmb.modregrm.mod, s, popnd->disp); 2404 2412 #endif 2405 2413 if (!s || (!mrmb.modregrm.mod && popnd->disp)) 2406 2414 { 2407 2415 if ((!popnd->disp && !bDisp) || 2408 2416 !popnd->pregDisp1) 2409 2417 mrmb.modregrm.mod = 0x0; 2410 2418 else 2411 2419 if (popnd->disp >= CHAR_MIN && 2412 2420 popnd->disp <= SCHAR_MAX) 2413 2421 mrmb.modregrm.mod = 0x1; … … 2892 2900 case _fn32: 2893 2901 case _flbl: 2894 2902 return(TRUE); 2895 2903 default: 2896 2904 return(FALSE); 2897 2905 } 2898 2906 case _rseg: 2899 2907 case _rspecial: 2900 2908 return(FALSE); 2901 2909 default: 2902 2910 assert(0); 2903 2911 return 0; 2904 2912 } 2905 2913 } 2906 2914 2907 2915 #ifdef DEBUG 2908 2916 2909 2917 /******************************* 2910 2918 */ 2911 2919 2912 STATIC void asm_output_flags(opflag_t usFlags)2913 { 2914 ASM_OPERAND_TYPE aopty = ASM_GET_aopty( usFlags);2915 ASM_MODIFIERS amod = ASM_GET_amod( usFlags);2916 unsigned uRegmask = ASM_GET_uRegmask( usFlags);2917 unsigned uSizemask = ASM_GET_uSizemask( usFlags);2920 STATIC void asm_output_flags(opflag_t opflags) 2921 { 2922 ASM_OPERAND_TYPE aopty = ASM_GET_aopty(opflags); 2923 ASM_MODIFIERS amod = ASM_GET_amod(opflags); 2924 unsigned uRegmask = ASM_GET_uRegmask(opflags); 2925 unsigned uSizemask = ASM_GET_uSizemask(opflags); 2918 2926 2919 2927 if (uSizemask == _anysize) 2920 2928 printf("_anysize "); 2921 2929 else if (uSizemask == 0) 2922 2930 printf("0 "); 2923 2931 else 2924 2932 { 2925 2933 if (uSizemask & _8) 2926 2934 printf("_8 "); 2927 2935 if (uSizemask & _16) 2928 2936 printf("_16 "); 2929 2937 if (uSizemask & _32) 2930 2938 printf("_32 "); 2931 2939 if (uSizemask & _48) 2932 2940 printf("_48 "); 2933 2941 if (uSizemask & _64) 2934 2942 printf("_64 "); 2935 2943 } 2936 2944 2937 2945 printf("_"); trunk/src/mtype.c
r604 r605 6319 6319 } 6320 6320 6321 6321 6322 6322 Expression *TypeEnum::defaultInit(Loc loc) 6323 6323 { 6324 6324 #if LOGDEFAULTINIT 6325 6325 printf("TypeEnum::defaultInit() '%s'\n", toChars()); 6326 6326 #endif 6327 6327 // Initialize to first member of enum 6328 6328 //printf("%s\n", sym->defaultval->type->toChars()); 6329 6329 if (!sym->defaultval) 6330 6330 { 6331 6331 error(loc, "forward reference of %s.init", toChars()); 6332 6332 return new ErrorExp(); 6333 6333 } 6334 6334 return sym->defaultval; 6335 6335 } 6336 6336 6337 6337 int TypeEnum::isZeroInit(Loc loc) 6338 6338 { 6339 if (!sym->defaultval && sym->scope) 6340 { // Enum is forward referenced. We need to resolve the whole thing. 6341 sym->semantic(NULL); 6342 } 6339 6343 if (!sym->defaultval) 6340 6344 { 6341 6345 #ifdef DEBUG 6342 6346 printf("3: "); 6343 6347 #endif 6344 6348 error(loc, "enum %s is forward referenced", sym->toChars()); 6345 6349 return 0; 6346 6350 } 6347 6351 return sym->defaultval->isBool(FALSE); 6348 6352 } 6349 6353 6350 6354 int TypeEnum::hasPointers() 6351 6355 { 6352 6356 return toBasetype()->hasPointers(); 6353 6357 } 6354 6358 6355 6359 /***************************** TypeTypedef *****************************/ 6356 6360 6357 6361 TypeTypedef::TypeTypedef(TypedefDeclaration *sym) 6358 6362 : Type(Ttypedef) trunk/src/win32.mak
r473 r605 1 1 #_ win32.mak 2 # Copyright (C) 1999-20 09by Digital Mars, http://www.digitalmars.com2 # Copyright (C) 1999-2010 by Digital Mars, http://www.digitalmars.com 3 3 # Written by Walter Bright 4 4 # All Rights Reserved 5 5 # Build dmd with Digital Mars C++ compiler 6 6 7 7 D= 8 8 DMDSVN=\svnproj\dmd\trunk\src 9 9 #DMDSVN=\svnproj\dmd\branches\dmd-1.x\src 10 10 SCROOT=$D\dm 11 11 INCLUDE=$(SCROOT)\include 12 12 CC=\dm\bin\dmc 13 13 LIBNT=$(SCROOT)\lib 14 14 SNN=$(SCROOT)\lib\snn 15 15 DIR=\dmd2 16 16 CP=cp 17 17 18 18 C=backend 19 19 TK=tk 20 20 ROOT=root 21 21 22 22 MAKE=make -fwin32.mak C=$C TK=$(TK) ROOT=$(ROOT) … … 478 478 statement.obj : $(TOTALH) statement.h statement.c 479 479 staticassert.obj : $(TOTALH) staticassert.h staticassert.c 480 480 struct.obj : $(TOTALH) identifier.h enum.h struct.c 481 481 traits.obj : $(TOTALH) traits.c 482 482 dsymbol.obj : $(TOTALH) identifier.h dsymbol.h dsymbol.c 483 483 mtype.obj : $(TOTALH) mtype.h mtype.c 484 484 #typinf.obj : $(TOTALH) mtype.h typinf.c 485 485 utf.obj : utf.h utf.c 486 486 template.obj : $(TOTALH) template.h template.c 487 487 version.obj : $(TOTALH) identifier.h dsymbol.h cond.h version.h version.c 488 488 489 489 ################### Utilities ################ 490 490 491 491 clean: 492 492 del *.obj 493 493 del total.sym 494 494 del msgs.h msgs.c 495 495 del elxxx.c cdxxx.c optab.c debtab.c fltables.c tytab.c 496 496 del impcnvtab.c 497 497 498 zip : detab $(MAKEFILES)498 zip : detab tolf $(MAKEFILES) 499 499 del dmdsrc.zip 500 500 zip32 dmdsrc $(MAKEFILES) 501 501 zip32 dmdsrc $(SRCS) 502 502 zip32 dmdsrc $(BACKSRC) 503 503 zip32 dmdsrc $(TKSRC) 504 504 zip32 dmdsrc $(ROOTSRC) 505 505 506 506 ################### Detab ################ 507 507 508 508 detab: 509 509 detab $(SRCS) $(ROOTSRC) $(TKSRC) $(BACKSRC) 510 511 tolf: 512 tolf $(SRCS) $(ROOTSRC) $(TKSRC) $(BACKSRC) $(MAKEFILES) 510 513 511 514 ################### Install ################ 512 515 513 516 install: detab install2 514 517 515 518 install2: 516 519 copy dmd.exe $(DIR)\windows\bin\ 517 520 copy phobos\phobos.lib $(DIR)\windows\lib 518 521 $(CP) $(SRCS) $(DIR)\src\dmd\ 519 522 $(CP) $(ROOTSRC) $(DIR)\src\dmd\root\ 520 523 $(CP) $(TKSRC) $(DIR)\src\dmd\tk\ 521 524 $(CP) $(BACKSRC) $(DIR)\src\dmd\backend\ 522 525 $(CP) $(MAKEFILES) $(DIR)\src\dmd\ 523 526 copy gpl.txt $(DIR)\src\dmd\ 524 527 copy readme.txt $(DIR)\src\dmd\ 525 528 copy artistic.txt $(DIR)\src\dmd\ 526 529 copy backendlicense.txt $(DIR)\src\dmd\ 527 530 528 531 ################### Write to SVN ################ 529 532 530 svn: detab svn2533 svn: detab tolf svn2 531 534 532 535 svn2: 533 536 $(CP) $(SRCS) $(DMDSVN)\ 534 537 $(CP) $(ROOTSRC) $(DMDSVN)\root\ 535 538 $(CP) $(TKSRC) $(DMDSVN)\tk\ 536 539 $(CP) $(BACKSRC) $(DMDSVN)\backend\ 537 540 $(CP) $(MAKEFILES) $(DMDSVN)\ 538 541 copy gpl.txt $(DMDSVN)\ 539 542 copy readme.txt $(DMDSVN)\ 540 543 copy artistic.txt $(DMDSVN)\ 541 544 copy backendlicense.txt $(DMDSVN)\ 542 545 543 546 ###################################
