summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2008-03-04 19:49:39 +0000
committerJoel Brobecker <brobecker@gnat.com>2008-03-04 19:49:39 +0000
commit2fc63fd9b24c42c8ba7357ecd4aec96cb8ae6928 (patch)
treecbaf898a42cfb4593e346e9520766e04dc80d5b0
parent373a608f104bfc01837386015cd4fe9b9fb37f46 (diff)
downloadbinutils-gdb-2fc63fd9b24c42c8ba7357ecd4aec96cb8ae6928.tar.gz
* amd64-tdep.c (amd64_classify): Add support for decimal float
types. * i386-tdep.c (i386_return_value): Make 128-bit decimal float use the struct return convention.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/amd64-tdep.c14
-rw-r--r--gdb/i386-tdep.c10
3 files changed, 22 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 685d7c708c8..fdbeb322ccd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-03-04 Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ * amd64-tdep.c (amd64_classify): Add support for decimal float
+ types.
+ * i386-tdep.c (i386_return_value): Make 128-bit decimal float
+ use the struct return convention.
+
2008-02-29 Joel Brobecker <brobecker@adacore.com>
GDB 6.8 branch created (branch timestamp: 2008-02-26 10:00 UTC)
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index fae24a482ac..6cc82bb69d6 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -364,15 +364,19 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
&& (len == 1 || len == 2 || len == 4 || len == 8))
class[0] = AMD64_INTEGER;
- /* Arguments of types float, double and __m64 are in class SSE. */
- else if (code == TYPE_CODE_FLT && (len == 4 || len == 8))
+ /* Arguments of types float, double, _Decimal32, _Decimal64 and __m64
+ are in class SSE. */
+ else if ((code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
+ && (len == 4 || len == 8))
/* FIXME: __m64 . */
class[0] = AMD64_SSE;
- /* Arguments of types __float128 and __m128 are split into two
- halves. The least significant ones belong to class SSE, the most
+ /* Arguments of types __float128, _Decimal128 and __m128 are split into
+ two halves. The least significant ones belong to class SSE, the most
significant one to class SSEUP. */
- /* FIXME: __float128, __m128. */
+ else if (code == TYPE_CODE_DECFLOAT && len == 16)
+ /* FIXME: __float128, __m128. */
+ class[0] = AMD64_SSE, class[1] = AMD64_SSEUP;
/* The 64-bit mantissa of arguments of type long double belongs to
class X87, the 16-bit exponent plus 6 bytes of padding belongs to
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 83ae9d1dcc6..dc1202ee133 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1579,10 +1579,12 @@ i386_return_value (struct gdbarch *gdbarch, struct type *type,
{
enum type_code code = TYPE_CODE (type);
- if ((code == TYPE_CODE_STRUCT
- || code == TYPE_CODE_UNION
- || code == TYPE_CODE_ARRAY)
- && !i386_reg_struct_return_p (gdbarch, type))
+ if (((code == TYPE_CODE_STRUCT
+ || code == TYPE_CODE_UNION
+ || code == TYPE_CODE_ARRAY)
+ && !i386_reg_struct_return_p (gdbarch, type))
+ /* 128-bit decimal float uses the struct return convention. */
+ || (code == TYPE_CODE_DECFLOAT && TYPE_LENGTH (type) == 16))
{
/* The System V ABI says that: