Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on FreeBSD/powerpc64. #2169

Merged
merged 1 commit into from
Jun 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common_power.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading