DSPRelated.com
Forums

How to convert __int64 (MSVC) to TI's syntax???

Started by Nguyen Pham Anh Khoa February 25, 2006
Hi everybody,

I'm Khoa. I'm working with C6713 board and Code Composer Studio V3.1.

I'd like to know how TI defines a 64bit integer ? (like __int64 in 
Microsoft Visual C)?
I hope that you can help me to solve that problem.

Thanks ,

Anh Khoa
	
 Try to use type "long long".  I am not sure if it is possible on
c6713, but
if so, then it is probably 64 bit.  You can check in the memory window to
see what size it is, or use sizeof() function.

Robert

> -----Original Message-----
> From: c6x@c6x@... [mailto:c6x@c6x@...] On 
> Behalf Of Nguyen Pham Anh Khoa
> Sent: Friday, February 24, 2006 11:01 PM
> To: c6x@c6x@...
> Subject: [c6x] How to convert __int64 (MSVC) to TI's syntax???
> 
> Hi everybody,
> 
> I'm Khoa. I'm working with C6713 board and Code Composer Studio
V3.1.
> 
> I'd like to know how TI defines a 64bit integer ? (like 
> __int64 in Microsoft Visual C)?
> I hope that you can help me to solve that problem.
> 
> Thanks ,
> 
> Anh Khoa
>
	
Equivalent of __int64 is long long in C6x.

Regards,
Venu.
	On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
>
> Hi everybody,
>
> I'm Khoa. I'm working with C6713 board and Code Composer Studio
V3.1.
>
> I'd like to know how TI defines a 64bit integer ? (like __int64 in
> Microsoft Visual C)?
> I hope that you can help me to solve that problem.
>
> Thanks ,
>
> Anh Khoa
>
	
hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <mvgkbhat@mvgk...> wrote:

> Equivalent of __int64 is long long in C6x.
> 
> Regards,
> Venu.
> 
> 
> On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> >
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
>
	__________________________________________________

	
The correct data type is as follows:

64 bit integers; long long and unsigned long long

64 bit floating point; double.

40-bit: long

This is consistent with Ansi-C.

Regds
JS

-----Original Message-----
From: c6x@c6x@... [mailto:c6x@c6x@...] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c6x@c6x@...
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <mvgkbhat@mvgk...> wrote:

> Equivalent of __int64 is long long in C6x.
> 
> Regards,
> Venu.
> 
> 
> On 2/25/06, Nguyen Pham Anh Khoa <npak243@npak...> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> >
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
>
	__________________________________________________

	
JS--
My understanding is that:
40- bit long is NOT consisten with any other compiler, let alone being ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data type size beyond 32 bit. Am I wrong here?
 
--Bhooshan


 
On 3/1/06, sankaran <s...@ti.com> wrote:
The correct data type is as follows:

64 bit integers; long long and unsigned long long

64 bit floating point; double.

40-bit: long

This is consistent with Ansi-C.

Regds
JS

-----Original Message-----
From: c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <m...@gmail.com> wrote:

> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.> On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> __________________________________________________




--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
        -- Michael Jordan
--------------------------------

Hi All,

    I just want to give explanation on this issue :

Please refer " spru198g.pdf  " section 2.2 on data types , its as follows -

The C6000 compiler defines a size for each data type (signed and unsigned):

* 

char 8 bits

* short 16 bits

* int 32 bits

* long 40 bits

*  float 32 bits

*  double 64 bits

ANSI C defines 64 bits as " __int64  " and there you don't have any data type corresponds to 40 bits.
 
 
 
Regards,
~ Anand.
 
----------------------------
Anand Pradhan,
Sr.MTS, ACG Group,
InterSolutions Pvt.Ltd.
Noida - 201301, U.P.,
India.
----------------------------
-----Original Message-----
From: c...@yahoogroups.com [mailto:c...@yahoogroups.com]On Behalf Of Bhooshan Iyer
Sent: Wednesday, March 01, 2006 4:48 PM
To: sankaran
Cc: b...@yahoo.com; mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

JS--
My understanding is that:
40- bit long is NOT consisten with any other compiler, let alone being ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data type size beyond 32 bit. Am I wrong here?
 
--Bhooshan


 
On 3/1/06, sankaran <s...@ti.com> wrote:
The correct data type is as follows:

64 bit integers; long long and unsigned long long

64 bit floating point; double.

40-bit: long

This is consistent with Ansi-C.

Regds
JS

-----Original Message-----
From: c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <m...@gmail.com> wrote:

> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.> On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com> wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> __________________________________________________




--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
        -- Michael Jordan
--------------------------------
From the combined C99 + TC1 + TC2 standard at
http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf the long
long types maximum value constant, ULLONG_MAX, is defined to be 2 ^ 64
- 1 which implies that the type must hold at least 64 bits of
information.

Also, I happen to use the unsigned long long type for a time value
from an NTP server which uses a 64-bit number to represent time and it
works fine on a DM642 with CCS 3.1.

Gregory Lee

