* Fwd: Regardig asm volatile query
[not found] <AANLkTinqdTeKz1psfbqx78CYKOu-oACnFHO74E5JAOx4@mail.gmail.com>
@ 2010-07-29 14:02 ` paladin tripathi
2010-07-29 23:41 ` Segher Boessenkool
0 siblings, 1 reply; 3+ messages in thread
From: paladin tripathi @ 2010-07-29 14:02 UTC (permalink / raw)
To: gcc-help, gcc-bugzilla
Hi All,
asm volatile (
"\n\t"
:
: "r" (pu8In4), "r" (s32PosInt), "r" (s16CoeffOrg), "r" (u32PosFrac),
"r" (u8Out), "r" (u32Step), "r" (u32TgtWidth)
: "r2", "r3", "r4", "r5", "r6", "r7", "r8
);
I have tested the above application with gcc-4.3 and gcc-4.2 toolchain:-
With gcc-4.2 we are able to compile the aboe code with –O1
#gcc-4.2 reg_org.c -O1
but getting the following error while compiling the code with gcc-4.3
#gcc-4.3 reg_org.c -O1
reg_org.c:12: error: can't find a register in class 'GENERAL_REGS'
while reloading 'asm'
reg_org.c:12: error: 'asm' operand has impossible constraints
I Want to know
1-> why compilation is happening with gcc-4.2 toolchian not with gcc-4.3
2-> what is the difference between gcc-4.2 and gcc4.3 related to asm volatile
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regardig asm volatile query
2010-07-29 14:02 ` Fwd: Regardig asm volatile query paladin tripathi
@ 2010-07-29 23:41 ` Segher Boessenkool
2010-07-30 7:08 ` Andrew Haley
0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2010-07-29 23:41 UTC (permalink / raw)
To: paladin tripathi; +Cc: GCC-help
> asm volatile (
> "\n\t"
> :
> : "r" (pu8In4), "r" (s32PosInt), "r" (s16CoeffOrg), "r" (u32PosFrac),
> "r" (u8Out), "r" (u32Step), "r" (u32TgtWidth)
> : "r2", "r3", "r4", "r5", "r6", "r7", "r8
> );
You have 7 inputs and 7 clobbers. Assuming this is ARM or some other
arch with about 16 regs, this is very much pushing the boundaries of
the possible.
> reg_org.c:12: error: can't find a register in class 'GENERAL_REGS'
> while reloading 'asm'
> reg_org.c:12: error: 'asm' operand has impossible constraints
>
> I Want to know
> 1-> why compilation is happening with gcc-4.2 toolchian not with
> gcc-4.3
You got lucky with 4.2, and you don't with 4.3 .
> 2-> what is the difference between gcc-4.2 and gcc4.3 related to
> asm volatile
Nothing really. The compiler sometimes needs a few registers to do
other
things, but you used up all of them.
Segher
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regardig asm volatile query
2010-07-29 23:41 ` Segher Boessenkool
@ 2010-07-30 7:08 ` Andrew Haley
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2010-07-30 7:08 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: paladin tripathi, GCC-help
On 07/29/2010 02:35 PM, Segher Boessenkool wrote:
>> asm volatile (
>> "\n\t"
>> :
>> : "r" (pu8In4), "r" (s32PosInt), "r" (s16CoeffOrg), "r" (u32PosFrac),
>> "r" (u8Out), "r" (u32Step), "r" (u32TgtWidth)
>> : "r2", "r3", "r4", "r5", "r6", "r7", "r8
>> );
>
> You have 7 inputs and 7 clobbers. Assuming this is ARM or some other
> arch with about 16 regs, this is very much pushing the boundaries of
> the possible.
>
>> reg_org.c:12: error: can't find a register in class 'GENERAL_REGS'
>> while reloading 'asm'
>> reg_org.c:12: error: 'asm' operand has impossible constraints
>>
>> I Want to know
>> 1-> why compilation is happening with gcc-4.2 toolchian not with gcc-4.3
>
> You got lucky with 4.2, and you don't with 4.3 .
>
>> 2-> what is the difference between gcc-4.2 and gcc4.3 related to asm
>> volatile
>
> Nothing really. The compiler sometimes needs a few registers to do other
> things, but you used up all of them.
That's right. If you look a bit more you will see that this is the same
question as http://gcc.gnu.org/ml/gcc-help/2010-07/msg00046.html
which I answered in the same way, but was ignored.
Perhaps they'll keep asking until they get an answer they like.
Andrew.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-29 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AANLkTinqdTeKz1psfbqx78CYKOu-oACnFHO74E5JAOx4@mail.gmail.com>
2010-07-29 14:02 ` Fwd: Regardig asm volatile query paladin tripathi
2010-07-29 23:41 ` Segher Boessenkool
2010-07-30 7:08 ` Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).