diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-20 10:08:39 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-06-21 15:54:18 +0200 |
commit | 9460333e9910471eda010423dcb493f758d997d4 (patch) | |
tree | d479396b21572626f835e0d78794a9811129661a /cpukit/score/cpu/sparc/sparc-counter-asm.S | |
parent | bsp/leon3: Fix LEON3_Cpu_Index initialization (diff) | |
download | rtems-9460333e9910471eda010423dcb493f758d997d4.tar.bz2 |
sparc: Rework CPU counter support
Rework CPU counter support to enable use of the GR740 up-counter via
%asr22 and %asr23.
Diffstat (limited to 'cpukit/score/cpu/sparc/sparc-counter-asm.S')
-rw-r--r-- | cpukit/score/cpu/sparc/sparc-counter-asm.S | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cpukit/score/cpu/sparc/sparc-counter-asm.S b/cpukit/score/cpu/sparc/sparc-counter-asm.S new file mode 100644 index 0000000000..8ed079f48b --- /dev/null +++ b/cpukit/score/cpu/sparc/sparc-counter-asm.S @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2016 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/asm.h> + + .section ".text" + .align 4 + + PUBLIC(_SPARC_Counter_read_address) +SYM(_SPARC_Counter_read_address): + sethi %hi(_SPARC_Counter + 8), %o0 + ld [%o0 + %lo(_SPARC_Counter + 8)], %o0 + jmp %o7 + 8 + ld [%o0], %o0 + + PUBLIC(_SPARC_Counter_read_asr23) +SYM(_SPARC_Counter_read_asr23): + jmp %o7 + 8 + mov %asr23, %o0 |