public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: fix or delete a few comments to drop 32 bit references
@ 2022-07-14 18:09 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-07-14 18:09 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1f962581ffb5255121922cd93dec1fa9a06406d9
commit 1f962581ffb5255121922cd93dec1fa9a06406d9
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Jul 14 18:32:53 2022 +0200
Cygwin: fix or delete a few comments to drop 32 bit references
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/autoload.cc | 5 ++---
winsup/cygwin/exceptions.cc | 9 ++++-----
winsup/cygwin/fhandler.cc | 2 +-
winsup/cygwin/heap.cc | 15 ++++++++-------
winsup/cygwin/mmap.cc | 1 -
winsup/cygwin/mtinfo.h | 5 ++---
winsup/cygwin/syscalls.cc | 4 ----
7 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 8ab42d3e5..60171e889 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -35,8 +35,7 @@ bool NO_COPY wsock_started;
* the call. If this is an odd value then this
* is a flag that non-existence of this function
* is not a fatal error
- * func addr (8 bytes) (64 bit ONLY!)
- * Address of the actual Win32 function. For the
+ * func addr (8 bytes) Address of the actual Win32 function. For the
* reason why this is necessary, see the below
* description of the load_state.
* func name (n bytes) asciz string containing the name of the function
@@ -49,7 +48,7 @@ bool NO_COPY wsock_started;
* gets the process's load address, changes the contents
* here to point to the function address, and changes
* the address argument of the initial jmp call.
- * On 64 bit, the jmp is not tweaked directly. Rather,
+ * On x86_64, the jmp is not tweaked directly. Rather,
* the address of the Win32 function is stored in the
* aforementioned Win32 function address slot and fetched
* there for a jmp *%rax call. This indirection is
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index dd4f0f075..5a154c35b 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1649,10 +1649,9 @@ _cygtls::call_signal_handler ()
NOTE:
We DO NOT change the TEB's stack addresses and we DO NOT move the
- _cygtls area to the alternate stack. This seems to work fine on
- 32 and 64 bit, but there may be Windows functions not working
- correctly under these circumstances. Especially 32 bit exception
- handling may be broken.
+ _cygtls area to the alternate stack. This seems to work fine,
+ but there may be Windows functions not working correctly under
+ these circumstances.
On the other hand, if a Windows function crashed and we're handling
this here, moving the TEB stack addresses may be fatal.
@@ -1752,7 +1751,7 @@ _cygtls::signal_debugger (siginfo_t& si)
if (incyg)
c._CX_instPtr = retaddr ();
memcpy (&context.uc_mcontext, &c, sizeof (CONTEXT));
- /* Enough space for 32/64 bit addresses */
+ /* Enough space for 64 bit addresses */
char sigmsg[2 * sizeof (_CYGWIN_SIGNAL_STRING
" ffffffff ffffffffffffffff")];
__small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %d %y %p",
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 5671fea3c..9d6d01858 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1504,7 +1504,7 @@ fhandler_dev_null::fhandler_dev_null () :
ssize_t
fhandler_dev_null::write (const void *ptr, size_t len)
{
- /* Shortcut. This also fixes a problem with the NUL device on 64 bit:
+ /* Shortcut. This also fixes a problem with the NUL device on x86_64:
If you write > 4 GB in a single attempt, the bytes written returned
from by is numBytes & 0xffffffff. */
return len;
diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc
index fbec7d499..14c42e45c 100644
--- a/winsup/cygwin/heap.cc
+++ b/winsup/cygwin/heap.cc
@@ -29,13 +29,14 @@ static ptrdiff_t page_const;
static uintptr_t
eval_start_address ()
{
- /* On 64 bit, we choose a fixed address outside the 32 bit area. The
- executable starts at 0x1:00400000L, the Cygwin DLL starts at
- 0x1:80040000L, other rebased DLLs are located in the region from
- 0x2:00000000L up to 0x4:00000000L, -auto-image-based DLLs are located
- in the region from 0x4:00000000L up to 0x6:00000000L. Thread stacks
- are located in the region from 0x6:00000000L up to 0x8:00000000L.
- So the heap starts at 0x8:00000000L. */
+ /* We choose a fixed address outside the low 32 bit arena, which is
+ exclusively used by the OS now:
+ - The executable starts at 0x1:00400000L
+ - The Cygwin DLL starts at 0x1:80040000L
+ - Rebased DLLs are located from 0x2:00000000L up to 0x4:00000000L
+ - auto-image-based DLLs are located from 0x4:00000000L up to 0x6:00000000L
+ - Thread stacks are located from 0x6:00000000L up to 0x8:00000000L.
+ - So the heap starts at 0x8:00000000L. */
uintptr_t start_address = 0x800000000L;
return start_address;
}
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 0c70d66f0..4f383627a 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -284,7 +284,6 @@ class mmap_record
LIST_ENTRY (mmap_record) mr_next;
private:
- /* 4 byte on 32 bit, 8 byte on 64 bit */
HANDLE mapping_hdl;
SIZE_T len;
caddr_t base_address;
diff --git a/winsup/cygwin/mtinfo.h b/winsup/cygwin/mtinfo.h
index d99cd2ef2..03aabbfd0 100644
--- a/winsup/cygwin/mtinfo.h
+++ b/winsup/cygwin/mtinfo.h
@@ -63,9 +63,8 @@ class mtinfo_drive
lock_state lock;
TAPE_GET_DRIVE_PARAMETERS _dp;
TAPE_GET_MEDIA_PARAMETERS _mp;
- /* sizeof(OVERLAPPED) == 20 on 32 bit, 32 on 64 bit. A drive is always
- opened exclusively by a single process, though, so instead of the
- OVERLAPPED structure, we just keep track of the pointer to the
+ /* A drive is always opened exclusively by a single process, so instead
+ of the OVERLAPPED structure, we just keep track of the pointer to the
OVERLAPPED structure in the application's fhandler. */
LPOVERLAPPED ov;
struct status_flags
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 4c7de57c3..da8779743 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -4175,10 +4175,6 @@ gethostid (void)
{
/* Fetch the globally unique MachineGuid value from
HKLM/Software/Microsoft/Cryptography and hash it. */
-
- /* Caution: sizeof long might become > 4 when we go 64 bit, but gethostid
- is supposed to return a 32 bit value, despite the return type long.
- That's why hostid is *not* long here. */
int32_t hostid = 0x40291372; /* Choose a nice start value */
WCHAR wguid[38];
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-14 18:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 18:09 [newlib-cygwin] Cygwin: fix or delete a few comments to drop 32 bit references Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).