From: Sandeep D. <sa...@dd...> - 2000-04-13 17:28:39
|
Michal Couple of things to note here the compiler right now does not handle cast in initialization of "const" variables too well so it is best to avoid. Michael Hope.. made changes to separate out the assembler dependent portions (Michael SDCC expects numbers to be generated in LITTLE-ENDIAN format I fixed SDCCgluse.c to take care of this.. BTW the assembler separation looks very good :-) .... )... Mikee I fixed up the problems of inits in code space... you will need to update SDCCglue.c .. it should generate the correct code now... Sandeep > > Hi, > I'm sending you my whole compiled nonworking file with new cvs. > > Mikee > > On Wed, 12 Apr 2000, Sandeep Dutta wrote: > > > Michal > > I fixed the initialization & the pointer value cahing problems..please > > download the latest cvs tree & it should work.. let me know how your > > testing goes. > > PS you might have to do a make clean then do a full rebuild > > > > Regards > > Sandeep > > > > > > Hi Sandeep, > > > I'm sorry to trouble you, but I can't continue my testing without fixing > > > this error. > > > Can you tell me, where this error going to be fixed (aproximatly)? > > > > > > Mikee > > > > > > On Thu, 6 Apr 2000, Sandeep Dutta wrote: > > > > > > > Hi Michal > > > > Will look at this problem over the weekend .. this month has > > > > been very very busy ... but please testing & sending your > > > > problems ... it helps to make the compiler a better product.. > > > > > > > > Regards > > > > Sandeep > > > > > > > > > > Hi I found a bug, > > > > > I just download cvs version and it has even more errors (in may test) > > > > > then official 2.2.0a release. > > > > > Here is simplier version of nonworking compile of variables in > > > > > code memory. > > > > > Still don't know what does mean type of pointer 0x08? > > > > > 0x00 - internal > > > > > 0x01 -external Ram > > > > > 0x01 - code memory > > > > > 0x08 - ????? > > > > > > > > > > Mikee > > > > > > > > > > ------------------------------------------------------------------------ > > > > > #ifndef NULL > > > > > #define NULL (void*)0 > > > > > #endif > > > > > > > > > > typedef unsigned char logical; /* L - logical */ > > > > > typedef unsigned char byte; /* B - byte */ > > > > > typedef short int integer; /* I - integer */ > > > > > typedef unsigned short int natural; /* N - natural */ > > > > > typedef long vast; /* V - vast */ > > > > > typedef float real; /* R - real */ > > > > > > > > > > typedef struct /* TOP - table of the out.points*/ > > > > > { > > > > > unsigned itst; /* - index of the next stat. */ > > > > > unsigned point; /* - input point */ > > > > > } sTOP; > > > > > > > > > > typedef struct /* SPA - special parameters */ > > > > > { > > > > > unsigned ndi; /* - number of data inputs */ > > > > > unsigned ndo; /* - number of data outputs */ > > > > > unsigned * di_dim; /* - dimensions of DI arrays */ > > > > > unsigned * do_dim; /* - dimensions of DO arrays */ > > > > > unsigned * di_len; /* - length of data inputs */ > > > > > unsigned * do_len; /* - length of data outputs */ > > > > > unsigned * di_index; /* - indexes of data inputs */ > > > > > unsigned * do_index; /* - indexes of data outputs */ > > > > > } sSPA; > > > > > > > > > > typedef struct /* DTS - structure of the DT */ > > > > > { > > > > > int index; /* - index of the data type */ > > > > > unsigned dim; /* - dimensions of the array */ > > > > > } sDTS; > > > > > > > > > > typedef struct /* TST - table of the statements*/ > > > > > { > > > > > void (*pmodul)(void); /* - reference to module code */ > > > > > unsigned * ptpa; /* - table of the parameters */ > > > > > sSPA * pspa; /* - table of special param. */ > > > > > void ** ptpdi; /* - table of the data input */ > > > > > void * ptdo; /* - table of the data outputs*/ > > > > > sTOP * ptop; /* - table of the out. points */ > > > > > } sTST; > > > > > > > > > > ///////////////////////////////////////////////////////////////////////// > > > > > > > > > > typedef byte type_0; > > > > > typedef integer type_1; > > > > > typedef struct > > > > > { > > > > > type_1 s0; > > > > > type_1 s1; > > > > > type_1 s2; > > > > > } type_3; > > > > > typedef struct > > > > > { > > > > > type_0 s0; > > > > > type_3 s1; > > > > > type_3 s2; > > > > > } type_2; > > > > > sDTS const dt_struct_3[]={ > > > > > {1,0}, > > > > > {1,0}, > > > > > {1,0}, > > > > > {-1,0} > > > > > }; > > > > > sDTS const dt_struct_2[]={ > > > > > {0,0}, > > > > > {3,0}, > > > > > {3,0}, > > > > > {-1,0} > > > > > }; > > > > > sDTS * const dt_struct[]={ > > > > > NULL, > > > > > NULL, > > > > > dt_struct_2, > > > > > dt_struct_3 > > > > > }; > > > > > extern void Const(void) reentrant; > > > > > extern void DelProc(void) reentrant; > > > > > extern void PerProc(void) reentrant; > > > > > unsigned const tpa_0[]={1U}; > > > > > unsigned const tpa_1[]={1U,0U}; > > > > > unsigned const tpa_2[]={1U,0U,1U}; > > > > > type_2 const k_0[1] = {{16,{0,1,0},{0,0,0}}}; > > > > > type_1 const k_1 = {10}; > > > > > typedef struct { > > > > > type_1 o0[1]; > > > > > } type_tdo_3; > > > > > type_tdo_3 xdata tdo_3; > > > > > void * const tpdi_2[]={ > > > > > ((char*)&k_0)+0 > > > > > }; > > > > > void * const tpdi_3[]={ > > > > > ((char*)&k_1)+0 > > > > > }; > > > > > sTOP const top_2[]={ > > > > > {3, 1} > > > > > }; > > > > > sTOP const top_3[]={ > > > > > {1, 1} > > > > > }; > > > > > sTST const tst[]={ > > > > > {0,0,0,0,0,0}, > > > > > {DelProc,tpa_0,0,0,0,0}, // MyTest->Stat5:DelProc > > > > > {PerProc,tpa_1,0,tpdi_2,0,top_2}, // MyTest->Stat1:PerProc > > > > > {Const,tpa_2,0,tpdi_3,&tdo_3,top_3} // MyTest->Stat2:Const > > > > > }; > > > > > void sdcc_main(void) reentrant; > > > > > void dummy(void) { > > > > > DelProc(); > > > > > PerProc(); > > > > > Const(); > > > > > } > > > > > void main(void) { > > > > > sdcc_main(); > > > > > } > > > > > > > > -- > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Sandeep Dutta Phone: 650-356-5417 > > > > Diab-SDS Fax: 650-356-5490 > > > > 323 Vintage Park Drive Email: sa...@dd... > > > > Foster City, CA 94404 URL: www.ddi.com > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Sandeep Dutta Phone: 650-356-5417 > > Diab-SDS Fax: 650-356-5490 > > 323 Vintage Park Drive Email: sa...@dd... > > Foster City, CA 94404 URL: www.ddi.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > ------------------------------------------------------------------------ > Name: work.tgz > work.tgz Type: unspecified type (APPLICATION/octet-stream) > Encoding: BASE64 -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sandeep Dutta Phone: 650-356-5417 Diab-SDS Fax: 650-356-5490 323 Vintage Park Drive Email: sa...@dd... Foster City, CA 94404 URL: www.ddi.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |