Changeset 222 for soft


Ignore:
Timestamp:
Nov 12, 2012, 6:11:03 PM (12 years ago)
Author:
meunier
Message:

Correction du bug (unsigned long) -> (unsigned long long) : faisait l'hypothèse que unsigned long était 64 bits... (ne marchait pas sur 32 bits)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/xml/xml_parser.c

    r218 r222  
    12081208    {
    12091209#if XML_PARSER_DEBUG
    1210 printf("      name = %s\n", str);
     1210       printf("      name = %s\n", str);
    12111211#endif
    12121212        strncpy(coproc[coproc_index]->name, str, 31);
     
    20902090void def_int_write(int fdout, char* def, int num)
    20912091{
    2092     char  buf[64];
     2092    char buf[64];
    20932093    sprintf(buf, "#define\t %s  %d\n", def, num);
    20942094    file_write(fdout, buf);
     
    20982098void def_hex_write(int fdout, char* def, int num)
    20992099{
    2100     char  buf[64];
     2100    char buf[64];
    21012101    sprintf(buf, "#define\t %s  0x%x\n", def, num);
    21022102    file_write(fdout, buf);
     
    21152115    def_int_write(fdout, "CLUSTER_Y"       , cluster_y);
    21162116    def_int_write(fdout, "NB_CLUSTERS"     , cluster_index);
    2117     def_hex_write(fdout, "CLUSTER_SIZE"    , ( ((unsigned long)1) << 32)/cluster_index);
     2117    def_hex_write(fdout, "CLUSTER_SIZE"    , (((unsigned long long) 1) << 32) / cluster_index);
    21182118    def_int_write(fdout, "NB_PROCS_MAX"    , nb_proc_max);
    21192119    def_int_write(fdout, "NB_TIMERS_MAX"   , nb_timer_channel_max);
     
    21432143
    21442144///////////////////////////////////////
    2145 void  genLd( const char* file_path )
     2145void  genLd (const char * file_path)
    21462146///////////////////////////////////////
    21472147{
     
    21542154    ld_write(fdout, "seg_boot_code_base"           , boot_code_base);
    21552155    ld_write(fdout, "seg_boot_stack_base"          , boot_stack_base);
    2156     ld_write(fdout, "seg_mapping_base"        , boot_mapping_base );
     2156    ld_write(fdout, "seg_mapping_base"             , boot_mapping_base);
    21572157
    21582158    //kernel
    2159     ld_write(fdout, "\nseg_kernel_code_base"         , kernel_code_base);
     2159    ld_write(fdout, "\nseg_kernel_code_base"       , kernel_code_base);
    21602160    ld_write(fdout, "seg_kernel_data_base"         , kernel_data_base);
    21612161    ld_write(fdout, "seg_kernel_uncdata_base"      , kernel_uncdata_base);
     
    21632163
    21642164    //peripherals
    2165     ld_write(fdout, "\nseg_fbf_base" ,  fbf_base_offset);
    2166     ld_write(fdout, "seg_icu_base" ,  icu_base_offset);
    2167     ld_write(fdout, "seg_ioc_base" ,  ioc_base_offset);
    2168     ld_write(fdout, "seg_nic_base" ,  nic_base_offset);
    2169     ld_write(fdout, "seg_tty_base" ,  tty_base_offset);
    2170     ld_write(fdout, "seg_dma_base" ,  dma_base_offset);
    2171     ld_write(fdout, "seg_tim_base" ,  tim_base_offset);
    2172     ld_write(fdout, "seg_gcd_base" ,  gcd_base_offset);
    2173     ld_write(fdout, "seg_iob_base" ,  iob_base_offset);
     2165    ld_write(fdout, "\nseg_fbf_base",  fbf_base_offset);
     2166    ld_write(fdout, "seg_icu_base"  ,  icu_base_offset);
     2167    ld_write(fdout, "seg_ioc_base"  ,  ioc_base_offset);
     2168    ld_write(fdout, "seg_nic_base"  ,  nic_base_offset);
     2169    ld_write(fdout, "seg_tty_base"  ,  tty_base_offset);
     2170    ld_write(fdout, "seg_dma_base"  ,  dma_base_offset);
     2171    ld_write(fdout, "seg_tim_base"  ,  tim_base_offset);
     2172    ld_write(fdout, "seg_gcd_base"  ,  gcd_base_offset);
     2173    ld_write(fdout, "seg_iob_base"  ,  iob_base_offset);
    21742174
    21752175    close(fdout);
    21762176}
    21772177
    2178 char* buildPath(const char* path, const char*name)
    2179 {
    2180     char *res = calloc(strlen(path) + strlen(name) + 1, 1);
     2178char * buildPath(const char * path, const char * name)
     2179{
     2180    char * res = calloc(strlen(path) + strlen(name) + 1, 1);
    21812181    strcat(res, path);
    21822182    strcat(res, "/");
     
    21862186
    21872187/////////////////////////////////////
    2188 int  main ( int argc, char* argv[] )
     2188int  main(int argc, char * argv[])
    21892189/////////////////////////////////////
    21902190{
     
    22502250    return 0;
    22512251} // end main()
     2252
     2253
     2254
     2255
Note: See TracChangeset for help on using the changeset viewer.