[Ffmpeg-devel] [PATCH] '/nop' illegal for old versions of GAS

Nigel Pearson nigel
Wed Jul 26 05:10:31 CEST 2006


>> Changing the argument to either #nop or "nop" allows
>> compilation on Intel OS X/Darwin (which uses as 1.38).
>> The "nop" form is illegal on Linux GAS (e.g. 2.15).
>
> nop is not equivalent, the fact that you tried it scares me ...

	:-)


	The problem is that the current /nop seems illegal
by my reading of the manual, so I am guessing here.
(
http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_node/ 
as_271.html#SEC273
doesn't document '/', 'slash' or 'forward slash'
)


	gcc -E shows me that /nop is included literally:

         asm volatile(
# 702 "i386/simple_idct_mmx.c"
...
"pmaddwd %%mm6, %%mm1           \n\t" "/nop" ", %%mm4                
\n\t" "movq %%mm4, %%mm6              \n\t" "movq 48(%2), %%mm7          
     \n\t" "/nop" ", %%mm0               \n\t" "pmaddwd %%mm2, %%mm7      
       \n\t" "paddd %%mm5, %%mm4             \n\t"
...

so there is no C-macro strangeness going on.



	I was assuming that the intent of /nop was a comment.
I was trying a No-OP to investigate the alternative.

...
> heres what the gas manual says about lines starting with #
> ---
> To be compatible with past assemblers, lines that begin with `#'
> have a special interpretation.  Following the `#' should be an absolute
> expression (*note Expressions::): the logical line number of the _next_
> line.  Then a string (*note Strings: Strings.) is allowed: if present
> it is a new logical file name.  The rest of the line, if any, should be
> whitespace.

	Yes, but it goes on...

If the first non-whitespace characters on the line are not numeric, the  
line is ignored. (Just like a comment.)


	nop is is not a numeric expression, but to be
perfect, the line should be something like " # nop"?
Sadly, that requires re-writing of the macros.
Hence the comment about removing the rounder
lines from the macros.

--
Nigel Pearson, nigel at ind.tansu.com.au|"I thought I said no shivs."
Telstra Net. Eng., Sydney, Australia |   "This? This is just a
Office: 9202 3900    Fax:  9261 3912 | personal grooming appliance"
Mobile: 0408 664435  Home: 9792 6998 |    Riddick - Pitch Black




More information about the ffmpeg-devel mailing list