This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gprof and mips


Suzuki, RyosIII wrote:
> Hello,
> 
> I'm porting gprof to a mips system.
> I found a bug and have a request.
> 
> [BUG]
> the area, profile, is not initialized first.
> so I changed as following,
> 
> @@ -231,6 +231,7 @@
>          diag_printf("Can't allocate profile buffer - ignored\n");
>          return;
>      }
> +    memset(profile, 0, (num_buckets*2));
>      enabled = 1;
>      diag_printf("Profile from %p..%p[%p], in %d buckets of size %d\n",
>                  start_addr, end_addr, _end, num_buckets, bucket_size);

Good point. I've checked this in to CVS.

> [REQUEST]
> I changed mips's vectors.S to use SavedRegister as 3rd argument
> in ISR function. I  refered powerPC's vectors.S.
> 
>         lw      a1,0(a1)                        # Data pointer
> 
>         move    a0,s2                           # pass interrupt number
> +       move    a2,s0                           # s0 is SavedRegister. 
> by ryos
> 
>         jalr    t2                              # call ISR via t2
>         nop                                     # (delay slot)

PowerPC is indeed a precedent and it's harmless enough, so I've done this too.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]