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
01475329
Commit
01475329
authored
Apr 25, 2003
by
H.J. Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the new file.
From-SVN: r66079
parent
d3a0b002
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
gcc/testsuite/gcc.dg/ia64-sync-4.c
+21
-0
No files found.
gcc/testsuite/gcc.dg/ia64-sync-4.c
0 → 100644
View file @
01475329
/* { dg-do compile { target ia64-*-* } } */
/* { dg-options "-O2 -finline-functions" } */
/* Test inlining __sync_bool_compare_and_swap_di. */
#include <stdbool.h>
#include <ia64intrin.h>
static
bool
compare_and_swap
(
long
*
addr
,
long
old
,
long
new_val
)
{
return
__sync_bool_compare_and_swap_di
(
addr
,
old
,
new_val
);
}
void
foo
(
long
*
address
)
{
long
he_address
=
*
address
&
~
1
;
while
(
!
compare_and_swap
(
address
,
he_address
,
he_address
|
1
))
he_address
=
*
address
&
~
1
;
}
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