On 3/1/06, Bhooshan Iyer <bhooshaniyer@bhoo...>
wrote:
>
> JS--
> My understanding is that:
> 40- bit long is NOT consisten with any other compiler, let alone being
> ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining
> data type size beyond 32 bit. Am I wrong here?
>
> --Bhooshan
>
>
>
>
> On 3/1/06, sankaran <sankaran@sank...> wrote:
> > The correct data type is as follows:
> >
> > 64 bit integers; long long and unsigned long long
> >
> > 64 bit floating point; double.
> >
> > 40-bit: long
> >
> > This is consistent with Ansi-C.
> >
> > Regds
> > JS
> >
> > -----Original Message-----
> > From: c6x@c6x@... [mailto: c6x@c6x@...] On Behalf Of venu
> > Sent: Tuesday, February 28, 2006 7:29 AM
> > To: mvgkbhat; Nguyen Pham Anh Khoa
> > Cc: c6x@c6x@...
> > Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's
syntax???
> >
> > hi,
> > as far as i remember, long will take 40 bit in C6x.
> > so, i doubt long long will be equivalent to 64bit.
> > instead double should serve the purpose.
> > please correct me guys if i understood wrongly.
> > regards,
> > venu
> >
> > --- mvgkbhat <mvgkbhat@mvgk...> wrote:
> >
> > > Equivalent of __int64 is long long in C6x.
> > >
> > > Regards,
> > > Venu.
> > >
> > >
> > > On 2/25/06, Nguyen Pham Anh Khoa < npak243@npak...> wrote:
> > > >
> > > > Hi everybody,
> > > >
> > > > I'm Khoa. I'm working with C6713 board and Code
Composer
> > > Studio V3.1.
> > > >
> > > > I'd like to know how TI defines a 64bit integer ? (like
> > > __int64 in
> > > > Microsoft Visual C)?
> > > > I hope that you can help me to solve that problem.
> > > >
> > > > Thanks ,
> > > >
> > > > Anh Khoa
> > > >
> > >
> > >
> > >
> > >
> > > 
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > 
> >
> >
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
>
>
>
> --
> -------------------------------
> "I've missed more than 9000 shots in my career.
> I've lost almost 300 games. 26 times I've been trusted to take
the game
> winning shot and missed.
> I've failed over and over again in my life.
> And that is why I succeed."
>         -- Michael Jordan
> --------------------------------
>
>
>  
>
>
>  
>
>  ________________________________
>
	--
Gregory Lee

I was not trying to say that ANSI-C says that long shall be 40-bits. All ANSI-C says is that the width of the data type long,

shall be greater than or equal to int, and from that perspective the 40-bit long is larger than 32-bit int, so it is consistent with ANSI-C.

 

Regds

JS

 

From: Bhooshan Iyer [mailto:b...@gmail.com]
Sent: Wednesday, March 01, 2006 5:18 AM
To: sankaran
Cc: b...@yahoo.com; mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

 

JS--

My understanding is that:

40- bit long is NOT consisten with any other compiler, let alone being ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data type size beyond 32 bit. Am I wrong here?

 

--Bhooshan



 

On 3/1/06, sankaran <s...@ti.com> wrote:

The correct data type is as follows:

64 bit integers; long long and unsigned long long

64 bit floating point; double.

40-bit: long

This is consistent with Ansi-C.

Regds
JS

-----Original Message-----
From: c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <m...@gmail.com> wrote:

> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu. > On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com>
wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> >


__________________________________________________




--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
        -- Michael Jordan
--------------------------------



OK. Thanks for clarifying. I have never read the standard thoroughly.
 
--Bhooshan

 
On 3/1/06, sankaran <s...@ti.com> wrote:

I was not trying to say that ANSI-C says that long shall be 40-bits. All ANSI-C says is that the width of the data type long,

shall be greater than or equal to int, and from that perspective the 40-bit long is larger than 32-bit int, so it is consistent with ANSI-C.

 

Regds

JS

 

From: Bhooshan Iyer [mailto: b...@gmail.com]
Sent: Wednesday, March 01, 2006 5:18 AM
To: sankaran
Cc: b...@yahoo.com ; mvgkbhat; Nguyen Pham Anh Khoa; c...@yahoogroups.com


Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

 

JS--

My understanding is that:

40- bit long is NOT consisten with any other compiler, let alone being ANSI-C compliant; In fact I dont think ANSI is in the habbit of defining data type size beyond 32 bit. Am I wrong here?

 

--Bhooshan



 

On 3/1/06, sankaran < s...@ti.com> wrote:

The correct data type is as follows:

64 bit integers; long long and unsigned long long

64 bit floating point; double.

40-bit: long

This is consistent with Ansi-C.

Regds
JS

-----Original Message-----
From: c...@yahoogroups.com [mailto: c...@yahoogroups.com] On Behalf Of venu
Sent: Tuesday, February 28, 2006 7:29 AM
To: mvgkbhat; Nguyen Pham Anh Khoa
Cc: c...@yahoogroups.com
Subject: Re: [c6x] How to convert __int64 (MSVC) to TI's syntax???

hi,
as far as i remember, long will take 40 bit in C6x.
so, i doubt long long will be equivalent to 64bit.
instead double should serve the purpose.
please correct me guys if i understood wrongly.
regards,
venu

--- mvgkbhat <m...@gmail.com> wrote:

> Equivalent of __int64 is long long in C6x.
>
> Regards,
> Venu.> On 2/25/06, Nguyen Pham Anh Khoa < n...@yahoo.com > wrote:
> >
> > Hi everybody,
> >
> > I'm Khoa. I'm working with C6713 board and Code Composer
> Studio V3.1.
> >
> > I'd like to know how TI defines a 64bit integer ? (like
> __int64 in
> > Microsoft Visual C)?
> > I hope that you can help me to solve that problem.
> >
> > Thanks ,
> >
> > Anh Khoa
> __________________________________________________
/" target="_blank


<*> To visit your group on the web, go to:
   http://groups.yahoo.com/group/c6x/

<*> To unsubscribe from this group, send an email to:
   c...@yahoogroups.com

<*> " target="_blank">http://docs.yahoo.com/info/terms/




--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
        -- Michael Jordan
--------------------------------




--
-------------------------------
"I've missed more than 9000 shots in my career.
I've lost almost 300 games. 26 times I've been trusted to take the game winning shot and missed.
I've failed over and over again in my life.
And that is why I succeed."
        -- Michael Jordan
--------------------------------