* amd64-tdep.c (amd64_sse_type): Remove.

(amd64_register_info): Use i386_eflags_type and i386_sse_type
where appropriate.
(AMD64_NUM_REGS): Use ARRAY_SIZE.
(amd64_register_type): Remove code to build amd_sse_type.
* i386-tdep.c (i386_eflag_type): New variable.
(i386_mmx_type, i386_sse_type): Make global.
(i386_init_types): New function.
(i386_build_mmx_type, i386_build_sse_type): Remove functions.
(i386_register_type): Return i386_eflag_type, i386_sse_type and
i386_mmx_type when appropriate.
(_initialize_i386_tdep): Call i386_init_types.
* i386-tdep.h (i386_eflags_type, i386_mmx_type, i386_sse_type):
Declare extern.
Based on a previous patch form Michal Ludvig:
This commit is contained in:
Mark Kettenis
2006-01-18 21:26:47 +00:00
parent 4f2aea11c7
commit 5ae96ec1ab
4 changed files with 119 additions and 102 deletions

View File

@@ -1,6 +1,7 @@
/* Target-dependent code for the i386.
Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
This file is part of GDB.
@@ -149,6 +150,11 @@ enum i386_regnum
/* Size of the largest register. */
#define I386_MAX_REGISTER_SIZE 16
/* Types for i386-specific registers. */
extern struct type *i386_eflags_type;
extern struct type *i386_mmx_type;
extern struct type *i386_sse_type;
/* Segment selectors. */
#define I386_SEL_RPL 0x0003 /* Requester's Privilege Level mask. */
#define I386_SEL_UPL 0x0003 /* User Privilige Level. */