Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13ac54d

Browse files
committed
Since HPUX now exists for Itanium, we should decouple the assumption
that OS=hpux is the same as CPU=hppa. First steps at doing this.With these patches, we still work on hppa with either gcc or HP's cc.We might work on hpux/itanium with gcc, but I can't test it. Definitelywill not work on hpux/itanium with non-gcc compiler, for lack of spinlockcode.
1 parent75619cf commit13ac54d

File tree

6 files changed

+37
-17
lines changed

6 files changed

+37
-17
lines changed

‎configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ PORTNAME=$template
14531453
# assembler code in src/include/storage/s_lock.h, so we just use
14541454
# a dummy file here.
14551455
case $host in
1456-
*-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
1456+
hppa*-*-hpux*) need_tas=yes; tas_file=hpux_hppa.s ;;
14571457
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
14581458
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
14591459
*) need_tas=no; tas_file=dummy.s ;;

‎configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.271 2003/08/0103:10:03 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.272 2003/08/0119:12:52 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -108,7 +108,7 @@ AC_SUBST(PORTNAME)
108108
# assembler code in src/include/storage/s_lock.h, so we just use
109109
# a dummy file here.
110110
case $host in
111-
*-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
111+
hppa*-*-hpux*) need_tas=yes; tas_file=hpux_hppa.s ;;
112112
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
113113
i?86-*-solaris*) need_tas=yes; tas_file=solaris_i386.s ;;
114114
*) need_tas=no; tas_file=dummy.s ;;

‎src/backend/port/hpux/tas.c.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/*
2+
* tas() for HPPA.
3+
*
24
* To generate tas.s using this template:
35
*1. cc +O2 -S -c tas.c
46
*2. edit tas.s:
57
*- replace the LDW with LDCWX
8+
*3. install as src/backend/port/tas/hpux_hppa.s.
9+
*
610
* For details about the LDCWX instruction, see the "Precision
711
* Architecture and Instruction Reference Manual" (09740-90014 of June
812
* 1987), p. 5-38.
File renamed without changes.

‎src/include/port/hpux.h

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
#defineHAS_TEST_AND_SET
2-
typedefstruct
3-
{
4-
intsema[4];
5-
}slock_t;
6-
71
#ifndefBIG_ENDIAN
82
#defineBIG_ENDIAN4321
93
#endif
@@ -13,7 +7,28 @@ typedef struct
137
#ifndefPDP_ENDIAN
148
#definePDP_ENDIAN3412
159
#endif
10+
11+
#if defined(__hppa)
12+
13+
#defineHAS_TEST_AND_SET
14+
typedefstruct
15+
{
16+
intsema[4];
17+
}slock_t;
18+
1619
#ifndefBYTE_ORDER
1720
#defineBYTE_ORDERBIG_ENDIAN
21+
#endif
22+
23+
#elif defined(__ia64)
24+
25+
#defineHAS_TEST_AND_SET
26+
typedefunsignedintslock_t;
27+
28+
#ifndefBYTE_ORDER
29+
#defineBYTE_ORDERLITTLE_ENDIAN
30+
#endif
1831

32+
#else
33+
#error unrecognized CPU type for HP-UX
1934
#endif

‎src/include/storage/s_lock.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
6464
* Portions Copyright (c) 1994, Regents of the University of California
6565
*
66-
* $Id: s_lock.h,v 1.110 2003/07/20 04:31:32 momjian Exp $
66+
* $Id: s_lock.h,v 1.111 2003/08/01 19:12:52 tgl Exp $
6767
*
6868
*-------------------------------------------------------------------------
6969
*/
@@ -114,7 +114,7 @@ tas(volatile slock_t *lock)
114114

115115

116116
/* Intel Itanium */
117-
#ifdef__ia64__
117+
#if defined(__ia64__)|| defined(__ia64)
118118
#defineTAS(lock) tas(lock)
119119

120120
static __inline__int
@@ -131,7 +131,7 @@ tas(volatile slock_t *lock)
131131
return (int)ret;
132132
}
133133

134-
#endif/* __ia64__ */
134+
#endif/* __ia64__|| __ia64*/
135135

136136

137137
#if defined(__arm__)|| defined(__arm__)
@@ -368,8 +368,9 @@ tas(volatile slock_t *s_lock)
368368

369369

370370
/*************************************************************************
371-
* These are the platforms that do not use inline assembler (and hence
372-
* have common code for gcc and non-gcc compilers, if both are available).
371+
* These are the platforms that have only one compiler, or do not use inline
372+
* assembler (and hence have common code for gcc and non-gcc compilers,
373+
* if both are available).
373374
*/
374375

375376

@@ -437,9 +438,9 @@ tas(volatile slock_t *lock)
437438
#endif/* __alpha */
438439

439440

440-
#if defined(__hpux)
441+
#if defined(__hppa)
441442
/*
442-
* HP-UX (PA-RISC)
443+
* HP'sPA-RISC
443444
*
444445
* Note that slock_t on PA-RISC is a structure instead of char
445446
* (see include/port/hpux.h).
@@ -459,7 +460,7 @@ tas(volatile slock_t *lock)
459460

460461
#defineS_LOCK_FREE(lock)( *(int *) (((long) (lock) + 15) & ~15) != 0)
461462

462-
#endif/*__hpux */
463+
#endif/*__hppa */
463464

464465
#if defined(__QNX__)&& defined(__WATCOMC__)
465466
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp