Re: [RFD] Using the 'memory constraint' trick to avoid memory clobber doesn't work

2014-11-13 Thread dw
nts to describe what they are testing. So, I found a few tests that were *using* this feature. But they seem to be checking for an ICE or page fault, rather than checking to see if the generated code was avoiding the memory clobber. dw

Need a copyright assignment and a copyright disclaimer form

2013-04-24 Thread dw
I am attempting to submit a patch for the gcc documentation (see http://gcc.gnu.org/ml/gcc-help/2013-04/msg00193.html). I am told that I need to submit one of these two forms. Please send me copies so I can select one and submit it. dw

Re: [doc] Fixing reference inside Extended-Asm.html

2013-11-22 Thread dw
/gcc/Using-Assembly-Language-with-C.html) and I haven't had a problem generating output. dw

Re: Request for discussion: Rewrite of inline assembler docs

2014-02-27 Thread dw
to be improved. dw has done a fairly thorough reworking of the documentation. I've helped a bit. Section 6.41 of the GCC manual has been rewritten. It has become: 6.41 How to Use Inline Assembly Language in C Code 6.41.1 Basic Asm - Assembler Instructions with No Operands 6.41.2 Exte

Re: Request for discussion: Rewrite of inline assembler docs

2014-02-27 Thread dw
On 2/27/2014 9:35 AM, Andi Kleen wrote: Andrew Haley writes: Over the years there has been a great deal of traffic on these lists caused by misunderstandings of GCC's inline assembler. That's partly because it's inherently tricky, but the existing documentation needs to b

Re: Request for discussion: Rewrite of inline assembler docs

2014-02-27 Thread dw
tation needs to be improved. dw has done a fairly thorough reworking of the documentation. I've helped a bit. Section 6.41 of the GCC manual has been rewritten. It has become: 6.41 How to Use Inline Assembly Language in C Code 6.41.1 Basic Asm - Assembler Instructions with No Operands

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-03 Thread dw
On 2/27/2014 8:12 PM, Andi Kleen wrote: dw writes: What would you say to something like this: "Since GCC does not parse the asm, it has no visibility of any static variables or functions it references. This may result in those symbols getting discarded by GCC as unused. To avoid

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-05 Thread dw
On 3/3/2014 3:36 AM, Richard Sandiford wrote: dw writes: On 2/27/2014 11:32 PM, Richard Sandiford wrote: dw writes: On 2/27/2014 4:11 AM, Richard Sandiford wrote: Andrew Haley writes: Over the years there has been a great deal of traffic on these lists caused by misunderstandings of

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-22 Thread dw
tricky, but the existing documentation needs to be improved. dw has done a fairly thorough reworking of the documentation. I've helped a bit. Section 6.41 of the GCC manual has been rewritten. It has become: 6.41 How to Use Inline Assembly Language in C Code 6.41.1 Basic Asm - Assembler Instructi

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-24 Thread dw
g the '&' constraint with the register constraint prevents this overlap and resolves the inconsistency." That's as clear as I can come up with. Better? dw

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-26 Thread dw
On 3/25/2014 4:20 AM, Richard Sandiford wrote: dw writes: asm ("" : "=m" (*x), "=r" (y)); you have to assume that the address in %0 might use the same register as %1 Ok, now I'm getting there. It helps that I've compiled some examples and can se

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-26 Thread dw
/Using-Assembly-Language-with-C.html) if you want to look at how it turned out. Unless you have something else, I'm going to start composing the email for gcc-patches. Thanks for the help. dw

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-27 Thread dw
Looks great to me. Just noticed one small nit: in the extended asm section, "=irm" isn't valid, since you can't assign to an immediate. Doh! I probably copied this from the Input section. Good catch. Also, in the section about clobbers: It causes the compiler to flush all registers to

Re: Request for discussion: Rewrite of inline assembler docs

2014-03-30 Thread dw
stop that, you need processor-specific fence instructions. Objections? dw

Re: Request for discussion: Rewrite of inline assembler docs

2014-04-01 Thread dw
On 3/31/2014 1:41 AM, Andrew Haley wrote: On 03/31/2014 05:44 AM, dw wrote: So, after looking over this discussion, I have updated the text. This time no undefined terms, while still conveying all the points I had in mind: The "memory" clobber tells the compiler that the ass