xref: /aosp_15_r20/external/coreboot/src/drivers/intel/fsp1_1/include/fsp/stack.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _COMMON_STACK_H_
4 #define _COMMON_STACK_H_
5 
6 #include <stdint.h>
7 
stack_push32(void * stack,uint32_t value)8 static inline void *stack_push32(void *stack, uint32_t value)
9 {
10 	uint32_t *stack32 = stack;
11 
12 	stack32 = &stack32[-1];
13 	*stack32 = value;
14 	return stack32;
15 }
16 
17 #endif /* _COMMON_STACK_H_ */
18