Skip to content

Commit

Permalink
Merge pull request #2169 from pkubaj/develop
Browse files Browse the repository at this point in the history
Fix build on FreeBSD/powerpc64.
  • Loading branch information
martin-frbg committed Jun 25, 2019
2 parents 7faf42b + eebfeba commit 3b76189
Show file tree
Hide file tree
Showing 87 changed files with 193 additions and 193 deletions.
6 changes: 3 additions & 3 deletions common_power.h
Expand Up @@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint y){

#if defined(ASSEMBLER) && !defined(NEEDPARAM)

#ifdef OS_LINUX
#if defined(OS_LINUX) || defined(OS_FREEBSD)
#ifndef __64BIT__
#define PROLOGUE \
.section .text;\
Expand Down Expand Up @@ -784,7 +784,7 @@ Lmcount$lazy_ptr:

#define HALT mfspr r0, 1023

#ifdef OS_LINUX
#if defined(OS_LINUX) || defined(OS_FREEBSD)
#if defined(PPC440) || defined(PPC440FP2)
#undef MAX_CPU_NUMBER
#define MAX_CPU_NUMBER 1
Expand Down Expand Up @@ -829,7 +829,7 @@ Lmcount$lazy_ptr:
#define MAP_ANONYMOUS MAP_ANON
#endif

#ifdef OS_LINUX
#if defined(OS_LINUX) || defined(OS_FREEBSD)
#ifndef __64BIT__
#define FRAMESLOT(X) (((X) * 4) + 8)
#else
Expand Down
2 changes: 1 addition & 1 deletion kernel/power/axpy.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define N r3
#define X r6
Expand Down
2 changes: 1 addition & 1 deletion kernel/power/axpy_ppc440.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define N r3
#define X r6
Expand Down
6 changes: 3 additions & 3 deletions kernel/power/cgemm_kernel_8x4_power8.S
Expand Up @@ -97,7 +97,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -265,7 +265,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
stfs f2, ALPHA_I_SP
// stw r0, FZERO

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifdef __64BIT__
ld LDC, FRAMESLOT(0) + 0(FRAMEPOINTER)
#endif
Expand All @@ -286,7 +286,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif

#ifdef TRMMKERNEL
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(1) + 0(FRAMEPOINTER)
#endif

Expand Down
6 changes: 3 additions & 3 deletions kernel/power/ctrmm_kernel_8x4_power8.S
Expand Up @@ -98,7 +98,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -264,7 +264,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
stfs f2, ALPHA_I_SP
// stw r0, FZERO

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifdef __64BIT__
ld LDC, FRAMESLOT(0) + STACKSIZE(SP)
#endif
Expand All @@ -285,7 +285,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif

#ifdef TRMMKERNEL
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(1) + STACKSIZE(SP)
#endif

Expand Down
4 changes: 2 additions & 2 deletions kernel/power/dgemm_kernel_16x4_power8.S
Expand Up @@ -97,7 +97,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -271,7 +271,7 @@ li r11,0
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
4 changes: 2 additions & 2 deletions kernel/power/dtrmm_kernel_16x4_power8.S
Expand Up @@ -96,7 +96,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -269,7 +269,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
4 changes: 2 additions & 2 deletions kernel/power/dtrsm_kernel_LT_16x4_power8.S
Expand Up @@ -61,7 +61,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -217,7 +217,7 @@ li r11,0
#endif


#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
2 changes: 1 addition & 1 deletion kernel/power/gemm_beta.S
Expand Up @@ -62,7 +62,7 @@
stfd f31, 16(SP)
stw r0, 24(SP)

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
lwz LDC, FRAMESLOT(0) + STACKSIZE(SP)
#else
Expand Down
6 changes: 3 additions & 3 deletions kernel/power/gemm_kernel.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -186,7 +186,7 @@
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down Expand Up @@ -228,7 +228,7 @@

#else

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
mr PREA, r10
lwz PREB, FRAMESLOT(0) + STACKSIZE(SP)
Expand Down
2 changes: 1 addition & 1 deletion kernel/power/gemm_kernel_altivec.S
Expand Up @@ -58,7 +58,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down
2 changes: 1 addition & 1 deletion kernel/power/gemm_kernel_altivec_cell.S
Expand Up @@ -58,7 +58,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down
2 changes: 1 addition & 1 deletion kernel/power/gemm_kernel_altivec_g4.S
Expand Up @@ -58,7 +58,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down
6 changes: 3 additions & 3 deletions kernel/power/gemm_kernel_cell.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -192,7 +192,7 @@
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down Expand Up @@ -226,7 +226,7 @@
li PREC, 4 * SIZE
#endif

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
mr PREA, r10
lwz PREB, FRAMESLOT(0) + STACKSIZE(SP)
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemm_kernel_g4.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -184,7 +184,7 @@
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
2 changes: 1 addition & 1 deletion kernel/power/gemm_kernel_hummer.S
Expand Up @@ -46,7 +46,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#define A r6
#define B r7
#define C r8
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemm_kernel_power3.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -187,7 +187,7 @@
li PREC, 4 * SIZE
#else

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
mr PREA, r10
lwz PREB, FRAMESLOT(0) + STACKSIZE(SP)
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemm_kernel_power6.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -183,7 +183,7 @@
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemm_kernel_ppc440.S
Expand Up @@ -59,7 +59,7 @@
#define N r4
#define K r5

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define A r6
#define B r7
Expand Down Expand Up @@ -183,7 +183,7 @@
slwi LDC, LDC, BASE_SHIFT

#if defined(TRMMKERNEL)
#if defined(linux) && defined(__64BIT__)
#if (defined(linux) || defined(__FreeBSD__)) && defined(__64BIT__)
ld OFFSET, FRAMESLOT(0) + STACKSIZE(SP)
#endif

Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemv_n.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define M r3
#define N r4
Expand Down Expand Up @@ -252,7 +252,7 @@
stw r27, 196(SP)
#endif

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
lwz INCY, FRAMESLOT(0) + STACKSIZE(SP)
lwz BUFFER, FRAMESLOT(1) + STACKSIZE(SP)
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemv_n_ppc440.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define M r3
#define N r4
Expand Down Expand Up @@ -199,7 +199,7 @@
stw r23, 180(SP)
#endif

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
lwz INCY, FRAMESLOT(0) + STACKSIZE(SP)
lwz BUFFER, FRAMESLOT(1) + STACKSIZE(SP)
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemv_t.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define M r3
#define N r4
Expand Down Expand Up @@ -260,7 +260,7 @@
stw r29, 220(SP)
#endif

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
lwz INCY, FRAMESLOT(0) + STACKSIZE(SP)
lwz BUFFER, FRAMESLOT(1) + STACKSIZE(SP)
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/gemv_t_ppc440.S
Expand Up @@ -39,7 +39,7 @@
#define ASSEMBLER
#include "common.h"

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
#define M r3
#define N r4
Expand Down Expand Up @@ -190,7 +190,7 @@
stw r22, 192(SP)
#endif

#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
#ifndef __64BIT__
lwz INCY, FRAMESLOT(0) + STACKSIZE(SP)
lwz BUFFER, FRAMESLOT(1) + STACKSIZE(SP)
Expand Down

0 comments on commit 3b76189

Please sign in to comment.