From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21136 invoked by alias); 16 Nov 2002 00:12:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21127 invoked from network); 16 Nov 2002 00:12:39 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 16 Nov 2002 00:12:39 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7FA5E3E4B; Fri, 15 Nov 2002 19:12:38 -0500 (EST) Message-ID: <3DD58D76.1080704@redhat.com> Date: Fri, 15 Nov 2002 16:12:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: [patch] Add i386_sse_regnum_p() to x86-64-linux-nat..c; Was: [patch] Fix x86-64 build References: <3DCFD40C.9020906@redhat.com> <3DCFD648.1060203@suse.cz> Content-Type: multipart/mixed; boundary="------------070405020700090001040508" X-SW-Source: 2002-11/txt/msg00434.txt.bz2 This is a multi-part message in MIME format. --------------070405020700090001040508 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 413 > Andrew Cagney wrote: > > This quick hack gets around my x86-64 build problem that MarkK pointed out. > > Still not perfect... :-(( > > libgdb.a(x86-64-linux-nat.o)(.text+0x9cc): In function `x86_64_register_u_addr': > BFD_RELOC_IA64_LTOFF_FPTR64LSB/../../gdb/gdb/x86-64-linux-nat.c:473: undefined reference to `i386_sse_regnum_p' I've also checked this in (I thought someone would beat me too it). Andrew --------------070405020700090001040508 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 925 2002-11-15 Andrew Cagney * x86-64-linux-nat.c (i386_sse_regnum_p): New function. Copy from i386-tdep.c. Index: x86-64-linux-nat.c =================================================================== RCS file: /cvs/src/src/gdb/x86-64-linux-nat.c,v retrieving revision 1.17 diff -u -r1.17 x86-64-linux-nat.c --- x86-64-linux-nat.c 2 Nov 2002 14:59:10 -0000 1.17 +++ x86-64-linux-nat.c 16 Nov 2002 00:10:09 -0000 @@ -456,6 +456,17 @@ #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) #endif +/* SSE register? */ +/* FIXME: cagney/2002-11-15: Once the i386 and x86-64 are integrated, + this will go. */ + +int +i386_sse_regnum_p (int regnum) +{ + return (regnum < NUM_REGS + && (XMM0_REGNUM <= (regnum) && (regnum) < MXCSR_REGNUM)); +} + /* Return the address of register REGNUM. BLOCKEND is the value of u.u_ar0, which should point to the registers. */ CORE_ADDR --------------070405020700090001040508--