Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions verifier/atomic/osh_atomic_tc7.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ static int test_item2(void);
static int test_item3(void);


/* workaround for armcc compiler - disable optimization */
#if defined __ARM_ARCH
# define NOOPTIMIZE __attribute__((optnone))
#else
# define NOOPTIMIZE
#endif

#define TYPE_VALUE int
#define FUNC_VALUE shmem_int_cswap
#define DEFAULT_VALUE (-1)
Expand Down Expand Up @@ -74,7 +81,7 @@ int osh_atomic_tc7(const TE_NODE *node, int argc, const char *argv[])
/****************************************************************************
* Place for Test Item functions
***************************************************************************/
static int test_item1(void)
static NOOPTIMIZE int test_item1(void)
{
int rc = TC_PASS;
TYPE_VALUE* shmem_addr = NULL;
Expand Down Expand Up @@ -131,7 +138,7 @@ static int test_item1(void)
}


static int test_item2(void)
static NOOPTIMIZE int test_item2(void)
{
int rc = TC_PASS;
TYPE_VALUE* shmem_addr = NULL;
Expand Down Expand Up @@ -199,7 +206,7 @@ static int test_item2(void)
}


static int test_item3(void)
static NOOPTIMIZE int test_item3(void)
{
int rc = TC_PASS;
static TYPE_VALUE shmem_value = 0;
Expand Down