sysv abi, the argument should go in esi
+/* { dg-final { scan-assembler-times "movl\[\\t \]*\\\$20,\[\\t \[]*%esi" 2 }
} */
+
+
ditto.
--
Best regards,
LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
This is a minor change, bootstrapped on x86_64-w64-mingw32.
--
Best regards,
LIU Hao
From 83c3e90432f9ebc97785d81be7a94066d9923920 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Sat, 29 Mar 2025 22:47:54 +0800
Subject: [PATCH] gcc/mingw: Align `.refptr.` to 8-byte boundaries for 64-bit
targets
Patch v2:
The special treatment about + and - seems to be specific to `ASM_OUTPUT_SYMBOL_REF()`. Neither
operator is passed to `ASM_OUTPUT_LABELREF()`, so it's not necessary to check for them in
`ix86_asm_output_labelref()`.
--
Best regards,
LIU Hao
model, both patched to use Intel syntax by default. I have
also bootstrapped on x86_64-linux-gnu with default AT&T syntax, and verified that it produces
expected assembly with `-masm=intel`.
--
Best regards,
LIU Hao
From 07baacbc7de1f5dc5db9e834b030c1b642774a37 Mon Sep 17 00:00:00 2001
在 2024-11-29 23:50, Jonathan Wakely 写道:
It looks like your patch is against gcc-14 not trunk, the
GLIBCXX_15.1.0 version is already there.
Sorry, I mean GLIBCXX_3.4.34 for 15.1.0
Oops that's what I used to test the patch. Reapplied to master now.
--
Best regards,
LIU Hao
#if.. ?
Please add full stops (periods) to the ChangeLog entry, to make
complete sentences.
Is "PR libstdc++/, target/" valid like that? I don't think it
is, it should be two separate lines:
PR libstdc++/
PR target/
Fixed now.
--
Best regard
--
Best regards,
LIU Hao
From 78ae9cacdfea8bab4fcc8a18068ad30401eb588d Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Fri, 29 Nov 2024 17:17:01 +0800
Subject: [PATCH] libstdc++: Hide TLS variables in `std::call_once`
This is a transitional change for PR80881, because on Windows, thread-local
--
Best regards,
LIU Hao
From 6a2f0d3fbd443487bb6dd7bc95ed5403cd572ac1 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Mon, 15 Jul 2024 16:55:52 +0800
Subject: [PATCH] Do not use caller-saved registers for COMDAT functions
A reference to a COMDAT function may be resolved to another definition
support ANSI escape codes, translate
+ * them as needed.
+ */
nitpicking: This should probably be
+ * them as needed. */
CC'ing Jonathan Yong. This series of patches look good to me.
--
Best regards,
LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
't `GetConsoleMode()` be called only when `handle` is valid? I think you may initialize
`isconsole` to `false`; then only if the handle is valid, should it be set accordingly; and this
function just returns `isconsole`.
The other two patches look good to me.
--
Best regards,
LIU Hao
Open
May I suggest you keep the mcf thread model for aarch-w64-mingw32? I requested Martin Storsjö to
test it on a physical Windows 11 on ARM machine with Clang and all tests passed. I think it should
work once the GCC support is complete.
--
Best regards,
LIU Hao
OpenPGP_signature.asc
I was away last week. LH, care to comment? Changes look fine to me.
The change looks good to me, too.
I haven't tested it though. According to a similar construction around 'libgcc/unwind.inc:265' it
should be that way.
--
Best regards,
LIU Hao
OpenPGP_signature.asc
them for C++ [1] and GCC defines `NOMINMAX` in 'os_defines.h',
so either way it is not necessary.
[1]
https://github.com/mingw-w64/mingw-w64/blob/3ebb92804e3125d1be8f61bcd42f15a8db15ba1e/mingw-w64-headers/include/minmax.h#L9
--
Best regards,
LIU Hao
OpenPGP_signature.asc
在 2023/6/13 14:29, Pali Rohár 写道:
Of course, just I'm not sure where to put the new paragraph. At the
beginning? Or after the text? What do you think?
Maybe just in front of 'This option is available for MinGW targets.' Also you
may reword it as you like.
--
Best r
option is for experimental and testing
purposes only.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
--
Best regards,
LIU Hao
From a4d5e161fbaa5b9994077ffb474e2b55c6c3b3cb Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Tue, 10 May 2022 13:19:07 +0800
Subject: [PATCH] gcc: Remove size limit of PCH for *-*-mingw32 hosts
PCHs can now be relocated, so the size limit makes no sense any more.
This
lling wide APIs explicitly, such overhead can be avoided.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
nd JIT, on
{i868,x86_64}-w64-mingw32; but it contains changes to Ada, libgo, libgomp and libvtv, which I don't
usually build and test.
--
Best regards,
LIU Hao
From 6600e2b135bd06b2aad77e538b47a480c8deebdd Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Fri, 6 Jan 2023 23:18:15 +0800
S
.
Thanks, I've pushed it to trunk now.
Thank you for taking care of it!
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
在 2022/11/12 02:27, Jonathan Wakely 写道:
A clean build fixed that. This patch bootstraps and passes testing on
x86_64-pc-linux-gnu (CentOS 8 Stream).
OK for trunk?
What should we do if no one has been approving this patch?
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP
ccess to
GCC repo, and it takes a couple of hours for me to bootstrap GCC just for this tiny change.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
e not used inside GCC and the include of mutex should be
done early.
Well I am not familiar with such behavior. Feel free to amend the patch, until it looks good to you.
I hope we can check this in before GCC 13 RC.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
lto,c++,fortran,objc,obj-c++` and with the `mcf` thread model; no errors observed. The built
`libgccjit-0.dll` does not have imports from winpthread any more.
Please review.
--
Best regards,
LIU Hao
From ceb65f21b5ac23ce218efee82f40f641ebe44361 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Mon,
OSIX and ISO C specifies them as such, while all
Windows APIs take relative durations as a 32-bit integer of milliseconds,
which can also easily get overflown.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
This allows building libobjc and enabling Objective-C. Tested against GCC 12
branch on i686-w64-mingw32.
--
Best regards,
LIU Hao
From c05cceb2f3baa96c9381be38717bdf6f1f3adb76 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Sat, 22 Oct 2022 17:31:46 +0800
Subject: [PATCH] libgcc: Update '
cture, protected by a
spin lock. It's just another undocumented syscall. Keyed events are still functional.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
y. There are distributions
that have win32 as the default thread model, such as Debian.
* I personally need more control for future development, for example,
re-implement pthread or adding libcxx support, which doesn't fit in
GCC.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
x27;t
know Windows well enough to determine which is better.
I had the same question...
I would like to understand what is the difference?
Moreover I would like to understand what is the difference with the already added support for the
winpthreads library?
@LIU Hao, could you explain please?
READ_NTDLL_SPEC
```
(NTDLL is only necessary when linking against the shared library.)
The committed patch inserted MCFGTHREAD after KERNEL32 for simplicity, but if you do think we had
better not repeat KERNEL32 twice, I can propose another patch.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
在 2022-10-10 23:56, LIU Hao 写道:
在 2022-10-04 20:44, LIU Hao 写道:
Attached are revised patches. These are exported from trunk.
Revised further. The patch for libgfortran has been committed to trunk today, so I include only the
other two.
* In the second patch, a space character has been
在 2022-10-04 20:44, LIU Hao 写道:
Attached are revised patches. These are exported from trunk.
Revised further. The patch for libgfortran has been committed to trunk today, so I include only the
other two.
* In the second patch, a space character has been inserted after
`(int)` for
it|[a]ll): y
Unable to initialize SMTP properly. Check config and use --smtp-debug. VA
LUES: server=smtp.126.com encryption=tls hello=localhost.localdomain port
=465 at /usr/lib/git-core/git-send-email line 1684, line 3.
```
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
(with MSVCRT and UCRT). No errors have been observed so far.
Once these patches land in GCC, we can start the work in mingw-w64 basing on
`__USING_MCFGTHREAD__`.
--
Best regards,
LIU Hao
From e1ab15fc95ac8180156feed410cacb64a41a9567 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Fri, 27 May
read_self ();
```
so indeed `thread` should be `__gthread_t`. By the way I reported this issue four months ago and
haven't received any response so far:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105764
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
在 2022-10-02 04:02, Bernhard Reutner-Fischer 写道:
On 1 October 2022 20:34:45 CEST, LIU Hao via Gcc-patches
wrote:
Greetings.
The first patch is necessary because somewhere in libgfortran, `pthread_t` is
referenced. If the thread model is not `posix`, it fails to compile.
One of several
ested because I don't know how to bootstrap it. Objective-C
is not supported, because threading APIs for libobjc have not been implemented.
Please review. If there are any changes that I have to make, let me know.
--
Best regards,
LIU Hao
From c522fa74c791ee8904b5906c6e18908b56071db5 Mon Se
The attached patch addresses a build issue when is not included.
Please review.
--
Best regards,
LIU Hao
From 7b573e4cdb7c3b666baac4c38046c64a01b6dcb5 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Fri, 27 May 2022 23:12:48 +0800
Subject: [PATCH] libgfortran: Use `__gthread_t` instead of
rks in GCC, thus I'm gonna propose
a patch to MSYS2 and see how it works. This can be committed to GCC later, after having been tested
through many packages.
--
Best regards,
LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
在 2022-05-10 20:00, Xi Ruoyao 写道:
On Tue, 2022-05-10 at 19:35 +0800, LIU Hao via Gcc-patches wrote:
Subject: [PATCH] Remove size limit of PCH
Make it "Remove size limit of PCH [PR14940]", so once it's committed a
message will show up in bugzilla.
Here is the revised patc
7; program, and seen no problems so far.
After eighteen years this has eventually been settled. (sigh)
--
Best regards,
LIU Hao
From c084ab275f47cc27621e664d1c63e177525cf321 Mon Sep 17 00:00:00 2001
From: LIU Hao
Date: Tue, 10 May 2022 13:19:07 +0800
Subject: [PATCH] Remove size limit of PCH
ength modifier'. This was caused by mistaken array
indices in `TARGET_OVERRIDES_FORMAT_INIT`.
--
Best regards,
LH_Mouse
From f73d5dcdc61a5da1a4265b144739067b4ec40ec2 Mon Sep 17 00:00:00 2001
From: Liu Hao
Date: Thu, 12 Nov 2020 22:20:29 +0800
Subject: [PATCH] gcc: Add `ll` and `L` length mod
在 2020/11/14 上午8:12, Joseph Myers 写道:
> On Fri, 13 Nov 2020, Liu Hao via Gcc-patches wrote:
>
>> 在 2020/11/13 2:46, Joseph Myers 写道:
>>> I'd expect these patches to include updates to the gcc.dg/format/ms_*.c
>>> tests to reflect the changed semantics
3d967e6523b87507 Mon Sep 17 00:00:00 2001
From: Liu Hao
Date: Thu, 12 Nov 2020 22:20:29 +0800
Subject: [PATCH] gcc: Add `ll` and `L` length modifiers for `ms_printf`
Previous code abuse `FMT_LEN_L` for the `I` modifier. As `L` is a valid
modifier for `f`, `e`, `g`, etc. and `I` has the same semant
在 2020/11/12 23:12, Liu Hao 写道:
>
> My humble opinion is that people should have gotten used to the `ll`
> specifier so I propose a
> different patch that enables it unconditionally. As Jonathan Yong pointed
> out, GCC is impossible to
The previous patch missed a `double_name` f
a few minutes ago. It's not gonna finish very soon
so I send this patch
for your comments.
--
Best regards,
LH_Mouse
From 1d61adae0695e7067e35f36e607a754a7cf12796 Mon Sep 17 00:00:00 2001
From: Liu Hao
Date: Thu, 12 Nov 2020 22:20:29 +0800
Subject: [PATCH] gcc: Add `ll` and `L` length modif
Ping?
在 2020/10/29 下午3:56, Liu Hao 写道:
> I forward it here for comments.
>
> Basing on the behavior of both GCC and Clang, `__cxa_thread_atexit` is used
> to register the
> destructor of thread_local objects directly, suggesting the first parameter
> should have `__this
oject/blob/97b351a827677ebbedc10bfbce8ef8844c246553/libcxxabi/src/cxa_thread_atexit.cpp#L22
转发的消息
主题: Re: libstdc++: Attempt to resolve PR83562
日期: Tue, 27 Oct 2020 22:38:29 +0800
发件人: Liu Hao
收件人: Jason Merrill , GCC Patches
在 2020/10/8 22:56, Jason Merrill 写道:
>
> Hmm, why isn't the ming
在 2020/10/8 22:56, Jason Merrill 写道:
>
> Hmm, why isn't the mingw implementation used for all programs? That would
> avoid the bug.
>
There was a little further discussion about this [1].
TL;DR: The mingw-w64 function is linked statically and subject to issues about
order of destruction.
Re
在 2020/10/8 22:56, Jason Merrill 写道:
> On 10/7/20 10:52 PM, Liu Hao via Gcc-patches wrote:
>> [Please CC me as I am not subscribed to this list.]
>
> Hmm, why isn't the mingw implementation used for all programs? That would
> avoid the bug.
>
I am afraid the libstdc+
,
LH_Mouse
From ac325bdcd6e3fa522f8b59d436cd4b3ab663de5c Mon Sep 17 00:00:00 2001
From: Liu Hao
Date: Thu, 8 Oct 2020 10:26:13 +0800
Subject: [PATCH] libsupc++: Make the destructor parameter to
`__cxa_thread_atexit()` use the `__thiscall` calling convention for
i686-w64-mingw32
The mingw-w64 imp
在 2020/5/29 22:01, Liu Hao 写道:
> This is necessary as libmsvcrt.a is not a pure import library, but
> also contains some functions that invoke others in KERNEL32.DLL.
>
> * config/i386/mingw32.h: Insert -lkernel32 after -lmsvcrt
> ---
> gcc/config/i386/mingw32.h | 2 +-
&g
This is necessary as libmsvcrt.a is not a pure import library, but
also contains some functions that invoke others in KERNEL32.DLL.
* config/i386/mingw32.h: Insert -lkernel32 after -lmsvcrt
---
gcc/config/i386/mingw32.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/g
在 2019/7/29 22:43, JonY 写道:
>
> Any updates?
>
No. I am still under the impression that using thread handles as
`std::thread::id`s:
0) complexifies comparison of thread IDs without obvious benefits, and
1) does not work reliably because handles can be duplicated, and
2) makes `__gthread_self()`
在 2019/7/2 下午8:27, Jonathan Wakely 写道:
>
> What do you mean by "unclosed thread"? If I read it correctly, the MSDN
> page
> refers to closing a handle (which makes sense), not closing a thread.
>
Yes, it meant a thread which has terminated but not deleted due to some
handles left open.
>> This
在 2019/7/2 下午8:00, Jonathan Wakely 写道:
> The C++ standard says:
>
> "The library may reuse the value of a thread::id of a terminated
> thread that can no longer be joined."
>
> So that's not a reason to use a handle.
According to MSDN [1] a thread ID is valid 'until the thread has been
terminate
在 2019/7/2 下午5:19, Eric Botcazou 写道:
>> It seems inappropriate to use handles as thread identifiers (as handles
>> imply resource ownership and are not unique identifiers); thread IDs (as
>> `DWORD` or `unsigned long`) would be a better alternative.
>
> This was considered but ultimately rejected,
在 2019/6/29 上午12:10, Jacek Caban 写道:
>
> You don't really need to store the whole __gthr_win32_thr_desc in TLS.
> If you stored just the handle, this wouldn't need a destructor.
>
>
The handle to be stored in the TLS ('the Handle' for short hereinafter)
should be a real handle, so there are a f
在 2018-08-30 01:36, Nathan Sidwell 写道:
But, it would be bad to make that particular ABI fix in a point release,
so this patch just reverts the regression I caused. Sadly, because it
requires understanding TEMPLATE_DECL, we can't simply update
place_field. Instead I temporarily stitch out unde
在 2018/8/14 13:54, Liu Hao 写道:
The two patches attached have addressed two issues in the ANSI escape
sequence translator I sent before. Please review, and consider
backporting these to gcc-8-branch.
And here are SVN changelogs for these two patches, in this order:
* gcc/pretty
The two patches attached have addressed two issues in the ANSI escape
sequence translator I sent before. Please review, and consider
backporting these to gcc-8-branch.
commit 5e79ccaa625169fcaca5847feff0ee168cbad83f (HEAD -> makepkg)
Author: Liu Hao
Date: Tue Aug 14 12:22:08 2018 +0
On 2017/10/11 5:04, Manuel López-Ibáñez wrote:
Ops! You're obviously right. What was I thinking?
I still believe that pretty-printer.c is not the right place for all
this color-handling code (diagnostic-color.c or libiberty/ may be better
places).
No and yes. The colors emerge only when those
On 2017/10/10 6:25, Manuel López-Ibáñez wrote:
For what is worth, the color output of GCC comes originally from grep,
and grep does have code for colorizing in Windows:
http://git.savannah.gnu.org/cgit/grep.git/tree/lib
and there are significant differences with this patch. For once,
/* $T
On 2017/10/9 22:16, David Malcolm wrote:
I have some concerns about adding non-trivial host-specific code to the
diagnostics subsystem.
I occasionally make changes to the files you're touching, but I don't
have access to the host in question, so I can't test that I don't break
things on MinGW.
On 2017/10/9 19:01, JonY wrote:
On 10/08/2017 11:39 AM, Liu Hao wrote:
I'm not sure if it should be enabled by default due to the interleaving
problem, but seeing as the user has to go out to set GCC_COLORS to use
this feature, I suppose it is OK.
I will commit soon if there are no
On 2017/10/8 20:24, Hannes Domani wrote:
Am Sonntag, 8. Oktober 2017, 14:02:48 MESZ hat Liu Hao
Folgendes geschrieben:
> On 2017/10/8 19:55, Hannes Domani wrote:
>
> > So why not just enable it on Win10?
>
>
> It is up to you, GCC maintainers. If dropping support fo
On 2017/10/8 19:55, Hannes Domani wrote:
So why not just enable it on Win10?
It is up to you, GCC maintainers. If dropping support for Windows prior
to Windows 10 TH2 is an option, I may provide another patch, which I
can't test because I primarily work on Windows 7. XD
--
Best regards,
LH_
On 2017/9/28 4:09, Joseph Myers wrote:
On Thu, 28 Sep 2017, Liu Hao wrote:
Colorized diagnostics used to be disabled for MinGW targets (on which
the macro `_WIN32` is defined), and this patch enables it.
I'd hope this is all to do with MinGW host, and nothing to do with the
target.
On 2017/9/28 7:37, JonY wrote:
Does it make sense to use a global lock in mingw_ansi_fputs?
I was thinking about a named Mutex object. Named Mutexes (as well as
Events and Semaphores) can be shared across processes, but there are
other considerations:
1. The name of the Mutex should base o
On 2017/9/28 4:09, Joseph Myers wrote:
On Thu, 28 Sep 2017, Liu Hao wrote:
Colorized diagnostics used to be disabled for MinGW targets (on which
the macro `_WIN32` is defined), and this patch enables it.
I'd hope this is all to do with MinGW host, and nothing to do with the
target.
O
d this function in a separated
target-specific file, which, actually, results in only undefined
references, since all target-specific object files precede `libcommon.a`
in the final linker command line.
* * * * * * * * * *
2017-09-28 Liu Hao
* gcc/pretty-print.c [_WIN32] (colorize
70 matches
Mail list logo