Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Fix x86-64 build
@ 2002-11-11  8:00 Andrew Cagney
  2002-11-11  8:09 ` Michal Ludvig
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cagney @ 2002-11-11  8:00 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 103 bytes --]

Hello,

This quick hack gets around my x86-64 build problem that MarkK pointed out.

Committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 963 bytes --]

2002-11-11  Andrew Cagney  <ac131313@redhat.com>

	* x86-64-tdep.c (i386_fp_regnum_p): Copy i386-tdep.c's
	i386_fp_regnum_p.

Index: gdb/x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.36
diff -u -r1.36 x86-64-tdep.c
--- gdb/x86-64-tdep.c	2 Nov 2002 14:59:10 -0000	1.36
+++ gdb/x86-64-tdep.c	11 Nov 2002 15:49:47 -0000
@@ -175,6 +175,15 @@
   return *x86_64_register_info_table[regno].type;
 }
 
+/* FIXME: cagney/2002-11-11: Once the i386 and x86-64 targets are
+   merged, this function can go away.  */
+int
+i386_fp_regnum_p (int regnum)
+{
+  return (regnum < NUM_REGS
+	  && (FP0_REGNUM && FP0_REGNUM <= (regnum) && (regnum) < FPC_REGNUM));
+}
+
 /* x86_64_register_convertible is true if register N's virtual format is
    different from its raw format.  Note that this definition assumes
    that the host supports IEEE 32-bit floats, since it doesn't say

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Fix x86-64 build
  2002-11-11  8:00 [patch] Fix x86-64 build Andrew Cagney
@ 2002-11-11  8:09 ` Michal Ludvig
  2002-11-15 16:12   ` [patch] Add i386_sse_regnum_p() to x86-64-linux-nat..c; Was: " Andrew Cagney
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Ludvig @ 2002-11-11  8:09 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb-patches

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'

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [patch] Add i386_sse_regnum_p() to x86-64-linux-nat..c; Was: [patch] Fix x86-64 build
  2002-11-11  8:09 ` Michal Ludvig
@ 2002-11-15 16:12   ` Andrew Cagney
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cagney @ 2002-11-15 16:12 UTC (permalink / raw)
  To: Michal Ludvig; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

> 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


[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 925 bytes --]

2002-11-15  Andrew Cagney  <cagney@redhat.com>

	* 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-16  0:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11  8:00 [patch] Fix x86-64 build Andrew Cagney
2002-11-11  8:09 ` Michal Ludvig
2002-11-15 16:12   ` [patch] Add i386_sse_regnum_p() to x86-64-linux-nat..c; Was: " Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox