aboutsummaryrefslogtreecommitdiff
path: root/libitm/config/linux
diff options
context:
space:
mode:
authorTorvald Riegel <triegel@redhat.com>2013-08-30 10:33:41 +0000
committerTorvald Riegel <torvald@gcc.gnu.org>2013-08-30 10:33:41 +0000
commitbec9ec3fc1f24d55a37a6c90ac03dc60f87d4d72 (patch)
treec0b7c9260feea5365646627e5ddc4df6b74877de /libitm/config/linux
parent8595a07d8d161b4c612101171f3ad423689ec020 (diff)
downloadgcc-bec9ec3fc1f24d55a37a6c90ac03dc60f87d4d72.zip
gcc-bec9ec3fc1f24d55a37a6c90ac03dc60f87d4d72.tar.gz
gcc-bec9ec3fc1f24d55a37a6c90ac03dc60f87d4d72.tar.bz2
Add custom HTM fast path for RTM on x86_64.
* libitm_i.h (gtm_thread): Assign an asm name to serial_lock. (htm_fastpath): Assign an asm name. * libitm.h (_ITM_codeProperties): Add non-ABI flags used by custom HTM fast paths. (_ITM_actions): Likewise. * config/x86/target.h (HTM_CUSTOM_FASTPATH): Enable custom fastpath on x86_64. * config/x86/sjlj.S (_ITM_beginTransaction): Add custom HTM fast path. * config/posix/rwlock.h (gtm_rwlock): Update comments. Move summary field to the start of the structure. * config/linux/rwlock.h (gtm_rwlock): Update comments. * beginend.cc (gtm_thread::begin_transaction): Add retry policy handling for custom HTM fast paths. From-SVN: r202101
Diffstat (limited to 'libitm/config/linux')
-rw-r--r--libitm/config/linux/rwlock.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libitm/config/linux/rwlock.h b/libitm/config/linux/rwlock.h
index 428299f..c761edf 100644
--- a/libitm/config/linux/rwlock.h
+++ b/libitm/config/linux/rwlock.h
@@ -39,6 +39,11 @@ struct gtm_thread;
//
// In this implementation, writers are given highest priority access but
// read-to-write upgrades do not have a higher priority than writers.
+//
+// Do not change the layout of this class; it must remain a POD type with
+// standard layout, and the WRITERS field must be first (i.e., so the
+// assembler code can assume that its address is equal to the address of the
+// respective instance of the class).
class gtm_rwlock
{