This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: question about directive ".set"


On Mon, 2 Nov 2009, Jie Zhang wrote:

> > The manual as.pdf describe ".set" as ".set symbol , expression" but I
> 
> This is the generic use of .set.
> 
> > saw some real case in kernel like below:
> > 	__asm__ __volatile__ (
> > 		"	.set	noreorder				\n"
> > 		"	.align	3					\n"
> > 		"1:	bnez	%0, 1b					\n"
> > 		"	subu	%0, 1					\n"
> > 		"	.set	reorder					\n"
> > 		: "=r" (loops)
> > 		: "0" (loops));
> > What is ".set noreorder" and ".set reorder" mean?
> 
> This is the target specific use of .set. GAS of some targets can reorder
> instructions for optimization, like alpha and mips. These two directives are
> for control of whether or not do the instruction reordering.

 Some of these settings are documented in the "MIPS Dependent Features" 
section of the manual.  Regrettably, the list is not exhaustive -- anyone 
is welcome to update the manual; the reference available within the source 
code in gas/config/tc-mips.c should be good enough for a start.

  Maciej


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