From patchwork Sun Jun 10 03:00:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 138082 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2576978lji; Sat, 9 Jun 2018 20:08:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLxY+eHh/GiY3ogQSqg7uQeZj4zy+1tz+3VAP+ueSoBtOUTGyNOy97DoELT3U+hwwD2VkNN X-Received: by 2002:a0c:b176:: with SMTP id r51-v6mr10755551qvc.45.1528600107650; Sat, 09 Jun 2018 20:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528600107; cv=none; d=google.com; s=arc-20160816; b=c6O+5GpsxWegak5Nl3ue/VxjvFs2hKu508uP8AtEpf281ccNd9JwIfOn35wM8N5Ryf 6jYK2krDpTcKmJvc3eMR1UITJ5ffXiJVqix5STb99xR9yO4hZ0lWp9kuYSMwEROsyHOc Hs6SYwbwSpCghJ6ltzLJ/yHiyrWTg5wUABj11X9dfedyBWuGObs49MNylMQELpnsqxGn hsOtxGFysIC9Okl3in0TLOUUlPXbbIH/G5kp7qDp/BjgFPDCOn571EiA3Yw7QHTht0E9 h2Arf7osJZR7Dld+cBu3b6Kp4d3Dji3vyiOCPhapO0YqzoxW4jvn4O87na0LmHTFZJP+ Y6aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=Jy8MfblGP5Ozmd8tz3QroxD7XAKcI8f15FrpZDq8KEE=; b=tupMqb04jdTmvdh2R4BlQDLY8UAH9ZxLY5ORW9FWDPwb7LNYoPToM7o5viK1jrXM74 15D+9p81ISA9eY7LROx+93fOiQ1u0L3L4+5hsG3J3D/idddbbAhU6v3J6OhkExbNOLsJ 6hk7lxvFdUylxaRBjXlqxwScMW6hceEGmtpHlfisJo3tUAsfpf7EOQ0Q/Uh7+UaWmIfY n+Brb96fESVR1kbmpYSlcu+1WbQc1lDuxmG6lapGiTZROQI7smeRUw+KcrBDPJioxlcI DlMA+E/KZCBI4xpj3bfNUA0d+7kapxpess/1hchBPI/i6bI/BA/35k+9oKT9JguPAnNO OdKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BmX6GPPY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id h7-v6si4803807qvj.54.2018.06.09.20.08.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 09 Jun 2018 20:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BmX6GPPY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqiR-0006tr-3r for patch@linaro.org; Sat, 09 Jun 2018 23:08:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRqcw-0001f5-F3 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRqcv-0003BR-HD for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:46 -0400 Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]:35257) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRqcv-0003BB-C6 for qemu-devel@nongnu.org; Sat, 09 Jun 2018 23:02:45 -0400 Received: by mail-pg0-x231.google.com with SMTP id 15-v6so8138103pge.2 for ; Sat, 09 Jun 2018 20:02:45 -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; bh=Jy8MfblGP5Ozmd8tz3QroxD7XAKcI8f15FrpZDq8KEE=; b=BmX6GPPYQ5qjlmX5KhonkvmlYlF1K0egps2IE/WSwQaNbiK+YBT9udp/i6RSJRF02e fO66KM6RVuKrrTtk7Pt8nxgsSs398NF67Ik2SoYjnu6BUV/1ISGKxDalzfgXwZLndlZv 1MMp6NA2U+XXijW+VLgOlfFTjZujKE0O8nbGI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jy8MfblGP5Ozmd8tz3QroxD7XAKcI8f15FrpZDq8KEE=; b=IQ+2vHdvLoMEkQeNN3uhT0rClRIdJy3ehoNB2RGRyTpX3IrK0XKWui0jFO/BFWfz2E faT3v3DjF2X2soW1ZsYaT1+e2hvY3REPhsYhaVgXpsbPwETPnv8DYrUvGnz7Jt2aDM/J ylGHyWJE8wlrlw2ZdnIzl2GrZitOH2V8eOA6cv1rsA7hXG4BZ3ktMEd0AmOqWu/0YVpy yQ5X1u6HpdbQ4FwQgIPIIea++7ytKvwLtja4iDpRkZFHQNMHa0dYwehwHz6Ff6edsMnP Pyubv0r90QcImWs42jxiHvSVNr3ygn9RyQrAP6EMDrm9Litvq3jNauwiyanaTpbC6gf+ DeUw== X-Gm-Message-State: APt69E0BDSgKbJlnZGPsMBkEpdY8/yyHnj5K3ZXjlceGb9QdOewNsrqo TfhLP3PpvZ8EjJX6TdGaxmBN4Wa7oyM= X-Received: by 2002:a62:3c15:: with SMTP id j21-v6mr12214899pfa.7.1528599764038; Sat, 09 Jun 2018 20:02:44 -0700 (PDT) Received: from cloudburst.twiddle.net (rrcs-173-198-77-219.west.biz.rr.com. [173.198.77.219]) by smtp.gmail.com with ESMTPSA id y17-v6sm31712718pfe.33.2018.06.09.20.02.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Jun 2018 20:02:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 9 Jun 2018 17:00:40 -1000 Message-Id: <20180610030220.3777-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180610030220.3777-1-richard.henderson@linaro.org> References: <20180610030220.3777-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::231 Subject: [Qemu-devel] [PATCH v2 008/108] linux-user: Make syscall number unsigned X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/qemu.h | 2 +- linux-user/syscall.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) -- 2.17.1 diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 6fa1e968db..c628a5a05c 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -201,7 +201,7 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, void target_set_brk(abi_ulong new_brk); abi_long do_brk(abi_ulong new_brk); void syscall_init(void); -abi_long do_syscall(void *cpu_env, int num, abi_long arg1, +abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fd8d48b0da..46f123ee13 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -719,20 +719,20 @@ static inline int next_free_host_timer(void) /* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */ #ifdef TARGET_ARM -static inline int regpairs_aligned(void *cpu_env, int num) +static inline int regpairs_aligned(void *cpu_env, unsigned num) { return ((((CPUARMState *)cpu_env)->eabi) == 1) ; } #elif defined(TARGET_MIPS) && (TARGET_ABI_BITS == 32) -static inline int regpairs_aligned(void *cpu_env, int num) { return 1; } +static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; } #elif defined(TARGET_PPC) && !defined(TARGET_PPC64) /* SysV AVI for PPC32 expects 64bit parameters to be passed on odd/even pairs * of registers which translates to the same as ARM/MIPS, because we start with * r3 as arg1 */ -static inline int regpairs_aligned(void *cpu_env, int num) { return 1; } +static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; } #elif defined(TARGET_SH4) /* SH4 doesn't align register pairs, except for p{read,write}64 */ -static inline int regpairs_aligned(void *cpu_env, int num) +static inline int regpairs_aligned(void *cpu_env, unsigned num) { switch (num) { case TARGET_NR_pread64: @@ -744,9 +744,9 @@ static inline int regpairs_aligned(void *cpu_env, int num) } } #elif defined(TARGET_XTENSA) -static inline int regpairs_aligned(void *cpu_env, int num) { return 1; } +static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; } #else -static inline int regpairs_aligned(void *cpu_env, int num) { return 0; } +static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 0; } #endif #define ERRNO_TABLE_SIZE 1200 @@ -7952,7 +7952,7 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask, * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_. */ -static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8) @@ -12412,7 +12412,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } -abi_long do_syscall(void *cpu_env, int num, abi_long arg1, +abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6, abi_long arg7, abi_long arg8)