Message ID | 20220607204557.658541-22-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp5564539max; Tue, 7 Jun 2022 15:24:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiqRrJq2+zOy749mPLZiLk1/Hv2FDUPj+VOrGwlOU+PJSPD638DX/WagxU8z1gYyPZMCVG X-Received: by 2002:a05:622a:14cc:b0:2f3:d4c0:d53a with SMTP id u12-20020a05622a14cc00b002f3d4c0d53amr25010148qtx.68.1654640641367; Tue, 07 Jun 2022 15:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654640641; cv=none; d=google.com; s=arc-20160816; b=LCQ31Cw0lU5Yh985V7nc7kuD3v3lNypk17ffdAoiBsO5ByfMf5J90ubtvfjU261GCt yJK0HGf17JelZjCnmWM5gXqdATjG1D/1/OOOgEdvIR6sQnrEAJEyfxhWI1adDkhylO9G HsIfamEz97xOrnKUPk7Ssdit+7onDNXmorPxYIJ5PnBOvzrPWQLkP5kaoQ8R3UAb7MdG LvWZawaDOBmbedRJN4CqP1zG9OzK4/AOvtKKmwHno9LUdOj4JhjXYIFSpAPmR+9QWd9B JCLvnPTWrgoeSfaSkQ7Pxx1z1d27E7v/lo6noTQH2cuMtq2lkCp+phg99v9KwysWqbyS g0Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=97oCc36lcB1BPvxIKIrtIrCafpxgp+n+HDsHM7STsDo=; b=paqkLMzDfF8ErE3UhtYLbdMZUs57GpkhQFfPKH2AOm8HAAvp+nmWhz8eGDyzSd+v87 hETDjUtKrlPSHjvmf/lGk9JLpgSMrwqBLRlaxzMUzBxqr3TlEUc3jvvNYyrH5fd6g8tt N3gSc74PHRtH5c14ZxgVyX/aZhWFMVZO5c3p8WtTnYJvm8aTtATZMgu+mYT4OjnADErG 0BnbFuxRparYdOsXahMkOzC8EH1ZxHTBXmwPKQr3QHbW+B5orVTrcOvWW9LEFp7HLqJq ng+Fh+97H0sEAwOnPqUuRNGGewpy+wEMeWSL9XzREE2PqdOn8lzWvY6XXbT6/ltCfuzU Epzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yCKb9adg; 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 Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q21-20020a05622a031500b002fbff356b08si190981qtw.174.2022.06.07.15.24.01 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jun 2022 15:24:01 -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=yCKb9adg; 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 Received: from localhost ([::1]:38304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1nyhcG-0007PO-TN for patch@linaro.org; Tue, 07 Jun 2022 18:24:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nyg5k-0007Gq-NV for qemu-devel@nongnu.org; Tue, 07 Jun 2022 16:46:23 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:45667) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1nyg5j-0001Ol-5y for qemu-devel@nongnu.org; Tue, 07 Jun 2022 16:46:20 -0400 Received: by mail-pf1-x433.google.com with SMTP id b135so16505623pfb.12 for <qemu-devel@nongnu.org>; Tue, 07 Jun 2022 13:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=97oCc36lcB1BPvxIKIrtIrCafpxgp+n+HDsHM7STsDo=; b=yCKb9adgUi6AZH33vd+4TvNRdEzeOCQ1mPCrFK3GKa3Z0CJFu0wKrvk19tH/cth8yS OFj5OmAo92jH8HkVY+loDtFTAzb92IyWbndp9iNHApF0rdGNmv2hY43SsZcbHyEH/uJy BWh4mCTxhZb3PFd8CdnnO9hNXKEPKqVaoScr4p6yNz4Ihb0W+3wkpcEHCTw9P08U8iWh XChWeemHzgPgUEvuFZNZLoxLiOm787cJrGxkqe/kn8wDdBg6pyYdMMeXutrxzUKC+nYR YWgpC+FOakGLa6T7P952H/H2eCS2gzZs+wNir0cbgpMVXH4Q1GAqzwd8TKx//HBpCBcw mFyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=97oCc36lcB1BPvxIKIrtIrCafpxgp+n+HDsHM7STsDo=; b=PDFx3L5tSyIfioYdr4Xf5seKQieduK3N1AmjFoGzCw8SmFfvsLYzBveTT1P3tAfVkg kFl9Hpf9RhSvIiaBTbo26aFeJRfxGk5SFrysDHvx2oZ3hblN4Cx7e17fMwadI2hhucw4 P+8YcLTVKEJC4ym7kppdPS2E5xIXGjb7Jad0AQ8Hju069l/iD45GgycqTrsVxM2ZnlD8 /7LsqlfeNGNx3jXJ1ysOY/2WNrKnNQxG/3It267+oz6cVw7YkSAP/TV7Qx8sz65EZArR g6Fd0rOIeqnmMR7lCRYXO2GFGHFfRyK5kNWUvcCsdJtuDYddu8zTYpApj7AmolepjfVx garw== X-Gm-Message-State: AOAM530URLjyjRLZnRCXKXlXTJAd+2FYnCTOvPt34UtmrU/gz0sBPmPt lGFMVlRHgO6DNcOe7lYB/2qpfha/8oQqHg== X-Received: by 2002:a63:f312:0:b0:3fd:12b7:193b with SMTP id l18-20020a63f312000000b003fd12b7193bmr21855777pgh.9.1654634777892; Tue, 07 Jun 2022 13:46:17 -0700 (PDT) Received: from stoup.. ([2602:ae:1547:e101:3cf2:c634:5b19:25f6]) by smtp.gmail.com with ESMTPSA id r6-20020a170902be0600b00162037fbacdsm12971279pls.187.2022.06.07.13.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 13:46:17 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Alistair Francis <alistair.francis@wdc.com> Subject: [PATCH v4 21/53] semihosting: Split is_64bit_semihosting per target Date: Tue, 7 Jun 2022 13:45:25 -0700 Message-Id: <20220607204557.658541-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607204557.658541-1-richard.henderson@linaro.org> References: <20220607204557.658541-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
semihosting cleanup
|
expand
|
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index a9e488886a..d2ce214078 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -213,6 +213,10 @@ common_semi_sys_exit_extended(CPUState *cs, int nr) return (nr == TARGET_SYS_EXIT_EXTENDED || is_a64(cs->env_ptr)); } +static inline bool is_64bit_semihosting(CPUArchState *env) +{ + return is_a64(env); +} #endif /* TARGET_ARM */ #ifdef TARGET_RISCV @@ -238,6 +242,10 @@ common_semi_sys_exit_extended(CPUState *cs, int nr) return (nr == TARGET_SYS_EXIT_EXTENDED || sizeof(target_ulong) == 8); } +static inline bool is_64bit_semihosting(CPUArchState *env) +{ + return riscv_cpu_mxl(env) != MXL_RV32; +} #endif /* @@ -587,17 +595,6 @@ static const GuestFDFunctions guestfd_fns[] = { * call if the memory read fails. Eventually we could use a generic * CPUState helper function here. */ -static inline bool is_64bit_semihosting(CPUArchState *env) -{ -#if defined(TARGET_ARM) - return is_a64(env); -#elif defined(TARGET_RISCV) - return riscv_cpu_mxl(env) != MXL_RV32; -#else -#error un-handled architecture -#endif -} - #define GET_ARG(n) do { \ if (is_64bit_semihosting(env)) { \