https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/4] GETLOG runtime and extension implementation: get login
username
Ge
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/4] FDATE extension implementation: get date and time in
ctime format
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/5] GETLOG runtime and extension implementation: get login
username
Ge
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/5] GETLOG runtime and extension implementation: get login
username
Ge
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ std::array str;
yi-wu-arm wr
@@ -39,6 +39,17 @@
// overload will have a dummy parameter whose type indicates whether or not it
// should be preferred. Any other parameters required for SFINAE should have
// default values provided.
+
+// outside anonymous namespace, function reused
yi-wu-a
@@ -751,7 +751,7 @@ This phase currently supports all the intrinsic procedures
listed above but the
| Object characteristic inquiry functions | ALLOCATED, ASSOCIATED,
EXTENDS_TYPE_OF, IS_CONTIGUOUS, PRESENT, RANK, SAME_TYPE, STORAGE_SIZE |
| Type inquiry intrinsic functions |
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/15] GETLOG runtime and extension implementation: get login
username
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/16] GETLOG runtime and extension implementation: get login
username
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/17] GETLOG runtime and extension implementation: get login
username
yi-wu-arm wrote:
CI didn't pass because `getlogin_r` fail on Linux with error code 6.
```
ENXIO
The calling process has no controlling terminal.
```
https://man.archlinux.org/man/getlogin_r.3.en#EMFILE suggested using
environment variable rather than use `getlogin` or `getlogin_r`.
Thus, the imp
https://github.com/yi-wu-arm created
https://github.com/llvm/llvm-project/pull/74628
Get login username, ussage:
```
CHARACTER(32) :: login
CALL getlog(login)
WRITE(*,*) login
```
getlog is required for an exascale proxyapp.
https://proxyapps.exascaleproject.org/app/minismac2d/
https://github.co
yi-wu-arm wrote:
accidently push the wrong branch in previous pr
https://github.com/llvm/llvm-project/pull/70917
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
yi-wu-arm wrote:
https://github.com/llvm/llvm-project/pull/70917#issuecomment-1843314222
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yi-wu-arm closed
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yi-wu-arm reopened
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/21] GETLOG runtime and extension implementation: get login
username
https://github.com/yi-wu-arm ready_for_review
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10,10 +10,52 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "terminator.h"
+#include "flang/Runtime/character.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Ru
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+// CALL GETLOG(USRNAME)
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ const int nameMaxLen
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/22] GETLOG runtime and extension implementation: get login
username
@@ -10,10 +10,52 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "terminator.h"
+#include "flang/Runtime/character.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Ru
@@ -657,6 +657,11 @@ CALL CO_REDUCE
CALL CO_SUM
```
+### Library subroutine
yi-wu-arm wrote:
I have moved it to the end of `intrinsic` block.
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+// CALL GETLOG(USRNAME)
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ const int nameMaxLen
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login
username
@@ -37,5 +79,34 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+// CALL GETLOG(USRNAME)
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ const int nameMaxLen
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login
username
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/23] GETLOG runtime and extension implementation: get login
username
yi-wu-arm wrote:
`getlog` library intrinsic will first retrieve user login name using `getlog_r`
on Linux and `GetUserName` on Windows. If that returns an error, it will then
use environment variable to get username.
https://github.com/llvm/llvm-project/pull/74628
_
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/10] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/11] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/25] GETLOG runtime and extension implementation: get login
username
@@ -10,10 +10,50 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "flang/Runtime/character.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
+#ifdef
@@ -6,6 +6,37 @@
//
//===--===//
+// character.h
yi-wu-arm wrote:
It actually meant to match the `CHARCHTER_H` in the end of `#endif`, but I
guess that create a confusion and should be remo
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/26] GETLOG runtime and extension implementation: get login
username
@@ -37,5 +77,30 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+// CALL GETLOG(USRNAME)
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
yi-wu-
@@ -6,6 +6,37 @@
//
//===--===//
+// character.h
yi-wu-arm wrote:
Replaced by a comment
https://github.com/llvm/llvm-project/pull/74628
___
cfe-c
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/27] GETLOG runtime and extension implementation: get login
username
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login
username
Ge
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ std::array str;
+ int error = getlogin_r(str
@@ -13,6 +13,44 @@
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
+#include
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
+#include
+
+#include // UNLEN=256
+#include // wcstombs_s
+#include // w
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ std::array str;
+ int error = getlogin_r(str
@@ -37,5 +75,19 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ std::array str;
+ int error = getlogin_r(str
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/6] GETLOG runtime and extension implementation: get login
username
Ge
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/5] FDATE extension implementation: get date and time in
ctime format
PAX-12-WU wrote:
update based on:
https://github.com/llvm/llvm-project/pull/70917#discussion_r1393878064 Emit a
Fortran runtime failure (instead of `assert`)
https://github.com/llvm/llvm-project/pull/70917#discussion_r1393905238 Space
filling
`fdate` now produce the same result on flang, comp
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/5] FDATE extension implementation: get date and time in
ctime format
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/6] FDATE extension implementation: get date and time in
ctime format
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/6] FDATE extension implementation: get date and time in
ctime format
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/6] FDATE extension implementation: get date and time in
ctime format
https://github.com/PAX-12-WU updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/6] FDATE extension implementation: get date and time in
ctime format
yi-wu-arm wrote:
Hello @klausler, could you please share your thoughts or comments on this
patch, particularly with regard to the Windows side? Thanks in advance.
https://github.com/llvm/llvm-project/pull/70917
___
cfe-commits mailing list
cfe-commits
@@ -10,9 +10,26 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "terminator.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
+#include "flang/Runtim
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/7] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/7] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/7] GETLOG runtime and extension implementation: get login
username
Ge
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/8] GETLOG runtime and extension implementation: get login
username
Ge
@@ -37,5 +80,17 @@ void FORTRAN_PROCEDURE_NAME(getarg)(
(void)RTNAME(GetCommandArgument)(
n, &value, nullptr, nullptr, __FILE__, __LINE__);
}
+
+void FORTRAN_PROCEDURE_NAME(getlog)(std::int8_t *arg, std::int64_t length) {
+ std::array str = {};
+
+ int error = getlogi
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 1/9] GETLOG runtime and extension implementation: get login
username
Ge
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/10] GETLOG runtime and extension implementation: get login
username
yi-wu-arm wrote:
Hi @jeanPerier Sorry to throw a ping. I have changed the structure and
implementation of `getlog`, it now does the following:
On Linux: use `getlogin_r`, if fail get from environment variable.
On Windows: get from environment variable to avoid linking to library
`Advapi32.lib`
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/28] GETLOG runtime and extension implementation: get login
username
@@ -6,6 +6,37 @@
//
//===--===//
+// Defines a utility function for copying and padding characters
+#ifndef CHARACTER_H
+#define CHARACTER_H
yi-wu-arm wrote:
Thanks for pointing this out, I
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/29] GETLOG runtime and extension implementation: get login
username
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/30] GETLOG runtime and extension implementation: get login
username
@@ -10,13 +10,29 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "flang/Runtime/character.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
+#if _R
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/74628
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/31] GETLOG runtime and extension implementation: get login
username
yi-wu-arm wrote:
Windows CI failure: compiler out of heap space.
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 1/8] FDATE extension implementation: get date and time in
ctime format
yi-wu-arm wrote:
> > Hello @klausler, could you please share your thoughts or comments on this
> > patch, particularly with regard to the Windows side? Thanks in advance.
>
> You should use modern C++ braced initialization in flang/runtime.
Hi @klausler. Thanks for the comment! I have updated
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/70917
>From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:49:13 +
Subject: [PATCH 01/11] GETLOG runtime and extension implementation: get login
username
@@ -9,6 +9,17 @@
// Defines the API between compiled code and the implementations of
time-related
// intrinsic subroutines in the runtime library.
+// time-intrinsic.h
+#ifndef TIME_INTRINSIC_H
+#define TIME_INTRINSIC_H
+
+#include
+
+void copyBufferAndPad(
+char *dest,
yi-wu-arm wrote:
Hi @klausler, thanks for the comment, I have changed the initial letters and
add `const` to buffer in function declaration. Is there anything else I should
pay attention to? Thanks in advance!
https://github.com/llvm/llvm-project/pull/70917
https://github.com/yi-wu-arm closed
https://github.com/llvm/llvm-project/pull/74628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/12] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/13] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/14] FDATE extension implementation: get date and time in
ctime format
@@ -173,5 +173,145 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator)
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from,
bool toIsContiguous, bool fromIsContiguous);
RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from);
+RT_API_ATTRS const char *EnsureNullTerminated(
+
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from,
bool toIsContiguous, bool fromIsContiguous);
RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from);
+RT_API_ATTRS const char *EnsureNullTerminated(
+
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from,
bool toIsContiguous, bool fromIsContiguous);
RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from);
+RT_API_ATTRS const char *EnsureNullTerminated(
+
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator)
@@ -411,6 +412,48 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from,
bool toIsContiguous, bool fromIsContiguous);
RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from);
+RT_API_ATTRS const char *EnsureNullTerminated(
+
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator)
@@ -173,5 +173,141 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator)
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/15] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/16] FDATE extension implementation: get date and time in
ctime format
https://github.com/yi-wu-arm updated
https://github.com/llvm/llvm-project/pull/71222
>From e0d99fb5baa4231ab351f7fd5abf0a1ffe589547 Mon Sep 17 00:00:00 2001
From: Yi Wu
Date: Mon, 6 Nov 2023 19:55:06 +
Subject: [PATCH 01/17] FDATE extension implementation: get date and time in
ctime format
@@ -0,0 +1,31 @@
+//===-- include/flang/Runtime/command.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,31 @@
+//===-- include/flang/Runtime/command.h -*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -411,6 +412,24 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from,
bool toIsContiguous, bool fromIsContiguous);
RT_API_ATTRS void ShallowCopy(const Descriptor &to, const Descriptor &from);
+RT_API_ATTRS const char *EnsureNullTerminated(
+
@@ -173,5 +173,70 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator) {
@@ -173,5 +173,70 @@ RT_API_ATTRS void ShallowCopy(const Descriptor &to, const
Descriptor &from) {
ShallowCopy(to, from, to.IsContiguous(), from.IsContiguous());
}
+RT_API_ATTRS const char *EnsureNullTerminated(
+const char *str, size_t length, Terminator &terminator) {
@@ -0,0 +1,203 @@
+//===-- runtime/execute.cpp
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,203 @@
+//===-- runtime/execute.cpp
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/yi-wu-arm edited
https://github.com/llvm/llvm-project/pull/74077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
yi-wu-arm wrote:
Hi @klausler , any thought of this patch? Thank in advance!
https://github.com/llvm/llvm-project/pull/71222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -43,6 +66,26 @@ void FORTRAN_PROCEDURE_NAME(flush)(const int &unit) {
}
} // namespace io
+// CALL FDATE(DATE)
+void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *arg, std::int64_t length) {
+ // Day Mon dd hh:mm:ss \n\0 is 26 characters, e.g.
+ // Tue May 26 21:51:03 2015
@@ -43,6 +66,26 @@ void FORTRAN_PROCEDURE_NAME(flush)(const int &unit) {
}
} // namespace io
+// CALL FDATE(DATE)
+void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *arg, std::int64_t length) {
+ // Day Mon dd hh:mm:ss \n\0 is 26 characters, e.g.
+ // Tue May 26 21:51:03 2015
@@ -22,6 +22,9 @@ extern "C" {
// CALL FLUSH(n) antedates the Fortran 2003 FLUSH statement.
void FORTRAN_PROCEDURE_NAME(flush)(const int &unit);
+// GNU extension subroutine FDATE
+void FORTRAN_PROCEDURE_NAME(fdate)(std::byte *string, std::int64_t length);
yi-
1 - 100 of 169 matches
Mail list logo