Problem in Supporting Long Long Data Type.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

     I need to support long long data type for my target which is a RISC
architecture has resemblance with arm architecture.

     I tested following .c file :
**********  test.c  **********
int main()
{
	long long int i;
	i = 1234567890112334345;	
	return 0;
}
******************************

Arm produces following assembly for the same test file with a warning as
"integer constant is too large for ‘long’ type" :
**********  arm assembly  **********
.file   "test.c"
        .text
        .align  2
        .global main
        .type   main, %function
main:
        @ args = 0, pretend = 0, frame = 8
        @ frame_needed = 1, uses_anonymous_args = 0
        mov     ip, sp
        stmfd   sp!, {r4, fp, ip, lr, pc}
        sub     fp, ip, #4
        sub     sp, sp, #8
        adr     r3, .L3
        ldmia   r3, {r3-r4}
        str     r3, [fp, #-24]
        str     r4, [fp, #-20]
        mov     r3, #0
        mov     r0, r3
        sub     sp, fp, #16
        ldmfd   sp, {r4, fp, sp, pc}
.L4:
        .align  2
.L3:
        .word   2101332489
        .word   287445236
        .size   main, .-main
        .ident  "GCC: (GNU) 4.3.0"
******************************

But my problem is I am not getting the .L4 and .L3 part of the assembly in
my case where the number is divided into two different .word type.

My target assembly generates following instructions instead :

mov	r3,#2101332489
str	r3,[fp, #-20]
mov	r3,#287445236

I have written arm instructions only for the sake of understanding.

How can I get the above .L3 and .L4 created and generated in assembly file
of my target.

I need help in this regards and also, I may have missed some macros required
for it so please, let me know the required info.

Any help in this regard is appreciated.

Thanks in advance.

Cheers, 
Prashant.


-- 
View this message in context: http://old.nabble.com/Problem-in-Supporting-Long-Long-Data-Type.-tp27726775p27726775.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux