diff --git a/port/threadx/src/tx_thread_stack_build.S b/port/threadx/src/tx_thread_stack_build.S index ec6f90b..2436d30 100644 --- a/port/threadx/src/tx_thread_stack_build.S +++ b/port/threadx/src/tx_thread_stack_build.S @@ -139,7 +139,7 @@ If floating point support: Stack Bottom: (higher memory address) */ LOAD t0, TX_THREAD_STACK_END_OFFSET(a0) // Pickup end of stack area - andi t0, t0, -4*REGBYTES // Ensure alignment (16-byte for RV32 & 32-byte for RV64) + andi t0, t0, -16 // Ensure 16-byte alignment /* Actually build the stack frame. */ diff --git a/port/threadx_smp/src/tx_thread_stack_build.S b/port/threadx_smp/src/tx_thread_stack_build.S index d11d2bf..bc6fc73 100644 --- a/port/threadx_smp/src/tx_thread_stack_build.S +++ b/port/threadx_smp/src/tx_thread_stack_build.S @@ -139,7 +139,7 @@ If floating point support: Stack Bottom: (higher memory address) */ LOAD t0, TX_THREAD_STACK_END_OFFSET(a0) // Pickup end of stack area - andi t0, t0, -4*REGBYTES // Ensure alignment (16-byte for RV32 & 32-byte for RV64) + andi t0, t0, -16 // Ensure 16-byte alignment /* Actually build the stack frame. */