From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id E79A53858D1E for ; Mon, 10 Apr 2023 19:13:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E79A53858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-x22c.google.com with SMTP id r14so30152479oiw.12 for ; Mon, 10 Apr 2023 12:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681153997; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nFZmT7Vsg6LQD1LYw8xA8Cp+AN9QfgshDJKeB48wqyk=; b=c/yJ1Cjkpc1aydH9MChbKIzstYjFtTycRm7KwaIem4OOUMnkH3dYHY39UFL9WSBFtH 5yCBqCjM66Bggb0OsXzbp32iviiHNa8AZ2R9KpPwOGd4kmWj2sVJUPU5bMDZl7pbhFDK 6pMeqhTydWFvjUF7UF55kwctc8ke9eHrxjeDnv8eX7wXyzqx+dTXq7SoYK6DB1IkcR7j 0qtj2pLE2YoNNnM7Kpnf5O1QDia624DaXUQmzs+ZD3UPctTGPJJOZijezVvyh6npwvdq a/0M271S+jvliBEiYbVOAsfvj9fTqBg3yZ2cy1L0bpzUWDDIWYi5Chi2WVJRl+/mGCNJ b6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681153997; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nFZmT7Vsg6LQD1LYw8xA8Cp+AN9QfgshDJKeB48wqyk=; b=w8HwUHsIU8a37Mt72ZpuHQJUpd3dgy6yjBZHkf1okEirf6SEtUmmdpI5i1o4iQmIlf C7kL4PHO9QORWHmFEkd9/A2iWjAebZxsgr4Muoyv8/I4Edj2H/QJDU18QHfOX1LjZR/q 8nMUC6BxnTaIG5fCWTZUkmRVwYcrZtsoa1Di3oUoAnCVMuwYVsm0POErqtKi6p63hMh/ H9UjDBjPweujrhQmcKm6oA8+rT9oFQiv/syCw5zfSdnYo/7TN2Pq8WVrBcfS+bfusjAZ hagvG0NSC+Gt4sFcsteTcxSnjefBAeQytRBYt93FE6NItNeLwRd+8ioyNI2rVKF176Hb BaPw== X-Gm-Message-State: AAQBX9cMFFXaumkTS9SAwUf/vuxDesc1PL6IsuCGWeaUbritHw2y9Srl 3EyH+CVQyIbIwm0oKTHbT/pRJ/avLrL3y90/9XyAfEu9dxSG0A== X-Google-Smtp-Source: AKy350ZuWr9qtvPZE+0MBM2R5iiFckc+iGbDYAmA4qcj978kDrD3EjdyeydzdhY8sIPCgVbfI2I7huF53HpUtE8aXVg= X-Received: by 2002:a54:450b:0:b0:386:d8a5:d80b with SMTP id l11-20020a54450b000000b00386d8a5d80bmr1553088oil.4.1681153996930; Mon, 10 Apr 2023 12:13:16 -0700 (PDT) MIME-Version: 1.0 References: <20230319151017.531737-1-bugaevc@gmail.com> <20230319151017.531737-17-bugaevc@gmail.com> <20230410185814.rjqm46ndc4pjvoac@begin> In-Reply-To: <20230410185814.rjqm46ndc4pjvoac@begin> From: Sergey Bugaev Date: Mon, 10 Apr 2023 22:13:06 +0300 Message-ID: Subject: Re: [RFC PATCH glibc 16/34] hurd: Add sys/ucontext.h and sigcontext.h for x86_64 To: Samuel Thibault Cc: libc-alpha@sourceware.org, bug-hurd@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Apr 10, 2023 at 9:58=E2=80=AFPM Samuel Thibault wrote: > > Sergey Bugaev, le dim. 19 mars 2023 18:09:59 +0300, a ecrit: > > +#ifdef __USE_GNU > > +/* Number of each register in the `gregset_t' array. */ > > +enum > > +{ > > + REG_GSFS =3D 0, /* Actually int gs, fs. */ > > +# define REG_GSFS REG_GSFS > > + REG_ESDS, /* Actually int es, ds. */ > > +# define REG_ESDS REG_ESDS > > On second thought, why REG_ESDS? They are basically useless on amd64 > > Linux packs all segment registers in REG_CSGSFS, probably better to > stuff them the same way? (all three really are 16bit only, even if the > thread_state is padding them to 32bits). Exactly because that's how they are laid out in struct i386_thread_state, if you count in 8-byte chunks. Look at how these REG_* definitions are used in fill_ucontext () in trampoline.c (that's the one, not hursig.c like my previous message said). Sergey