From patchwork Thu Oct 3 23:41:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 832433 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp529150wra; Thu, 3 Oct 2024 16:44:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnsUKMXhzmLAAdawpi0Ue/DUuz35EOBzWhRemnhfDSLvbAEAIiNwBMhBNlmmHRNEb4CtJIJw==@linaro.org X-Google-Smtp-Source: AGHT+IE5w93k8Z5c6iI6lSb0R5Qk2i0RUo//fqWUN1IEXZcKswkqHHMKcYaoeoz8ieR3QayJzRrW X-Received: by 2002:a05:620a:2586:b0:7a4:dff8:35d5 with SMTP id af79cd13be357-7ae67e899c6mr739751685a.33.1727999050464; Thu, 03 Oct 2024 16:44:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727999050; cv=none; d=google.com; s=arc-20240605; b=bCo/PEb0UgIUrJY67p8wPIEtKMV06Js1cnEsnVk4mdBvpmNoSU10FQxx6V3dtz2ac9 ctdD+/wpzO1CzvUVUeiL8317cMHWrSJR/nT7W/TKb0KGqr/ivWa0AIZINPGpDXJaZ+iz K1uDxYTQP6x8zxvFP7zotG9BVSxhgkKBvnPQ3qW8yer9nMr0u8UkbiASI+I7dM0A37wj yP6QAusfCuO+TZI3BTOmK/+w0EMcc5c85yo5dKGfd3nYZAktI96gpqoPF7Wqhy59KEzv 5614e3agazTPlnzYLCIlg0d+S3ywovxRWL1kSd/3inLq4Pn1AF943+vq4FWzdmGuDHW7 IhYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=A2b2LwHBDDNlQ4lpraog9QbauHHDsoDaj9FTLQzChw4=; fh=nW81HitAWvlF9bIdfU4jFbnEE30qf0mnop6z+LPTekQ=; b=L0S3CSH5CQEbSAhL1XkARpZHyumH5NTaS+OCIaRP5lRm6rEvvVODq5eV6Gw7hpW0Pw XR/HpkrqcIzBBgcCKd/+zIo/+JmGptI9rQw2+4FRCzlc1ipfUxdqibSX8w94VoHDvdVA Lu0kgt8eMcJkyE7CSq5xeYSWzQCKh/I/FlepuUJnwudCCEB+F9UJ2npXR4Dq8shb118i oosRZ/GZStnEY7YbNjXjVFTYadf9fNkOw12LCg2xloaTopZv/5jzCNz837xi1ggF1c+Y bgoykV3AdWV/FxmbJThpIJeVqNUwKEPHkXW6yOb8kUEL0bb88W9F3tQBjbqHVw/OYE6D aqHw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dv6K9vlH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ae6bb05dd0si203854485a.623.2024.10.03.16.44.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Oct 2024 16:44:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dv6K9vlH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swVT7-0007R6-5C; Thu, 03 Oct 2024 19:42:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swVT3-0007PV-EK for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:42:45 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swVT1-0003Xc-VK for qemu-devel@nongnu.org; Thu, 03 Oct 2024 19:42:45 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42cbc22e1c4so12169225e9.2 for ; Thu, 03 Oct 2024 16:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727998962; x=1728603762; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A2b2LwHBDDNlQ4lpraog9QbauHHDsoDaj9FTLQzChw4=; b=Dv6K9vlHkdK0ZrufRyplTCH1bPArT/8GdAbHw5Xr7QwQqTAzTF7ObyfqtnbQF5FS8W dk1NlJouizbAl/AuU1TTSjYZJu/3cHCxReWxyGspBlR6p8YwmJhzD3U8sZSSalT0WJXK xphsrmmdY5Fdj1V1mMpR/4xZVZTBb06hFrEYwzF+HNzceqM4FJacKToZ3PytVr4WtY3c F0UKU/KhrkmSgo+T2xPBWQl7G4IZF7D185mV8dp8Z+WWG68WzHCgvG58SXSRfTvibawk BmDxTYKEkO8S1yWkb0JY4I6bzJ7RuhvGuF6/nRFrRTL19DnT2r6irP/jWJLnZfai/+v2 Myig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727998962; x=1728603762; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A2b2LwHBDDNlQ4lpraog9QbauHHDsoDaj9FTLQzChw4=; b=rK7BCS64L9tG+1xGMq72N0KSPzUvdksbKwqlMhzQED6Tj2JePdpZUUyKl5UNzlDF/1 5gpHOfqMuTinSkoQQAS+8O+wphVD7PQLRb3Z6BnDoqs1iRiQlKyhToArpVmOxNMI5M9t 1163O0UgqcfGbbXvopoidstk7GN53r1lmg9Y4pTlOLKzNb3JnjpApAZy3torCacwjTbD UxURDWPH4EaKB1VYTfB4zM7JQUyJDbfdLIKZduPX59IsC1w/p+Ra3QwpMXMK8fRap+mD htaQrD6gIuXODB+H2BMAASyi2WBrroAalC0Q7PQdRf8uR6VqPrbrnkIqb1iiNOniI5il Y+BQ== X-Gm-Message-State: AOJu0YxZpz80fkPrW0OkwhQfAKqxtVpWwm2mFADRFS3bAJqvg0MPlJm2 6K7pvAbf4HGXiMaixdHpPRKWNdRsTbD4klDX4kFTe3euZiNltF1M7JvlLV47gn3/xeufwKk+J3p oIPM= X-Received: by 2002:adf:fe8a:0:b0:37c:ccfc:92c0 with SMTP id ffacd0b85a97d-37d0eb1b83emr472244f8f.57.1727998962052; Thu, 03 Oct 2024 16:42:42 -0700 (PDT) Received: from localhost.localdomain (45.red-88-29-191.dynamicip.rima-tde.net. [88.29.191.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d07fde1fesm2201806f8f.0.2024.10.03.16.42.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Oct 2024 16:42:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Michael Rolnik , Halil Pasic , Christian Borntraeger , Mark Cave-Ayland , Frederic Konrad , Artyom Tarasenko , Matthew Rosato , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , David Hildenbrand , Peter Xu , Ilya Leoshkevich , Song Gao , Thomas Huth , Marcel Apfelbaum , Eduardo Habkost , qemu-s390x@nongnu.org, Laurent Vivier , Eric Farman , =?utf-8?q?Cl=C3=A9ment_Chigot?= , Paolo Bonzini , "Michael S. Tsirkin" , Thomas Huth , Bastian Koppelmann , Richard Henderson , Pierrick Bouvier Subject: [PATCH 03/16] linux-user/i386: Use explicit little-endian LD/ST API Date: Fri, 4 Oct 2024 01:41:58 +0200 Message-ID: <20241003234211.53644-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241003234211.53644-1-philmd@linaro.org> References: <20241003234211.53644-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The x86 architecture uses little endianness. Directly use the little-endian LD/ST API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- linux-user/i386/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/i386/signal.c b/linux-user/i386/signal.c index cb90711834f..0f11dba831f 100644 --- a/linux-user/i386/signal.c +++ b/linux-user/i386/signal.c @@ -754,8 +754,8 @@ static bool restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc) env->eip = tswapl(sc->rip); #endif - cpu_x86_load_seg(env, R_CS, lduw_p(&sc->cs) | 3); - cpu_x86_load_seg(env, R_SS, lduw_p(&sc->ss) | 3); + cpu_x86_load_seg(env, R_CS, lduw_le_p(&sc->cs) | 3); + cpu_x86_load_seg(env, R_SS, lduw_le_p(&sc->ss) | 3); tmpflags = tswapl(sc->eflags); env->eflags = (env->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);