This is the mail archive of the gcc-patches@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: PATCH: PR target/70738: Add -mgeneral-regs-only option


On 05/11/2016 11:02 AM, H.J. Lu wrote:
On Tue, May 10, 2016 at 1:02 PM, Sandra Loosemore
<sandra@codesourcery.com> wrote:

Again, this sounds like implementor-speak, and there are grammatical errors
(noun/verb disagreement, missing articles).  Do users of this attribute need
to know what instructions the compiler is emitting?  We already say above
that it causes GCC to generate suitable entry and exit sequences.


It was done on purpose since this document is also served as
the spec for compiler implementers.

But readers of the user documentation are users, not compiler implementors, so the patch for the manual needs to have a different focus.

Here is a patch to add
-mgeneral-regs-only option to x86 backend.   We can update
spec for interrupt handle to recommend compiling interrupt handler
with -mgeneral-regs-only option and add a note for compiler
implementers.

OK for trunk if there is no regression?

I can't comment on the code patch, but for the documentation part:

@@ -24242,6 +24242,12 @@ opcodes, to mitigate against certain forms of attack. At the moment,
 this option is limited in what it can do and should not be relied
 on to provide serious protection.

+@item -mgeneral-regs-only
+@opindex mgeneral-regs-only
+Generate code which uses only the general-purpose registers.  This will

s/which/that/

+prevent the compiler from using floating-point, vector, mask and bound

s/will prevent/prevents/

+registers, but will not impose any restrictions on the assembler.

Maybe you mean to say "does not restrict use of those registers in inline assembly code"? In any case, please get rid of the future tense here, too.

+
 @end table

 These @samp{-m} switches are supported in addition to the above

-Sandra


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