Changeset 3a646426 in rtems for testsuites
- Timestamp:
- 07/19/18 10:53:34 (6 years ago)
- Branches:
- 5, master
- Children:
- 61c51db
- Parents:
- b74353e
- git-author:
- Sebastian Huber <sebastian.huber@…> (07/19/18 10:53:34)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (07/23/18 12:14:04)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/sptests/spfatal26/init.c
rb74353e r3a646426 1 1 /* 2 * Copyright (c) 2012 embedded brains GmbH. All rights reserved.2 * Copyright (c) 2012, 2018 embedded brains GmbH. All rights reserved. 3 3 * 4 4 * embedded brains GmbH 5 * Obere Lagerstr. 305 * Dornierstr. 4 6 6 * 82178 Puchheim 7 7 * Germany … … 17 17 #endif 18 18 19 #include "tmacros.h" 19 #include <rtems.h> 20 #include <rtems/score/cpuimpl.h> 20 21 21 #include <limits.h> 22 23 #include <rtems.h> 22 #include <tmacros.h> 24 23 25 24 const char rtems_test_name[] = "SPFATAL 26"; 26 27 static void provoke_aligment_or_data_access_exception( void )28 {29 uintptr_t one = 1;30 int i = sizeof(void *) * CHAR_BIT;31 uintptr_t n = 1;32 uintptr_t base = 0;33 uintptr_t inc;34 35 *(volatile uint64_t *) base;36 37 do {38 int j;39 40 --i;41 base = one << i;42 inc = base << 1;43 44 for (j = 0; j < n; ++j, base += inc) {45 *(volatile uint64_t *) base;46 }47 48 n <<= 1;49 } while (i > 0);50 }51 25 52 26 static void Init( rtems_task_argument arg ) 53 27 { 54 28 TEST_BEGIN(); 55 56 provoke_aligment_or_data_access_exception(); 57 29 _CPU_Instruction_illegal(); 58 30 rtems_test_assert( 0 ); 59 31 }
Note: See TracChangeset
for help on using the changeset viewer.