This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add option -mfence-as-lock-add=[no|yes]
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 25 Jan 2016 11:26:43 -0800
- Subject: Re: [PATCH] Add option -mfence-as-lock-add=[no|yes]
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3uagMp5t3fsDysXunTeMqc7xsLxD0h26heLkzzRO=YyUA at mail dot gmail dot com>
On Mon, Jan 25, 2016 at 10:50 AM, Andrew Senkevich
<andrew.n.senkevich@gmail.com> wrote:
> Hi,
>
> this patch adds -mfence-as-lock-add=[no|yes] option.
> With -mfence-as-lock-add=yes lfence, mfence and sfence will be encoded
> as lock addl $0x0, (%{r,e}sp).
>
> gas/
> * config/tc-i386.c (avoid_fence): New.
> (output_insn): Encode as lock addl $0x0, (%{r,e}sp) if avoid_fence is true.
> (OPTION_FENCE_AS_LOCK_ADD): New.
Please rename OPTION_FENCE_AS_LOCK_ADD to
OPTION_MFENCE_AS_LOCK_ADD.
> (md_longopts): Add -mfence-as-lock-add.
> (md_parse_option): Handle -mfence-as-lock-add.
> (md_show_usage): Add -mfence-as-lock-add=[no|yes].
> * doc/c-i386.texi (-mfence-as-lock-add): Document.
The doc change is wrong:
hjl@gnu-6 gas]$ make info
Making info in doc
make[1]: Entering directory
'/export/build/gnu/binutils/build-x86_64-linux/gas/doc'
restore=: && backupdir=".am$$" && \
rm -rf $backupdir && mkdir $backupdir && \
if (makeinfo --split-size=5000000 --split-size=5000000 --version)
>/dev/null 2>&1; then \
for f in as.info as.info-[0-9] as.info-[0-9][0-9] as.i[0-9]
as.i[0-9][0-9]; do \
if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
if makeinfo --split-size=5000000 --split-size=5000000 -I
"/export/gnu/import/git/sources/binutils-gdb/gas/doc" -I
"/export/gnu/import/git/sources/binutils-gdb/gas/../libiberty" -I
"/export/gnu/import/git/sources/binutils-gdb/gas/../bfd/doc" -I
../../bfd/doc -I /export/gnu/import/git/sources/binutils-gdb/gas/doc
\
-o as.info `test -f 'as.texinfo' || echo
'/export/gnu/import/git/sources/binutils-gdb/gas/doc/'`as.texinfo; \
then \
rc=0; \
else \
rc=$?; \
$restore $backupdir/* `echo "./as.info" | sed 's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
/export/gnu/import/git/sources/binutils-gdb/gas/doc/c-i386.texi:337: misplaced {
/export/gnu/import/git/sources/binutils-gdb/gas/doc/c-i386.texi:337: misplaced }
Makefile:400: recipe for target 'as.info' failed
make[1]: *** [as.info] Error 1
make[1]: Leaving directory
'/export/build/gnu/binutils/build-x86_64-linux/gas/doc'
Makefile:2211: recipe for target 'info-recursive' failed
make: *** [info-recursive] Error 1
[hjl@gnu-6 gas]$
> gas/testsuite/
>
> * gas/i386/i386.exp: Run new tests.
> * gas/i386/fence-as-lock-add.s: New.
> * gas/i386/fence-as-lock-add-yes.d: Likewise.
> * gas/i386/fence-as-lock-add-no.d: Likewise.
Need 64-bit testcase.
--
H.J.