Commit b9268e55 by Tristan Gingold Committed by Tristan Gingold

vms.c (VMS_CRTL_FLOAT32): Rename.

2012-03-30  Tristan Gingold  <gingold@adacore.com>

	* config/vms/vms.c (VMS_CRTL_FLOAT32): Rename.
	(VMS_CRTL_FLOAT64, VMS_CRTL_FLOAT64_VAXD): New.
	(VMS_CRTL_FLOAT128, VMS_CRTL_DPML, VMS_CRTL_NODMPL)
	(VMS_CRTL_32ONLY, VMS_CRTL_G_MASK, VMS_CRTL_G_NONE)
	(VMS_CRTL_GA, VMS_CRTL_GL, VMS_CRTL_FLOATV2): New.
	(vms_patch_builtins): Handle new flags
	* config/vms/vms-crtlmap.map: Completed using nm on
	c and math system libraries.
	* config/vms/make-crtlmap.awk: Handle any number of flags.

From-SVN: r185993
parent 50f671c6
2012-03-30 Tristan Gingold <gingold@adacore.com>
* config/vms/vms.c (VMS_CRTL_FLOAT32): Rename.
(VMS_CRTL_FLOAT64, VMS_CRTL_FLOAT64_VAXD): New.
(VMS_CRTL_FLOAT128, VMS_CRTL_DPML, VMS_CRTL_NODMPL)
(VMS_CRTL_32ONLY, VMS_CRTL_G_MASK, VMS_CRTL_G_NONE)
(VMS_CRTL_GA, VMS_CRTL_GL, VMS_CRTL_FLOATV2): New.
(vms_patch_builtins): Handle new flags
* config/vms/vms-crtlmap.map: Completed using nm on
c and math system libraries.
* config/vms/make-crtlmap.awk: Handle any number of flags.
2012-03-30 Martin Jambor <mjambor@suse.cz> 2012-03-30 Martin Jambor <mjambor@suse.cz>
* tree-ssa-ccp.c (insert_clobbers_for_var): Do not assert that there * tree-ssa-ccp.c (insert_clobbers_for_var): Do not assert that there
......
...@@ -40,13 +40,13 @@ BEGIN { ...@@ -40,13 +40,13 @@ BEGIN {
print "{ \"" $1 "\", " print "{ \"" $1 "\", "
if (NF == 1) if (NF == 1)
print "0 }" print "0 }"
else if (NF == 2)
printf "VMS_CRTL_" $2 " }"
else if (NF == 3)
printf "VMS_CRTL_" $2 " | VMS_CRTL_" $3 " }"
else else
# To be fixed. {
exit 1 printf "VMS_CRTL_" $2
for (i = 3; i <= NF; i++)
printf " | VMS_CRTL_" $i
printf " }"
}
} }
END { END {
......
...@@ -12,130 +12,483 @@ ...@@ -12,130 +12,483 @@
# - Comment lines start with '#' in the first column. # - Comment lines start with '#' in the first column.
# - map lines consist in an identifier optionnaly followed by at most 2 # - map lines consist in an identifier optionnaly followed by at most 2
# space-separated flags. # space-separated flags.
# Flags are: # Flags are described in vms.c (prefixed by VMS_CRTL_).
# FLOAT: will be prefixed by 't'/'g'/'d'.
# 64: There is a 64-bit variant.
# GLOBAL: name will be prefixed by ga_
# BSD44: name will be prefixed by __bsd44__.
# LDBL: a 'x' prefix will be added if 128 bit long doubles are enabled.
# MALLOC: malloc related function.
# #
# Keep entries alpha-sorted - this is enforced by the awk script. # Keep entries alpha-sorted - this is enforced by the awk script.
# #
__32_getpwent
__32_getpwnam
__32_getpwuid
__32_sigaction
__32_signal __32_signal
__32_ssignal __32_ssignal
__64_getpwent
__64_getpwnam
__64_getpwuid
__64_sigaction
__64_signal __64_signal
__64_ssignal __64_ssignal
__assert
__dl__xpv
__freeaddrinfo32
__freeaddrinfo64
__getaddrinfo32
__getaddrinfo64
__getaddrinfo_compat4332
__getaddrinfo_compat4364
__getgrent64
__getgrgid64
__getgrgid_r64
__getgrnam64
__getgrnam_r64
__lgamma FLOAT64 FLOATV2
__lgammaf FLOAT32 FLOATV2
__lgammal FLOAT64 FLOAT128 FLOATV2
__long_gid___32_getpwnam
__long_gid___32_getpwuid
__long_gid___64_getpwnam
__long_gid___64_getpwuid
__long_gid_access
__long_gid_chmod
__long_gid_chown
__long_gid_fchmod
__long_gid_fchown
__long_gid_fstat
__long_gid_ftw
__long_gid_getegid
__long_gid_geteuid
__long_gid_getgid
__long_gid_getgroups
__long_gid_getpwnam
__long_gid_getpwnam_r 64
__long_gid_getpwuid
__long_gid_getpwuid_r 64
__long_gid_getuid
__long_gid_lchown
__long_gid_lstat
__long_gid_setgid
__long_gid_setuid
__long_gid_stat
__non_utc_ftw
__nw__xui
__off64_fcntl
__off64_fseeko
__off64_fstat
__off64_ftello
__off64_ftruncate
__off64_ftw
__off64_long_gid_fstat
__off64_long_gid_ftw
__off64_long_gid_lstat
__off64_long_gid_stat
__off64_lseek
__off64_lstat
__off64_mmap 64
__off64_non_utc_ftw
__off64_pread
__off64_pwrite
__off64_stat
__off64_truncate
__off64_utc_fstat
__off64_utc_lstat
__off64_utc_stat
__pdam_wcsftime
__pdam_wcstok 64
__posix__exit __posix__exit
__posix_exit __posix_exit
__posix_kill __posix_kill
__posix_long_gid_kill __posix_long_gid_kill
__posix_system
__posix_wait
__read_rnd
__recvmsg32 BSD44
__recvmsg64 BSD44
__sendmsg32 BSD44
__sendmsg64 BSD44
__short_gid___32_getpwent
__short_gid___64_getpwent
__short_gid_getpwent
__std_fstat
__std_ftw
__std_lstat
__std_stat
__unix_geteuid
__unix_getuid __unix_getuid
__utc_ctime
__utc_ctime_r
__utc_fstat __utc_fstat
__utc_ftime
__utc_gmtime
__utc_gmtime_r
__utc_localtime __utc_localtime
__utc_localtime_r __utc_localtime_r
__utc_lstat __utc_lstat
__utc_mktime
__utc_pdam_wcsftime
__utc_stat __utc_stat
__utc_strftime __utc_strftime
__utc_time __utc_time
__utc_utime
__utc_utimes
__utc_wcsftime
__utctz_gmtime __utctz_gmtime
__utctz_gmtime_r
__utctz_localtime __utctz_localtime
__utctz_localtime_r __utctz_localtime_r
__vms_pclose
__vms_wait3
__vms_wait4
__vms_waitpid
__writev32
__writev64
_exit
_fstat
a64l
abort abort
abs abs
accept accept BSD44
access access
acos FLOAT acos FLOAT64 DPML
acosd FLOAT64_VAXD DPML
acosdl FLOAT64_VAXD
acosh FLOAT64_VAXD DPML
acoshl FLOAT64_VAXD
acosl FLOAT64_VAXD
alarm alarm
asctime asctime
asctime_r asctime_r
asin FLOAT asin FLOAT64 DPML
atan FLOAT asind FLOAT64_VAXD DPML
atan2 FLOAT asindl FLOAT64_VAXD
asinh FLOAT64_VAXD DPML
asinhl FLOAT64_VAXD
asinl FLOAT64_VAXD
atan FLOAT64 DPML
atan2 FLOAT64 DPML
atan2l FLOAT64_VAXD
atand FLOAT64_VAXD DPML
atand2 FLOAT64_VAXD DPML
atand2l FLOAT64_VAXD
atandl FLOAT64_VAXD
atanh FLOAT64_VAXD DPML
atanhl FLOAT64_VAXD
atanl FLOAT64_VAXD
atexit atexit
atof FLOAT atof FLOAT64
atoi atoi
atol atol
atoll atoll
atoq atoq
basename 64 basename 64
bcmp bcmp
bcopy bcopy
bsearch 64 bind BSD44
box
# brk
bsd_mh GA
bsd_waddbytes
bsd_waddstr
bsearch 64
btowc
bzero bzero
calloc 64 MALLOC cabs FLOAT64 FLOATV2
ceil FLOAT cabsf FLOAT32 FLOATV2
cabsl FLOAT64 FLOAT128 FLOATV2
cacos DPML
cacosh DPML
calloc 64 MALLOC
calloc_opt
carg DPML
casin DPML
casinh DPML
catan DPML
catanh DPML
catclose
catgets 64
catopen
cbrt FLOAT64_VAXD
cbrtl FLOAT64_VAXD
ccos DPML
ccosh DPML
cdiv DPML
ceil FLOAT64 DPML
ceill FLOAT64_VAXD
cexp DPML
cfree
cfree_opt
chdir chdir
chmod chmod
chown chown
clearerr clearerr
clearerr_unlocked
clock clock
clock_getres
clock_gettime
clock_settime
clog DPML
close close
closedir closedir
connect cmul DPML
cos FLOAT cols GA
ctermid 64 confstr
connect BSD44
copysign FLOAT64_VAXD DPML
copysignl FLOAT64_VAXD
cos FLOAT64 DPML
cosd FLOAT64_VAXD DPML
cosdl FLOAT64_VAXD
cosh FLOAT64 DPML
coshl FLOAT64_VAXD
cosl FLOAT64_VAXD
cot FLOAT64_VAXD DPML
cotd FLOAT64_VAXD DPML
cotdl FLOAT64_VAXD
cotl FLOAT64_VAXD
cpow DPML
creat
crtl_init
crypt 64
csin DPML
csinh DPML
csqrt DPML
ctan DPML
ctanh DPML
ctermid 64
ctime ctime
ctime_r
cuserid 64
daylight GL
delete
delwin
difftime FLOAT64
dirname 64
div
dlclose dlclose
dlerror dlerror
dlopen dlopen
dlsym dlsym
drand48 FLOAT64
drem DPML
dup dup
dup2 dup2
environ GLOBAL ecvt FLOAT64
encrypt
endgrent
endhostent
endnetent
endprotoent
endpwent
endservent
endwin
environ GA
erand48 FLOAT64
erf FLOAT64_VAXD DPML
erfc FLOAT64_VAXD DPML
erfcl FLOAT64_VAXD
erfl FLOAT64_VAXD
errno GA
execl
execle
execlp
execv execv
execve execve
execvp execvp
exit exit
exp FLOAT exp FLOAT64 DPML
fabs FLOAT expl FLOAT64_VAXD
expm1 FLOAT64_VAXD DPML
expm1l FLOAT64_VAXD
fabs FLOAT64 DPML
fabsl FLOAT64_VAXD
fchmod
fchown
fclose fclose
fcntl fcntl
fcvt FLOAT64
fdopen fdopen
feof feof
feof_unlocked
ferror ferror
ferror_unlocked
fflush fflush
ffs ffs
fgetc fgetc
fgetname 64 MALLOC fgetc_unlocked
fgets 64 fgetname 64
fgetpos
fgets 64
fgetwc
fgetws 64
fileno fileno
floor FLOAT finite FLOAT64_VAXD DPML
finitel FLOAT64_VAXD
flockfile
floor FLOAT64 DPML
floorl FLOAT64_VAXD
fmod FLOAT64 DPML NODPML FLOATV2
fmodf FLOAT32 NODPML FLOATV2
fmodl FLOAT64 FLOAT128 NODPML FLOATV2
# fnmatch # Overridden by libiberty.
fopen fopen
fp_class FLOAT64_VAXD DPML
fp_classl FLOAT64_VAXD
fpathconf fpathconf
fprintf FLOAT LDBL fprintf FLOAT64 FLOAT128
fprintf__cf FLOAT64 FLOAT128
fputc fputc
fputc_unlocked
fputs fputs
fputwc
fputws
fread fread
free free
free_opt
freeaddrinfo
freehostent
freopen freopen
frexp FLOAT frexp FLOAT64 DPML
frexpl FLOAT64_VAXD
fscanf FLOAT64 FLOAT128
fseek fseek
fseeko
fsetpos
fstat
fstatvfs
fsync
ftell ftell
ftello
ftime
ftruncate
ftrylockfile
ftw
funlockfile
fwait
fwide
fwprintf FLOAT64 FLOAT128
fwrite fwrite
fwscanf FLOAT64 FLOAT128
gai_strerror
gamma FLOAT64 FLOATV2
gammaf FLOAT32 FLOATV2
gammal FLOAT64 FLOAT128 FLOATV2
gbsd_mvprintw
gbsd_mvscanw
gbsd_mvwprintw
gbsd_mvwscanw
gbsd_printw
gbsd_scanw
gbsd_wprintw
gbsd_wscanw
gcvt FLOAT64 64
get_errno_addr
get_vms_errno_addr
getaddrinfo
getaddrinfo_compat43
getc getc
getc_unlocked
getchar getchar
getcwd 64 getchar_unlocked
getclock
getcwd 64
getdtablesize
getegid getegid
getenv getenv
geteuid geteuid
getgid getgid
gethostbyaddr getgrent
gethostbyname getgrgid
getname getgrgid_r
getgrnam
getgrnam_r
getgroups
gethostaddr
gethostbyaddr BSD44
gethostbyname BSD44
gethostent
gethostname
getipnodebyaddr
getipnodebyname
getitimer
getlogin
getlogin_r
getname 64
getnameinfo
getnetbyaddr
getnetbyname
getnetent
getopt 32ONLY
getpagesize getpagesize
getpeername BSD44
getpgid
getpgrp
getpid getpid
getppid
getprotobyname
getprotobynumber
getprotoent
getpwent getpwent
getpwnam getpwnam
getpwnam_r 64
getpwuid
getpwuid_r 64
gets 64
getservbyname getservbyname
getservbyport getservbyport
getservent
getsid
getsockname BSD44
getsockopt getsockopt
gettimeofday gettimeofday
getuid getuid
getw
getwc
getwchar
glob 64
globfree 64
gmtime gmtime
gmtime_r
gsignal
herror
hostalias
hstrerror
htonl
htons htons
hypot FLOAT64 DPML NODPML FLOATV2
hypotf FLOAT32 NODPML FLOATV2
hypotl FLOAT64 FLOAT128 NODPML FLOATV2
iconv iconv
index 64 iconv_close
iconv_open
if_freenameindex
if_indextoname
if_nameindex
if_nametoindex
ilogb DPML
index 64
inet6_opt_append
inet6_opt_find
inet6_opt_finish
inet6_opt_get_val
inet6_opt_init
inet6_opt_next
inet6_opt_set_val
inet6_rth_add
inet6_rth_getaddr
inet6_rth_init
inet6_rth_reverse
inet6_rth_segments
inet6_rth_space
inet_addr
inet_aton
inet_lnaof
inet_makeaddr
inet_netof
inet_network
inet_ntoa
inet_ntop
inet_pton
initscr
initstate
ioctl ioctl
isalnum isalnum
isalpha isalpha
...@@ -146,128 +499,432 @@ iscntrl ...@@ -146,128 +499,432 @@ iscntrl
isdigit isdigit
isgraph isgraph
islower islower
isnan FLOAT64_VAXD DPML
isnanl FLOAT64_VAXD
isprint isprint
ispunct ispunct
isspace isspace
isupper isupper
iswalnum
iswalpha
iswcntrl
iswctype
iswdigit
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
isxdigit isxdigit
j0 FLOAT64_VAXD DPML
j0l FLOAT64_VAXD
j1 FLOAT64_VAXD DPML
j1l FLOAT64_VAXD
jn FLOAT64_VAXD DPML
jnl FLOAT64_VAXD
jrand48
kill kill
ldexp FLOAT l64a
l64a_r
labs
lchown
lcong48
ldexp FLOAT64 DPML
ldexpl FLOAT64_VAXD
ldiv
lgamma FLOAT64 DPML NODPML FLOATV2
lgammaf FLOAT32 NODPML FLOATV2
lgammal FLOAT64 FLOAT128 NODPML FLOATV2
lines GA
link
listen
llabs
lldiv
locale locale
localeconv localeconv
localtime localtime
localtime_r localtime_r
log FLOAT # ln -> log DPML
log10 FLOAT log FLOAT64 FLOATV2
log10 FLOAT64 DPML
log10l FLOAT64_VAXD
log1p FLOAT64_VAXD DPML
log1pl FLOAT64_VAXD
log2 FLOAT64_VAXD DPML
log2l FLOAT64_VAXD
logb FLOAT64_VAXD DPML
logbl FLOAT64_VAXD
logf FLOAT32 FLOATV2
logl FLOAT64 FLOAT128 FLOATV2
longjmp longjmp
longname 64
lrand48
lround DPML
lseek lseek
malloc 64 MALLOC lstat
mbstowcs 64 lwait
memchr 64 malloc 64 MALLOC
malloc_opt
mblen
mbrlen
mbrtowc
mbsinit
mbsrtowcs 64
mbstowcs
mbtowc
memccpy 64
memchr 64
memcmp memcmp
memcpy 64 memcpy 64
memmove 64 memmove 64
memset 64 memset 64
mkdir mkdir
mkstemp mkstemp
mktemp 64 mktemp 64
mmap 64 mktime
mmap 64
modf FLOAT64 DPML
modfl FLOAT64_VAXD
mprotect
mrand48
msync
munmap munmap
mvwaddstr
mvwin
nanosleep nanosleep
newwin
nextafter FLOAT64_VAXD DPML
nextafterl FLOAT64_VAXD
nice
nint FLOAT64_VAXD DPML
nintl FLOAT64_VAXD
nl_langinfo nl_langinfo
nrand48
ntohl
ntohs
open open
opendir opendir
optarg GA 32ONLY
opterr GL 32ONLY
optind GL 32ONLY
optopt GL 32ONLY
overlay
overwrite
pathconf pathconf
pause
pclose pclose
perror perror
pipe pipe
poll
popen popen
pow FLOAT # pow DPML version ???
printf FLOAT LDBL pow FLOAT64 FLOATV2
powf FLOAT32 FLOATV2
powl FLOAT64 FLOAT128 FLOATV2
pread
printf FLOAT64 FLOAT128
printf__cf FLOAT64 FLOAT128
printw FLOAT64 FLOAT128
putc putc
putc_unlocked
putchar putchar
putchar_unlocked
putenv putenv
puts puts
qsort 64 putw
putwc
putwchar
pwrite
qabs
qdiv
qsort 64
raise raise
rand
rand_r
random random
read read
readdir readdir
realloc 64 MALLOC readdir_r 64
readlink
readv 64
realloc 64 MALLOC
realloc_opt
realpath 64
record_read
recv recv
recvfrom recvfrom BSD44
recvmsg BSD44 64 recvmsg BSD44
remainder DPML
remove remove
rename rename
rewind rewind
rindex 64 rewinddir
rindex 64
rint FLOAT64_VAXD DPML
rintl FLOAT64_VAXD
rmdir rmdir
scanf FLOAT LDBL rtl_private
# sbrk # Makes libiberty/xmalloc.c fails to build.
scalb FLOAT64_VAXD DPML
scalbl FLOAT64_VAXD
scanf FLOAT64 FLOAT128
scanw FLOAT64 FLOAT128
scroll
seed48
seekdir
select select
send send
sendmsg BSD44 64 sendmsg BSD44
sendto sendto BSD44
set_new_handler__xpxv_v
setbuf setbuf
setenv setenv
seteuid
setgid
setgrent
sethostent
setitimer
setkey
setlocale setlocale
setnetent
setpgid
setpgrp
setprotoent
setpwent setpwent
setregid
setreuid
setservent
setsid
setsockopt setsockopt
setstate
setuid
setvbuf setvbuf
shm_open
shm_unlink
shutdown
sigaction
sigaddset
sigblock
sigdelset
sigemptyset
sigfillset
sighold
sigignore
sigismember
siglongjmp siglongjmp
sigmask
signal signal
signgam GL
sigpause
sigpending
sigprocmask
sigrelse
sigsetjmp sigsetjmp
sigsetmask sigsetmask
sin FLOAT sigstack
sigsuspend
sigtimedwait
sigvec
sigwait
sigwaitinfo
sin FLOAT64 DPML
sincos DPML
sincosd DPML
sind FLOAT64_VAXD DPML
sindl FLOAT64_VAXD
sinh FLOAT64 DPML
sinhcosh DPML
sinhl FLOAT64_VAXD
sinl FLOAT64_VAXD
sleep sleep
snprintf FLOAT LDBL snprintf FLOAT64 FLOAT128
socket socket
sprintf FLOAT LDBL socketpair
sqrt FLOAT sprintf FLOAT64 FLOAT128
sscanf FLOAT LDBL sprintf__cf FLOAT64 FLOAT128
sqrt FLOAT64 DPML
sqrtl FLOAT64_VAXD
srand
srand48
srandom
sscanf FLOAT64 FLOAT128
ssignal
stat stat
statvfs
strcasecmp strcasecmp
strcat 64 strcat 64
strchr 64 strchr 64
strcmp strcmp
strcpy 64 strcoll
strcpy 64
strcspn strcspn
strdup 64 MALLOC strdup 64 MALLOC
strerror strerror
strfmon FLOAT64
strftime
strlen strlen
strncasecmp strncasecmp
strncat 64 strncat 64
strncmp strncmp
strncpy 64 strncpy 64
strpbrk 64 strnlen
strrchr 64 strpbrk 64
strptime 64
strptime_xpg4
strrchr 64
strsep 64
strspn strspn
strstr 64 strstr 64
strtod 64 FLOAT strtod FLOAT64 64
strtok 64 MALLOC strtok 64
strtok_r 64 MALLOC strtok_r 64
strtol 64 strtol 64
strtoul 64 strtoll 64
strtoq 64
strtoul 64
strtoull 64
strtouq 64
strxfrm
subwin
swab
swprintf FLOAT64 FLOAT128
swscanf FLOAT64 FLOAT128
symlink
sys_errlist GA
sys_nerr GL
sysconf sysconf
system system
tan FLOAT tan FLOAT64 DPML
tand FLOAT64_VAXD DPML
tandl FLOAT64_VAXD
tanh FLOAT64 DPML
tanhl FLOAT64_VAXD
tanl FLOAT64_VAXD
telldir
tempnam tempnam
tgamma DPML
time time
times times
timezone GL
tmpfile tmpfile
tmpnam 64 tmpnam 64
toascii
tolower tolower
touchwin
toupper toupper
towctrans
towlower
towupper
trunc FLOAT64_VAXD DPML
truncate
truncl FLOAT64_VAXD
ttyname ttyname
ttyname_r
tzname GA
tzset
ualarm
umask umask
uname
ungetc ungetc
ungetwc
unlink unlink
unordered FLOAT64_VAXD DPML
unorderedl FLOAT64_VAXD
unsetenv
usleep usleep
utime utime
vfprintf FLOAT LDBL utimes
vprintf FLOAT LDBL vaxc$calloc_opt
vsnprintf FLOAT LDBL vaxc$cfree_opt
vsprintf FLOAT LDBL vaxc$crtl_init
vaxc$errno GA
vaxc$free_opt
vaxc$get_sdc
vaxc$malloc_opt
vaxc$realloc_opt
vfprintf FLOAT64 FLOAT128
vfscanf FLOAT64 FLOAT128
vfwprintf FLOAT64 FLOAT128
vfwscanf FLOAT64 FLOAT128
vprintf FLOAT64 FLOAT128
vscanf FLOAT64 FLOAT128
vsnprintf FLOAT64 FLOAT128
vsprintf FLOAT64 FLOAT128
vsscanf FLOAT64 FLOAT128
vswprintf FLOAT64 FLOAT128
vswscanf FLOAT64 FLOAT128
vwprintf FLOAT64 FLOAT128
vwscanf FLOAT64 FLOAT128
waddch
waddstr
wait wait
wait3
wait4
waitpid waitpid
wclear
wclrattr
wclrtobot
wclrtoeol
wcrtomb
wcscat 64
wcschr 64
wcscmp
wcscoll
wcscpy 64
wcscspn
wcsftime
wcslen
wcsncat 64
wcsncmp
wcsncpy 64
wcspbrk 64
wcsrchr 64
wcsrtombs 64
wcsspn
wcsstr 64
wcstod FLOAT64 64
wcstok 64
wcstol 64
wcstombs
wcstoul 64
wcswcs 64
wcswidth wcswidth
wcsxfrm
wctob
wctomb
wctrans
wctype
wcwidth
wdelch
wdeleteln
werase
wgetch
wgetstr
winch
winsch
winsertln
winsstr
wmemchr 64
wmemcmp
wmemcpy 64
wmemmove 64
wmemset 64
wmove
wprintf FLOAT64 FLOAT128
wprintw FLOAT64 FLOAT128
wrefresh
write write
writev
wscanf FLOAT64 FLOAT128
wscanw FLOAT64 FLOAT128
wsetattr
wstandend
wstandout
y0 FLOAT64_VAXD DPML
y0l FLOAT64_VAXD
y1 FLOAT64_VAXD DPML
y1l FLOAT64_VAXD
yn FLOAT64_VAXD DPML
ynl FLOAT64_VAXD
...@@ -26,6 +26,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -26,6 +26,8 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h" #include "ggc.h"
#include "target.h" #include "target.h"
#include "output.h" #include "output.h"
#include "tm.h"
#include "dwarf2out.h"
/* Correlation of standard CRTL names with DECCRTL function names. */ /* Correlation of standard CRTL names with DECCRTL function names. */
...@@ -36,19 +38,46 @@ along with GCC; see the file COPYING3. If not see ...@@ -36,19 +38,46 @@ along with GCC; see the file COPYING3. If not see
/* If long pointer are enabled, use _NAME64 instead. */ /* If long pointer are enabled, use _NAME64 instead. */
#define VMS_CRTL_64 (1 << 1) #define VMS_CRTL_64 (1 << 1)
/* Use tNAME instead. To be applied after the previous rule. */ /* Prepend s/f before the name. To be applied after the previous rule.
#define VMS_CRTL_FLOAT (1 << 2) use 's' for S float, 'f' for IEEE 32. */
#define VMS_CRTL_FLOAT32 (1 << 2)
/* Prepend __bsd44__ before the name. To be applied after the P64 /* Prepend t/g/d before the name. To be applied after the previous rule.
rule. */ use 'g' for VAX G float, 'd' for VAX D float, 't' for IEEE 64. */
#define VMS_CRTL_BSD44 (1 << 3) #define VMS_CRTL_FLOAT64 (1 << 3)
/* Prepend d before the name, only if using VAX fp. */
#define VMS_CRTL_FLOAT64_VAXD (1 << 4)
/* Prepend x before the name for if 128 bit long doubles are enabled. This /* Prepend x before the name for if 128 bit long doubles are enabled. This
concern mostly 'printf'-like functions. */ concern mostly 'printf'-like functions. */
#define VMS_CRTL_LDBL (1 << 4) #define VMS_CRTL_FLOAT128 (1 << 5)
/* From xxx, create xxx, xxxf, xxxl using MATH$XXX_T, MATH$XXX_S
and MATH$XXX{_X} if DPML is used. */
#define VMS_CRTL_DPML (1 << 6)
/* Prepend ga_ for global data. */ /* Together with DPML, it means that all variant (ie xxx, xxxf and xxxl) are
#define VMS_CRTL_GLOBAL (1 << 5) overridden by decc. Without DPML, it means this is a variant (ie xxxf
or xxxl) of a function. */
#define VMS_CRTL_NODPML (1 << 7)
/* Prepend __bsd44_ before the name. To be applied after the P64
rule. */
#define VMS_CRTL_BSD44 (1 << 8)
/* Define only in 32 bits mode, as this has no 64 bit variants.
Concerns getopt/getarg. */
#define VMS_CRTL_32ONLY (1 << 9)
/* GLobal data prefix (ga_, gl_...) */
#define VMS_CRTL_G_MASK (7 << 10)
#define VMS_CRTL_G_NONE (0 << 10)
#define VMS_CRTL_GA (1 << 10)
#define VMS_CRTL_GL (2 << 10)
/* Append '_2'. Not compatible with 64. */
#define VMS_CRTL_FLOATV2 (1 << 13)
struct vms_crtl_name struct vms_crtl_name
{ {
...@@ -84,14 +113,14 @@ vms_add_crtl_xlat (const char *name, size_t nlen, ...@@ -84,14 +113,14 @@ vms_add_crtl_xlat (const char *name, size_t nlen,
{ {
tree targ; tree targ;
/* printf ("vms crtl: %.*s -> %.*s\n", nlen, name, id_len, id_str); */
targ = get_identifier_with_length (name, nlen); targ = get_identifier_with_length (name, nlen);
gcc_assert (!IDENTIFIER_TRANSPARENT_ALIAS (targ)); gcc_assert (!IDENTIFIER_TRANSPARENT_ALIAS (targ));
IDENTIFIER_TRANSPARENT_ALIAS (targ) = 1; IDENTIFIER_TRANSPARENT_ALIAS (targ) = 1;
TREE_CHAIN (targ) = get_identifier_with_length (id_str, id_len); TREE_CHAIN (targ) = get_identifier_with_length (id_str, id_len);
VEC_safe_push (tree, gc, aliases_id, targ); VEC_safe_push (tree, gc, aliases_id, targ);
/* printf ("vms: %s (%p) -> %.*s\n", name, targ, id_len, id_str); */
} }
/* Do VMS specific stuff on builtins: disable the ones that are not /* Do VMS specific stuff on builtins: disable the ones that are not
...@@ -116,7 +145,48 @@ vms_patch_builtins (void) ...@@ -116,7 +145,48 @@ vms_patch_builtins (void)
const struct vms_crtl_name *n = &vms_crtl_names[i]; const struct vms_crtl_name *n = &vms_crtl_names[i];
char res[VMS_CRTL_MAXLEN + 3 + 9 + 1 + 1]; char res[VMS_CRTL_MAXLEN + 3 + 9 + 1 + 1];
int rlen; int rlen;
int nlen; int nlen = strlen (n->name);
/* Discard 32ONLY if using 64 bit pointers. */
if ((n->flags & VMS_CRTL_32ONLY)
&& flag_vms_pointer_size == VMS_POINTER_SIZE_64)
continue;
/* Handle DPML unless overridden by decc. */
if ((n->flags & VMS_CRTL_DPML)
&& !(n->flags & VMS_CRTL_NODPML))
{
const char *p;
char alt[VMS_CRTL_MAXLEN + 3];
memcpy (res, "MATH$", 5);
rlen = 5;
for (p = n->name; *p; p++)
res[rlen++] = TOUPPER (*p);
res[rlen++] = '_';
res[rlen++] = 'T';
/* Double version. */
if (!(n->flags & VMS_CRTL_FLOAT64))
vms_add_crtl_xlat (n->name, nlen, res, rlen);
/* Float version. */
res[rlen - 1] = 'S';
memcpy (alt, n->name, nlen);
alt[nlen] = 'f';
vms_add_crtl_xlat (alt, nlen + 1, res, rlen);
/* Long double version. */
res[rlen - 1] = (LONG_DOUBLE_TYPE_SIZE == 128 ? 'X' : 'T');
alt[nlen] = 'l';
vms_add_crtl_xlat (alt, nlen + 1, res, rlen);
if (!(n->flags & (VMS_CRTL_FLOAT32 | VMS_CRTL_FLOAT64)))
continue;
}
if (n->flags & VMS_CRTL_FLOAT64_VAXD)
continue;
/* Add the dec-c prefix. */ /* Add the dec-c prefix. */
memcpy (res, "decc$", 5); memcpy (res, "decc$", 5);
...@@ -124,27 +194,49 @@ vms_patch_builtins (void) ...@@ -124,27 +194,49 @@ vms_patch_builtins (void)
if (n->flags & VMS_CRTL_BSD44) if (n->flags & VMS_CRTL_BSD44)
{ {
memcpy (res + rlen, "__bsd44__", 9); memcpy (res + rlen, "__bsd44_", 8);
rlen += 9; rlen += 8;
} }
if (n->flags & VMS_CRTL_GLOBAL) if ((n->flags & VMS_CRTL_G_MASK) != VMS_CRTL_G_NONE)
{ {
memcpy (res + rlen, "ga_", 3); res[rlen++] = 'g';
rlen += 3; switch (n->flags & VMS_CRTL_G_MASK)
{
case VMS_CRTL_GA:
res[rlen++] = 'a';
break;
case VMS_CRTL_GL:
res[rlen++] = 'l';
break;
default:
gcc_unreachable ();
}
res[rlen++] = '_';
} }
if (n->flags & VMS_CRTL_FLOAT) if (n->flags & VMS_CRTL_FLOAT32)
res[rlen++] = 'f';
if (n->flags & VMS_CRTL_FLOAT64)
res[rlen++] = 't'; res[rlen++] = 't';
if (n->flags & VMS_CRTL_LDBL) if ((n->flags & VMS_CRTL_FLOAT128) && LONG_DOUBLE_TYPE_SIZE == 128)
res[rlen++] = 'x'; res[rlen++] = 'x';
nlen = strlen (n->name);
memcpy (res + rlen, n->name, nlen); memcpy (res + rlen, n->name, nlen);
if ((n->flags & VMS_CRTL_64) == 0) if ((n->flags & VMS_CRTL_64) == 0)
vms_add_crtl_xlat (n->name, nlen, res, rlen + nlen); {
rlen += nlen;
if (n->flags & VMS_CRTL_FLOATV2)
{
res[rlen++] = '_';
res[rlen++] = '2';
}
vms_add_crtl_xlat (n->name, nlen, res, rlen);
}
else else
{ {
char alt[VMS_CRTL_MAXLEN + 3]; char alt[VMS_CRTL_MAXLEN + 3];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment