Thanks for the reply

My target (non gcc/private one) fails for long long testcases and
there are cases (with long long) which gets through, but not with the
right output. When i replace long long with long the testcases runs
fine, even those giving wrong output.
The target is not able to compile properly for simple statements like

long long a = 10;

So when i looked into the .md file i saw no patterns with DI machine
mode ,used for long long(am i right?), execpt

define_insn "adddi3"  and   define_insn "subdi3"

The .md file says that this is to prevent gcc from synthesising it,
though i didnt understand what that means.

Thats when i started to doubt if the backend provides support for long long.But
if what Rask is saying is true , which has to be i guess since you
guys are saying that,then middle end should take care of synthesizing
long long.
The 32 bit target has this defined in the .h file
LONG_TYPE_SIZE          32
LONG_LONG_TYPE_SIZE     64

Is there anything else thati should provide in the bach end to make
sure that rest of gcc
is synthesizing long long properly?

Any thoughts?



On 11/7/06, Rask Ingemann Lambertsen <[EMAIL PROTECTED]> wrote:
On Mon, Nov 06, 2006 at 10:52:00AM +0530, Mohamed Shafi wrote:
> Hello all,
>
> Looking at a .md file of a backend it there a way to know whether a
> target supports long long
> Should i look for patterns with machine mode DI?

   No. For example, 8-bit, 16-bit and 32-bit targets should normally not
define patterns such as anddi3, iordi3 and xordi3. It is possible that a
target could have no patterns with mode DI but still support long long,
although probably with significant slowdown. E.g. the middle end can
synthesize adddi3 and subdi3 from SImode operations, but I think most
targets can easily improve 10x in terms of speed and size on that code.

   Watch out for targets where units are larger than 8 bits. An example is
the c4x where a unit is 32-bits and HImode is 64-bits.

> Is there some other way?

   This depends a lot on exactly what you mean when you say support, but
grep for LONG_TYPE_SIZE and LONG_LONG_TYPE_SIZE in the .h file and compare
the two.

--
Rask Ingemann Lambertsen

Reply via email to