Checked RISC-V SMP assembly offsets at build time
This commit is contained in:
1 parent
cf9ac8b56f
commit
f3dc14193c
5 files changed
+24
-65
No files matched your search
@@ -54,6 +54,16 @@
|
||||
#ifndef TX_PORT_H
|
||||
#define TX_PORT_H
|
||||
|
||||
/* Assembly uses this byte displacement for atomic accesses to
|
||||
TX_THREAD.tx_thread_smp_core_control. Changes to ULONG, the control block,
|
||||
or thread and timer extensions can move the field. Recheck the layout with
|
||||
the target compiler when changing it. See tx_port_offset_check.c. */
|
||||
#if __riscv_xlen == 64
|
||||
#define TX_THREAD_SMP_LOCK_READY_BIT_OFFSET 280
|
||||
#else
|
||||
#define TX_THREAD_SMP_LOCK_READY_BIT_OFFSET 152
|
||||
#endif
|
||||
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
#if __riscv_xlen == 64
|
||||
@@ -64,7 +74,6 @@
|
||||
#define AMOSWAP_AQ amoswap.d.aq
|
||||
#define AMOSWAP_RL amoswap.d.rl
|
||||
#define LOG_REGBYTES 3
|
||||
#define TX_THREAD_SMP_LOCK_READY_BIT_OFFSET 312 // This changes if thread or timer internal extensions are used
|
||||
#else
|
||||
#define SLL32 sll
|
||||
#define STORE sw
|
||||
@@ -73,7 +82,6 @@
|
||||
#define AMOSWAP_AQ amoswap.w.aq
|
||||
#define AMOSWAP_RL amoswap.w.rl
|
||||
#define LOG_REGBYTES 2
|
||||
#define TX_THREAD_SMP_LOCK_READY_BIT_OFFSET 168 // This changes if thread or timer internal extensions are used
|
||||
#endif
|
||||
#define REGBYTES (1 << LOG_REGBYTES)
|
||||
|
||||
|
||||
Reference in new issue
Block a user