Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15ec3997 authored by Simon Guo's avatar Simon Guo Committed by Michael Ellerman
Browse files

selftests/powerpc: Move shared headers into new include dir



There are some functions, especially register related, which can
be shared across multiple selftests/powerpc test directories.

This patch creates a new include directory to store those shared
files, so that the file layout becomes more neat.

Signed-off-by: default avatarSimon Guo <wei.guo.simon@gmail.com>
[mpe: Reworked to move the headers only]
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent efe71a67
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ ifeq ($(ARCH),powerpc)


GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")
GIT_VERSION = $(shell git describe --always --long --dirty || echo "unknown")


CFLAGS := -std=gnu99 -Wall -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR) $(CFLAGS)
CFLAGS := -std=gnu99 -Wall -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CURDIR)/include $(CFLAGS)


export CFLAGS
export CFLAGS


+1 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,7 @@
#ifdef __powerpc__
#ifdef __powerpc__
#include <altivec.h>
#include <altivec.h>
#endif
#endif
#include "../utils.h"
#include "utils.h"


static unsigned int timeout = 30;
static unsigned int timeout = 30;


+1 −1
Original line number Original line Diff line number Diff line
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdbool.h>


#include "../utils.h"
#include "utils.h"


#define MAX_LEN 8192
#define MAX_LEN 8192
#define MAX_OFFSET 16
#define MAX_OFFSET 16
+20 −17
Original line number Original line Diff line number Diff line
@@ -20,7 +20,8 @@
#define STACK_FRAME_MIN_SIZE 32
#define STACK_FRAME_MIN_SIZE 32
#define STACK_FRAME_TOC_POS  24
#define STACK_FRAME_TOC_POS  24
#define __STACK_FRAME_PARAM(_param)  (32 + ((_param)*8))
#define __STACK_FRAME_PARAM(_param)  (32 + ((_param)*8))
#define __STACK_FRAME_LOCAL(_num_params,_var_num)  ((STACK_FRAME_PARAM(_num_params)) + ((_var_num)*8))
#define __STACK_FRAME_LOCAL(_num_params, _var_num)  \
	((STACK_FRAME_PARAM(_num_params)) + ((_var_num)*8))
#else
#else
#define STACK_FRAME_MIN_SIZE 112
#define STACK_FRAME_MIN_SIZE 112
#define STACK_FRAME_TOC_POS  40
#define STACK_FRAME_TOC_POS  40
@@ -30,14 +31,16 @@
 * Caveat: if a function passed more than 8 doublewords, the caller will have
 * Caveat: if a function passed more than 8 doublewords, the caller will have
 * made more space... which would render the 112 incorrect.
 * made more space... which would render the 112 incorrect.
 */
 */
#define __STACK_FRAME_LOCAL(_num_params,_var_num)  (112 + ((_var_num)*8))
#define __STACK_FRAME_LOCAL(_num_params, _var_num)  \
	(112 + ((_var_num)*8))
#endif
#endif


/* Parameter x saved to the stack */
/* Parameter x saved to the stack */
#define STACK_FRAME_PARAM(var)    __STACK_FRAME_PARAM(var)
#define STACK_FRAME_PARAM(var)    __STACK_FRAME_PARAM(var)


/* Local variable x saved to the stack after x parameters */
/* Local variable x saved to the stack after x parameters */
#define STACK_FRAME_LOCAL(num_params,var)    __STACK_FRAME_LOCAL(num_params,var)
#define STACK_FRAME_LOCAL(num_params, var)    \
	__STACK_FRAME_LOCAL(num_params, var)
#define STACK_FRAME_LR_POS   16
#define STACK_FRAME_LR_POS   16
#define STACK_FRAME_CR_POS   8
#define STACK_FRAME_CR_POS   8


Loading