Skip to content

Commit

Permalink
towards architectural neutrality
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Osmialowski <[email protected]>
  • Loading branch information
pawosm-arm committed Aug 31, 2018
1 parent 2ceef5a commit ec81fee
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 35 deletions.
3 changes: 3 additions & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ if( ${TARGET_ARCHITECTURE} STREQUAL "x86_64" )
add_definitions(
-DTARGET_X8664
-DTARGET_LINUX_X8664
-DTARGET_64
)
elseif( ${TARGET_ARCHITECTURE} STREQUAL "aarch64" )
add_definitions(
-DTARGET_LLVM_ARM64
-DTARGET_LINUX_ARM
-DTARGET_64
)
elseif( ${TARGET_ARCHITECTURE} STREQUAL "ppc64le" )
add_definitions(
-DTARGET_LINUX_POWER
-DLINUX_POWER
-DTARGET_64
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/gather_cmplx16.F95
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

subroutine ftn_gather_cmplx16( ta, a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/gather_cmplx8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

subroutine ftn_gather_cmplx8( ta, a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/gather_real4.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_gather_real4( a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/gather_real8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_gather_real8( a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/iso_c_bind.F95
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module ISO_C_BINDING
interface operator (.ne.)
module procedure compare_ne_cfunptrs
end interface
#if defined TARGET_LINUX_X8664 || defined TARGET_LLVM_64
#if defined TARGET_64 || defined TARGET_LLVM_64
! added this to make the data-initializd module common block be at 32 bytes long
! maybe only needed for linux86-64
integer*8 :: __iso_bind_private_i = 11, __iso_bind_private_j = 23
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/mvmul_cmplx16.F95
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

subroutine ftn_mvmul_cmplx16( ta, tb, m, k, alpha, a, lda, b, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: m, k, lda
#else
integer :: m, k, lda
Expand All @@ -30,7 +30,7 @@ subroutine ftn_mvmul_cmplx16( ta, tb, m, k, alpha, a, lda, b, beta, c )
integer :: ta, tb
! Local variables

#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/mvmul_cmplx8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

subroutine ftn_mvmul_cmplx8( ta, tb, m, k, alpha, a, lda, b, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: m, k, lda
#else
integer :: m, k, lda
Expand All @@ -30,7 +30,7 @@ subroutine ftn_mvmul_cmplx8( ta, tb, m, k, alpha, a, lda, b, beta, c )
integer :: ta, tb
! Local variables

#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/mvmul_real4.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_mvmul_real4( ta, m, k, alpha, a, lda, b, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: m, k, lda
#else
integer :: m, k, lda
Expand All @@ -31,7 +31,7 @@ subroutine ftn_mvmul_real4( ta, m, k, alpha, a, lda, b, beta, c )
integer :: ta
! Local variables

#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/mvmul_real8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_mvmul_real8( ta, m, k, alpha, a, lda, b, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: m, k, lda
#else
integer :: m, k, lda
Expand All @@ -31,7 +31,7 @@ subroutine ftn_mvmul_real8( ta, m, k, alpha, a, lda, b, beta, c )
integer :: ta
! Local variables

#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/transpose_cmplx16.F95
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

subroutine ftn_transpose_cmplx16( ta, a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/transpose_cmplx8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

subroutine ftn_transpose_cmplx8( ta, a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/transpose_real4.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_transpose_real4( a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
2 changes: 1 addition & 1 deletion runtime/flang/transpose_real8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_transpose_real8( a, lda, alpha, buffer, bufrows, bufcols )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 lda
#else
integer lda
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/vmmul_cmplx16.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_vmmul_cmplx16( ta, tb, n, k, alpha, a, b, ldb, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: n, k, ldb
#else
integer :: n, k, ldb
Expand All @@ -31,7 +31,7 @@ subroutine ftn_vmmul_cmplx16( ta, tb, n, k, alpha, a, b, ldb, beta, c )
complex*16 :: alpha, beta

! local variables
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/vmmul_cmplx8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_vmmul_cmplx8( ta, tb, n, k, alpha, a, b, ldb, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: n, k, ldb
#else
integer :: n, k, ldb
Expand All @@ -31,7 +31,7 @@ subroutine ftn_vmmul_cmplx8( ta, tb, n, k, alpha, a, b, ldb, beta, c )
complex*8 :: alpha, beta

! local variables
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/vmmul_real4.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_vmmul_real4( tb, n, k, alpha, a, b, ldb, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: n, k, ldb
#else
integer :: n, k, ldb
Expand All @@ -31,7 +31,7 @@ subroutine ftn_vmmul_real4( tb, n, k, alpha, a, b, ldb, beta, c )
real*4 :: alpha, beta

! local variables
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
4 changes: 2 additions & 2 deletions runtime/flang/vmmul_real8.F95
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

subroutine ftn_vmmul_real8( tb, n, k, alpha, a, b, ldb, beta, c )
implicit none
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: n, k, ldb
#else
integer :: n, k, ldb
Expand All @@ -31,7 +31,7 @@ subroutine ftn_vmmul_real8( tb, n, k, alpha, a, b, ldb, beta, c )
real*8 :: alpha, beta

! local variables
#ifdef TARGET_X8664
#ifdef TARGET_64
integer*8 :: i, j, kk
#else
integer :: i, j, kk
Expand Down
2 changes: 1 addition & 1 deletion runtime/include/komp.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ typedef void ident_t;

typedef int kmp_int32;
typedef long long kmp_int64;
#if defined(TARGET_X8632) || defined(TARGET_LINUX_ARM32)
#if defined(TARGET_32)
typedef int kmp_critical_name[8]; /* must be 32 bytes */
#else
typedef long kmp_critical_name[4]; /* must be 32 bytes and 8-byte aligned */
Expand Down
9 changes: 2 additions & 7 deletions tools/flang1/flang1exe/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ static INT xtimes[_N_WHO];
static LOGICAL postprocessing = TRUE;

/* Feature names for Fortran front-end */
#if defined(TARGET_LINUX_X8664)
static char *feature = "flang";
static char *os = "lin";
static char *accel = NULL;
#elif defined(TARGET_WIN_X8664)
#if defined(TARGET_WIN_X8664)
static char *feature2 = "pgi-f95-win64";
static char *feature = "pgfortran";
static char *os = "win";
Expand All @@ -119,8 +115,7 @@ static char *feature = "pgfortran";
static char *os = "lin";
static char *accel = NULL;
#else
static char *feature2 = "pgi-f95";
static char *feature = "pgfortran";
static char *feature = "flang";
static char *os = "lin";
static char *accel = NULL;
#endif
Expand Down
3 changes: 1 addition & 2 deletions tools/flang2/utils/ilitp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ target_compile_definitions(ilitp
PRIVATE
ILITP_UTIL
PGF90=1
TARGET_X86
TARGET_X8664
TARGET_64
)

target_include_directories(ilitp
Expand Down

0 comments on commit ec81fee

Please sign in to comment.