From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21643 invoked by alias); 12 May 2002 15:25:29 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 21632 invoked from network); 12 May 2002 15:25:28 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 12 May 2002 15:25:28 -0000 Received: by fw-cam.cambridge.arm.com; id QAA26036; Sun, 12 May 2002 16:25:27 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma026007; Sun, 12 May 02 16:25:20 +0100 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [172.16.1.91]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id QAA01364; Sun, 12 May 2002 16:25:19 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id QAA02703; Sun, 12 May 2002 16:25:19 +0100 (BST) Message-Id: <200205121525.QAA02703@cam-mail2.cambridge.arm.com> To: Andrew Cagney cc: Richard.Earnshaw@arm.com, gdb@sources.redhat.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: ARM and virtual/raw registers In-reply-to: Your message of "Sun, 12 May 2002 11:07:18 EDT." <3CDE8526.5080302@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 12 May 2002 08:25:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-05/txt/msg00125.txt.bz2 > > However, in this situation, > > pseudo_rengo("r0") != regcache_regno("r0"), yet we effectively have > > > > REGSITER_RAW_SIZE (pseudo_regno ("r0")) > > and > > REGISTER_RAW_SIZE (regcache_regno ("r0")) > > Sorry, I still don't understand. In my view of things, the domain of the result returned by pseudo_regno() is 0..Num_pseudos, and the domain of regcache_regno() is 0..NUM_REGS But we have cases where the two functions return a different number for the same register; more precisely, we might encounter the situation where pseudo_regno ("int_reg0") == regcache_regno ("float_reg5") and clearly in this case one of these will give the wrong answer if used to call REGISTER_RAW_SIZE(). > Sorry, I still don't understand. Given pseudo-registers, the name of > the function ``register_raw_size'' is definitly overloaded. However, > per the patch very recently committed, the norm should now be: > register_raw_size() == register_virtual_size() == TYPE_LENGTH > (register_virtual_type()) (which makes them all badly named :-) This has nothing to do with the raw and virtual sizes being different, or the raw and virtual types being different. > Even more ruthless. Try a register layout of: > -- > raw normal r0..r15 > raw someothers > raw floats > raw bank r0..r15 > raw still more > -- > pseudo r0..r15 > mapped onto either normal or banked > pseudo floats > mapped onto floats > and so on, for instance, explict register names to identify normal and > banked r0. > -- > which completly separates the raw and pseudo registers. The function > register_name() becomes: > > if regnum < NUM_REGO > return ""; > else > return yourtable[regnum - NUM_REGS]; Hmm, not quite, I'm trying to bury the regcache even deeper than that... It simply does not exist to most of core-gdb, except by calling through arm_register_read(), which is the only function that knows how to map a regno onto its regcache entry. R. R.