This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: REÂ: problem of non-pic code due to asm code.


PICCA FrÃdÃric-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
writes:

>> Note that you're going to need to tell gcc that you're clobbering %rax,
>> as described in the extended asm documentation.
>
> ok so I added
> : : "rax"
>
>> Use %%rax.
>
> ok but...
>
> now
>
> jpeg_color_mmx.cpp: In function âvoid jpeg_yh2v2_to_rgb32_mmx(unsigned char*, long int, unsigned char*)â:
> jpeg_color_mmx.cpp:474: error: can't find a register in class âAREGâ while reloading âasmâ
> jpeg_color_mmx.cpp:474: error: âasmâ operand has impossible constraints
>
> so it seems that there is not enought register for this operation. I am right ?
>
> must I use another register or do a push rax ... pop rax to solve this problem

That's not the issue.  If you want a definite answer you need to show us
the real test case, ideally simplified, but from the above it looks like
you are missing a colon.  It looks like "rax" is in the output operand
list, not the clobber list.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]