diff mbox

[testsuite,committed,PR65941] Add and use effective target rdrand

Message ID 1cd6eee1-55e9-7ee7-4d07-f813d9787a15@mentor.com
State New
Headers show

Commit Message

Tom de Vries May 22, 2017, 3:57 p.m. UTC
On 05/11/2017 04:44 PM, Rainer Orth wrote:
> Hi Tom,
> 
>> 2017-05-01  Tom de Vries  <tom@codesourcery.com>
>>
>> 	PR testsuite/65941
>> 	* lib/target-supports.exp (check_effective_target_rdrand): New proc.
> 
> the new effective-target keyword needs documenting in sourcebuild.texi.

Attached patch adds the missing documentation.

It looks like this in gccint.info:
...
7.2.3.10 Other hardware attributes
..................................

'avx'
      Target supports compiling 'avx' instructions.

<SNIP>

'divmod_simode'
      Target supporting hardware divmod insn or divmod libcall for
      SImode.

'rdrand'
      Target supports i386/x86-64 insn rdrand.
...

OK?

Thanks,
- Tom

Comments

Rainer Orth May 23, 2017, 8:48 a.m. UTC | #1
Hi Tom,

> On 05/11/2017 04:44 PM, Rainer Orth wrote:
>> Hi Tom,
>>
>>> 2017-05-01  Tom de Vries  <tom@codesourcery.com>
>>>
>>> 	PR testsuite/65941
>>> 	* lib/target-supports.exp (check_effective_target_rdrand): New proc.
>>
>> the new effective-target keyword needs documenting in sourcebuild.texi.
>
> Attached patch adds the missing documentation.

> 2017-05-22  Tom de Vries  <tom@codesourcery.com>
>
> 	* doc/sourcebuild.texi: Document rdrand effective target.

Please include the section, something like

	* doc/sourcebuild.texi (Effective-Target Keywords, Other
	hardware attributes): Document rdrand.

> diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
> index 84d9a22..dec9227 100644
> --- a/gcc/doc/sourcebuild.texi
> +++ b/gcc/doc/sourcebuild.texi
> @@ -1883,6 +1883,9 @@ Target supporting hardware divmod insn or divmod libcall.
>  @item divmod_simode
>  Target supporting hardware divmod insn or divmod libcall for SImode.
>  
> +@item rdrand
> +Target supports i386/x86-64 insn rdrand.

We use x86 for 32 and 64-bit x86, plus markup...

   Target supports x86 @code{rdrand} instruction.

Besides, please keep the list sorted alphabetically (the last three are
already random; please fix that while you're at it).

Ok with those nits fixed.

Thanks.
        Rainer
diff mbox

Patch

Document rdrand effective target

2017-05-22  Tom de Vries  <tom@codesourcery.com>

	* doc/sourcebuild.texi: Document rdrand effective target.

---
 gcc/doc/sourcebuild.texi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 84d9a22..dec9227 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1883,6 +1883,9 @@  Target supporting hardware divmod insn or divmod libcall.
 @item divmod_simode
 Target supporting hardware divmod insn or divmod libcall for SImode.
 
+@item rdrand
+Target supports i386/x86-64 insn rdrand.
+
 @end table
 
 @subsubsection Environment attributes