Questionn: mul functions for v850e
markku.pihlajamaa@luukku.com
markku.pihlajamaa@luukku.com
Tue Jun 4 23:21:00 GMT 2002
Perhaps you should write -mv850e instead of -Wa,-mv850e.
I have tried this (gcc version 2.96-xscale-010827)
and seen a mul instruction in the assembly list.
Markku
> -----Original Message-----
> From: unno-y@necat.nec.co.jp [mailto:unno-y@necat.nec.co.jp]
> Sent: Tuesday, June 04, 2002 10:09 AM
> To: crossgcc@sources.redhat.com
> Subject: Questionn: mul functions for v850e
>
>
> Hi, everybody,
>
> My target board has not v850 but v850e processor and
> I am compiling test code(mul.c) with cross GCC for target=v850-elf.
>
> My question are:
> 1) Does GNU 2.95.2 support v850e?
> I configured GCC with options below:
>
> configure --target=v850-elf --prefix=/proj/tools --with-gnu-as
> --with-gnu-ld
>
> 2) Why does not GCC generate muliply code sets?
> GCC generates __mulsi3 sub routine call.
>
> 3) Please show me how to generate multiply code sets for v850e!
>
> I atatched information for this issue.
>
> Thank you,
> Yoshinori Unno
>
>
> --------------
> o complie option
>
> v850-elf/bin/gcc -c -S -Wall -Wno-format -Wimplicit -Wparentheses \
> -Wunused -fconserve-space -fno-exceptions -fno-rtti -O2 \
> -fno-expensive-optimizations -mno-pro \
> log-function -gstabs3 -ffixed-r20 -ffixed-r21 -fpack-struct \
> -Wa,-mv850e mul.c
>
> --------------
> o source list(mul.c)
>
> int func(int b)
> {
> return~b;
> }
>
> int main()
> {
>
> int a= 3;
> int b= 4;
> int c;
>
> c= a * func(b);
> return c;
> }
>
> --------------
> o assembly list
>
> .file "mul.c"
> .section .text
> .Ltext0:
> .align 1
> .global _func
> .type _func,@function
> _func:
> .LM1:
> .LM2:
> not r6,r10
> jmp [r31]
> .Lfe1:
> .size _func,.Lfe1-_func
> .global ___mulsi3
> .align 1
> .stabs "main:F(0,1)",36,0,0,_main
> .global _main
> .type _main,@function
> _main:
> .LM3:
> .LM4:
> .LBB2:
> .LM5:
> addi -20,sp,sp
> st.w r31,16[sp]
> mov 4,r6
> jarl _func,r31
> mov 3,r6
> mov r10,r7
> jarl ___mulsi3,r31
> .LM6:
> ld.w 16[sp],r31
> addi 20,sp,sp
> jmp [r31]
> .LM7:
> .LBE2:
> .Lfe2:
> .size _main,.Lfe2-_main
> .text
> Letext:
> .ident "GCC: (GNU) 2.95.2 19991024 (release)"
>
>
> ------
> Want more information? See the CrossGCC FAQ,
http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-
unsubscribe@sources.redhat.com
>
............................................................
Maksuton sähköposti aina käytössä http://luukku.com
Kuukausimaksuton MTV3 Internet-liittymä www.mtv3.fi/liittyma
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list