From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bodoj-00039p-UW for qemu-devel@nongnu.org; Mon, 26 Sep 2016 17:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bodof-0007qt-Qu for qemu-devel@nongnu.org; Mon, 26 Sep 2016 17:52:04 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bodof-0007qm-KZ for qemu-devel@nongnu.org; Mon, 26 Sep 2016 17:52:01 -0400 Received: by mail-pa0-f68.google.com with SMTP id oz2so9273836pac.0 for ; Mon, 26 Sep 2016 14:52:01 -0700 (PDT) Sender: Richard Henderson References: From: Richard Henderson Message-ID: <0449a076-94e6-9b4f-5468-fcc602293521@twiddle.net> Date: Mon, 26 Sep 2016 14:50:58 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/18] target-riscv: Add RISC-V Target stubs inside target-riscv/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sagar Karandikar , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, kbastian@mail.uni-paderborn.de On 09/26/2016 03:56 AM, Sagar Karandikar wrote: > +typedef struct CPURISCVState CPURISCVState; > +struct CPURISCVState { > + target_ulong gpr[32]; > + uint64_t fpr[32]; /* assume both F and D extensions */ > + target_ulong PC; > + target_ulong load_res; > + > + target_ulong csr[4096]; /* RISCV CSR registers */ This is 16k for 32-bit, and 32k for 64-bit, most of which is unused. I think it would be better to add only the CSRs that you actually need for the implementation. r~