summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spfatal26/init.c40
1 files changed, 6 insertions, 34 deletions
diff --git a/testsuites/sptests/spfatal26/init.c b/testsuites/sptests/spfatal26/init.c
index 1848659d6a..a77c62a841 100644
--- a/testsuites/sptests/spfatal26/init.c
+++ b/testsuites/sptests/spfatal26/init.c
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
@@ -16,45 +16,17 @@
#include "config.h"
#endif
-#include "tmacros.h"
-
-#include <limits.h>
-
#include <rtems.h>
+#include <rtems/score/cpuimpl.h>
-const char rtems_test_name[] = "SPFATAL 26";
-
-static void provoke_aligment_or_data_access_exception( void )
-{
- uintptr_t one = 1;
- int i = sizeof(void *) * CHAR_BIT;
- uintptr_t n = 1;
- uintptr_t base = 0;
- uintptr_t inc;
-
- *(volatile uint64_t *) base;
-
- do {
- int j;
+#include <tmacros.h>
- --i;
- base = one << i;
- inc = base << 1;
-
- for (j = 0; j < n; ++j, base += inc) {
- *(volatile uint64_t *) base;
- }
-
- n <<= 1;
- } while (i > 0);
-}
+const char rtems_test_name[] = "SPFATAL 26";
static void Init( rtems_task_argument arg )
{
TEST_BEGIN();
-
- provoke_aligment_or_data_access_exception();
-
+ _CPU_Instruction_illegal();
rtems_test_assert( 0 );
}