Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
8ee9fac2
Commit
8ee9fac2
authored
Nov 09, 2011
by
Richard Henderson
Committed by
Richard Henderson
Nov 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libitm: Avoid non-portable x86 branch prediction mnemonic.
From-SVN: r181233
parent
a5b3d713
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
libitm/ChangeLog
+3
-0
libitm/config/x86/cacheline.h
+5
-3
No files found.
libitm/ChangeLog
View file @
8ee9fac2
2011-11-09 Richard Henderson <rth@redhat.com>
* config/x86/cacheline.h (gtm_cacheline::store_mask): Use .byte
to emit branch prediction hint.
* config/x86/sjlj.S: Protect elf directives with __ELF__.
Protect .note.GNU-stack with __linux__.
...
...
libitm/config/x86/cacheline.h
View file @
8ee9fac2
...
...
@@ -144,7 +144,7 @@ gtm_cacheline::operator= (const gtm_cacheline & __restrict s)
}
#endif
//
???
Support masked integer stores more efficiently with an unlocked cmpxchg
// Support masked integer stores more efficiently with an unlocked cmpxchg
// insn. My reasoning is that while we write to locations that we do not wish
// to modify, we do it in an uninterruptable insn, and so we either truely
// write back the original data or the insn fails -- unlike with a
...
...
@@ -171,7 +171,8 @@ gtm_cacheline::store_mask (uint32_t *d, uint32_t s, uint8_t m)
"and %[m], %[n]
\n\t
"
"or %[s], %[n]
\n\t
"
"cmpxchg %[n], %[d]
\n\t
"
"jnz,pn 0b"
".byte 0x2e
\n\t
"
// predict not-taken, aka jnz,pn
"jnz 0b"
:
[
d
]
"+m"
(
*
d
),
[
n
]
"=&r"
(
n
),
[
o
]
"+a"
(
o
)
:
[
s
]
"r"
(
s
&
bm
),
[
m
]
"r"
(
~
bm
));
}
...
...
@@ -198,7 +199,8 @@ gtm_cacheline::store_mask (uint64_t *d, uint64_t s, uint8_t m)
"and %[m], %[n]
\n\t
"
"or %[s], %[n]
\n\t
"
"cmpxchg %[n], %[d]
\n\t
"
"jnz,pn 0b"
".byte 0x2e
\n\t
"
// predict not-taken, aka jnz,pn
"jnz 0b"
:
[
d
]
"+m"
(
*
d
),
[
n
]
"=&r"
(
n
),
[
o
]
"+a"
(
o
)
:
[
s
]
"r"
(
s
&
bm
),
[
m
]
"r"
(
~
bm
));
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment