LCOV - code coverage report
Current view: top level - zephyr/arch/riscv - reg.h Hit Total Coverage
Test: new.info Lines: 0 3 0.0 %
Date: 2024-12-22 00:14:23

          Line data    Source code
       1           0 : /*
       2             :  * Copyright (c) 2024 Meta Platforms
       3             :  *
       4             :  * SPDX-License-Identifier: Apache-2.0
       5             :  */
       6             : 
       7             : #ifndef ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_
       8             : #define ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_
       9             : 
      10             : #include <zephyr/sys/util.h>
      11             : 
      12           0 : #define reg_read(reg)                                                                              \
      13             :         ({                                                                                         \
      14             :                 register unsigned long __rv;                                                       \
      15             :                 __asm__ volatile("mv %0, " STRINGIFY(reg) : "=r"(__rv));                           \
      16             :                 __rv;                                                                              \
      17             :         })
      18             : 
      19           0 : #define reg_write(reg, val) ({ __asm__("mv " STRINGIFY(reg) ", %0" : : "r"(val)); })
      20             : 
      21             : #endif /* ZEPHYR_INCLUDE_ZEPHYR_ARCH_RISCV_REG_H_ */

Generated by: LCOV version 1.14