summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2003-04-30 21:38:55 +0000
committerH.J. Lu <hjl@lucon.org>2003-04-30 21:38:55 +0000
commitfa09d77bd179ea8d9ee9c690273b35e156bf3a6f (patch)
tree2cd3e75e8051c7126525d5bf193316a0cd7bd991
parent3336ff43b3c930cd9d9dc31aa59e19a985c95216 (diff)
downloadbinutils-redhat-fa09d77bd179ea8d9ee9c690273b35e156bf3a6f.tar.gz
gas/
2003-04-30 H.J. Lu <hjl@gnu.org> * config/tc-ia64.c (stmt_float_cons): Fix alignment for real10 and add real16. (md_pseudo_table): Add "xreal16", "xreal16.ua", "real16" and "real16.ua". (md_atof): Add 6 byte padding of zero for real16. gas/testsuite/ 2003-04-29 H.J. Lu <hjl@gnu.org> * gas/ia64/ia64.exp: Add real. * gas/ia64/real.s: New file. * gas/ia64/real.d: Likewise.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-ia64.c26
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp2
-rw-r--r--gas/testsuite/gas/ia64/real.d10
-rw-r--r--gas/testsuite/gas/ia64/real.s8
6 files changed, 56 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3417eb236e..64d6df70b2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2003-04-30 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-ia64.c (stmt_float_cons): Fix alignment for real10
+ and add real16.
+ (md_pseudo_table): Add "xreal16", "xreal16.ua", "real16" and
+ "real16.ua".
+ (md_atof): Add 6 byte padding of zero for real16.
+
2003-04-29 Nick Clifton <nickc@redhat.com>
* config/obj-elf.c (obj_elf_symver): Skip whitespace before the
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 2a7b970319..13ff8a0b17 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -4410,19 +4410,25 @@ static void
stmt_float_cons (kind)
int kind;
{
- size_t size;
+ size_t alignment;
switch (kind)
{
- case 'd': size = 8; break;
- case 'x': size = 10; break;
+ case 'd':
+ alignment = 8;
+ break;
+
+ case 'x':
+ case 'X':
+ alignment = 16;
+ break;
case 'f':
default:
- size = 4;
+ alignment = 4;
break;
}
- ia64_do_align (size);
+ ia64_do_align (alignment);
float_cons (kind);
}
@@ -4899,6 +4905,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "xreal4", dot_xfloat_cons, 'f' },
{ "xreal8", dot_xfloat_cons, 'd' },
{ "xreal10", dot_xfloat_cons, 'x' },
+ { "xreal16", dot_xfloat_cons, 'X' },
{ "xstring", dot_xstringer, 0 },
{ "xstringz", dot_xstringer, 1 },
@@ -4909,6 +4916,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "xreal4.ua", dot_xfloat_cons_ua, 'f' },
{ "xreal8.ua", dot_xfloat_cons_ua, 'd' },
{ "xreal10.ua", dot_xfloat_cons_ua, 'x' },
+ { "xreal16.ua", dot_xfloat_cons_ua, 'X' },
/* annotations/DV checking support */
{ "entry", dot_entry, 0 },
@@ -4952,6 +4960,7 @@ pseudo_opcode[] =
{ "real4", stmt_float_cons, 'f' },
{ "real8", stmt_float_cons, 'd' },
{ "real10", stmt_float_cons, 'x' },
+ { "real16", stmt_float_cons, 'X' },
{ "string", stringer, 0 },
{ "stringz", stringer, 1 },
@@ -4963,6 +4972,7 @@ pseudo_opcode[] =
{ "real4.ua", float_cons, 'f' },
{ "real8.ua", float_cons, 'd' },
{ "real10.ua", float_cons, 'x' },
+ { "real16.ua", float_cons, 'X' },
};
/* Declare a register by creating a symbol for it and entering it in
@@ -10586,6 +10596,12 @@ md_atof (type, lit, size)
md_number_to_chars (lit, (long) (*word--), sizeof (LITTLENUM_TYPE));
lit += sizeof (LITTLENUM_TYPE);
}
+ if (type == 'X')
+ {
+ /* It is 10 byte floating point with 6 byte padding. */
+ memset (lit, 0, 6);
+ *size = 8 * sizeof (LITTLENUM_TYPE);
+ }
return 0;
}
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 381233ce73..fa65442813 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2003-04-30 H.J. Lu <hjl@gnu.org>
+
+ * gas/ia64/ia64.exp: Add real.
+
+ * gas/ia64/real.s: New file.
+ * gas/ia64/real.d: Likewise.
+
2003-04-29 Nick Clifton <nickc@redhat.com>
* gas/elf/elf.exp: Invoke symver test.
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index 88ed2cfb8f..aaaa9bee03 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -41,4 +41,6 @@ if [istarget "ia64-*"] then {
run_dump_test "ltoff22x-1"
run_dump_test "dependency-1"
+
+ run_dump_test "real"
}
diff --git a/gas/testsuite/gas/ia64/real.d b/gas/testsuite/gas/ia64/real.d
new file mode 100644
index 0000000000..36ceecb116
--- /dev/null
+++ b/gas/testsuite/gas/ia64/real.d
@@ -0,0 +1,10 @@
+#objdump: -s -j .data
+#name: ia64 real10 and real16 (LSB)
+
+.*: +file format .*
+
+Contents of section .data:
+ 0000 ffcdcccc cccccccc ccfc3f00 00000000 ................
+ 0010 cdcccccc cccccccc fc3fffcd cccccccc ................
+ 0020 ccccccfb 3f000000 00000000 00000000 ................
+ 0030 cdcccccc cccccccc fb3f0000 00000000 ................
diff --git a/gas/testsuite/gas/ia64/real.s b/gas/testsuite/gas/ia64/real.s
new file mode 100644
index 0000000000..f5248da626
--- /dev/null
+++ b/gas/testsuite/gas/ia64/real.s
@@ -0,0 +1,8 @@
+ .data
+ .lsb
+ data1 -1
+ real10.ua 0.2
+ real10 0.2
+ data1 -1
+ real16.ua 0.1
+ real16 0.1