REMOVE THIS EMAIL ADDRESS

----- Original Message ----- 
From: <mspgcc-users-requ...@lists.sourceforge.net>
To: <mspgcc-users@lists.sourceforge.net>
Sent: Wednesday, 27 October 2004 1:22
Subject: Mspgcc-users digest, Vol 1 #835 - 3 msgs


> Send Mspgcc-users mailing list submissions to
> mspgcc-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
> or, via email, send a message with subject or body 'help' to
> mspgcc-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
> mspgcc-users-ad...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Mspgcc-users digest..."
>
>
> Today's Topics:
>
>    1. Inline assembler pointer parameter (Dieter Teuchert)
>    2. HW multiplier issues. (Dmitry)
>    3. Re: Inline assembler pointer parameter (Dmitry)
>
> --__--__--
>
> Message: 1
> Date: Tue, 26 Oct 2004 17:09:17 +0200
> From: Dieter Teuchert <die...@cadt.de>
> To: mspgcc-users@lists.sourceforge.net
> Subject: [Mspgcc-users] Inline assembler pointer parameter
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Does anybody know how to insert a pointer into an inline assembler
sequence?
> The following works but loads registers R13..R15 with data not with
> pointers.
>
> void _reset_vector__(void) {
>
>     ...
>     // zero uninitialized RAM
>     asm( "                                                \n\
>     mov     %0,r15        ; load r15 with end of .text segment \n\
>     mov     %1,r14        ; load ram start                \n\
>     mov     %2,r13        ; end of data segment            \n\
>     cmp     r14,r13                                        \n\
>     jeq     Lend_of_data_loop                             \n\
> Lcopy_data_loop:                                          \n\
>     ; copy data from @r15 to @r14                        \n\
>     mov.b   @r15+,@r14    ; move one byte                    \n\
>     inc     r14                                            \n\
>     cmp     r13,r14        ; check if end of data reached    \n\
>     jlo     Lcopy_data_loop                                \n\
> Lend_of_data_loop:                                        \n\
>     "
>     :
>     : "m" (_etext), "m" (__data_start), "m" (_edata)
>     : "r13", "r14", "r15");
>
>     ...
>     }
>
> I tried the sequence   "i" (&_etext)  , but that is an error.
> Thanks in advance!
>
>
>
> --__--__--
>
> Message: 2
> From: Dmitry <di...@spec.ru>
> To: mspgcc-users@lists.sourceforge.net
> Date: Tue, 26 Oct 2004 22:13:28 +0400
> Subject: [Mspgcc-users] HW multiplier issues.
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Fellows,
> there were some issues regarding HW multiplier.
> Fixed.
> the fix applies to 3.2.X only. (gcc-3.3 in cvs)
>
> have fun
> ~d
>
>
> --__--__--
>
> Message: 3
> From: Dmitry <di...@spec.ru>
> To: mspgcc-users@lists.sourceforge.net
> Subject: Re: [Mspgcc-users] Inline assembler pointer parameter
> Date: Tue, 26 Oct 2004 22:27:40 +0400
> Reply-To: mspgcc-users@lists.sourceforge.net
>
> Do not pass _etext, _edata, etc. to asm() operands.
> Put them in asm code.
>
> The result assembly should look like
> mov #_etext,r15
>
> If you really want to put a pointer to _etext somewhere, just do the
> following:
>
> extern int _etext;
> int x;
>   x = &_etext;
>
> cheers,
> ~d
>
> On Tuesday 26 October 2004 19:09, Dieter Teuchert wrote:
> > Does anybody know how to insert a pointer into an inline assembler
> > sequence? The following works but loads registers R13..R15 with data not
> > with pointers.
> >
> > void _reset_vector__(void) {
> >
> >     ...
> >     // zero uninitialized RAM
> >     asm( "                                                \n\
> >     mov     %0,r15        ; load r15 with end of .text segment \n\
> >     mov     %1,r14        ; load ram start                \n\
> >     mov     %2,r13        ; end of data segment            \n\
> >     cmp     r14,r13                                        \n\
> >     jeq     Lend_of_data_loop                             \n\
> > Lcopy_data_loop:                                          \n\
> >     ; copy data from @r15 to @r14                        \n\
> >     mov.b   @r15+,@r14    ; move one byte                    \n\
> >     inc     r14                                            \n\
> >     cmp     r13,r14        ; check if end of data reached    \n\
> >     jlo     Lcopy_data_loop                                \n\
> > Lend_of_data_loop:                                        \n\
> >     "
> >
> >     : "m" (_etext), "m" (__data_start), "m" (_edata)
> >     : "r13", "r14", "r15");
> >
> >     ...
> >     }
> >
> > I tried the sequence   "i" (&_etext)  , but that is an error.
> > Thanks in advance!
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> > Use IT products in your business? Tell us what you think of them. Give
us
> > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out
more
> > http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > _______________________________________________
> > Mspgcc-users mailing list
> > Mspgcc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
>
> --__--__--
>
> _______________________________________________
> Mspgcc-users mailing list
> Mspgcc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
>
>
> End of Mspgcc-users Digest
>


Reply via email to