diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 18:59:17 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 18:59:17 +0100 |
commit | 42636b818a2f8e1b14917e6060fc149f39987299 (patch) | |
tree | 21916685c95707b6f387eed3cd74aab7b5734435 | |
parent | 0ec2016f80ffb5971362559b98b10744bb5bf893 (diff) | |
download | rpi-MMU-example-42636b818a2f8e1b14917e6060fc149f39987299.tar.gz rpi-MMU-example-42636b818a2f8e1b14917e6060fc149f39987299.zip |
add cpsr-writing function
-rw-r--r-- | psr.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -64,6 +64,12 @@ inline static PSR_t read_CPSR(void) return CPSR; } +inline static void write_CPSR(PSR_t CPSR) +{ + // set content of current program status register + asm("msr cpsr, %0" :: "r" (CPSR.raw) : "memory"); +} + inline static PSR_t read_SPSR(void) { PSR_t SPSR; |