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

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

 



PICCA Frédéric-Emmanuel <frederic-emmanuel.picca@xxxxxxxxxxxxxxxxxxxxx>
writes:

> so I have written
>
> ALIGN8 short  _128mm[]  = { 128,128,128,128 };
>
>
>     ...
>     "movl      _128mm@GOTPCREL(%rip),%rax \n"
>     "psubw     mm2,(%rax)      \n"
>
>     "psubw     mm3,(%rax)      \n"
>     ...

Note that you're going to need to tell gcc that you're clobbering %rax,
as described in the extended asm documentation.

> but now I have this compilation error
>
> jpeg_color_mmx.cpp: In function ‘void jpeg_yh2v2_to_rgb32_mmx(unsigned char*, long int, unsigned char*)’:
> jpeg_color_mmx.cpp:474: error: invalid 'asm': operand number missing after %-letter
> jpeg_color_mmx.cpp:474: error: invalid 'asm': operand number missing after %-letter
> jpeg_color_mmx.cpp:474: error: invalid 'asm': operand number missing after %-letter
> jpeg_color_mmx.cpp:474: error: invalid 'asm': operand number missing after %-letter

Use %%rax.

Ian


[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