From 165a7f90d40e63c70f8a1059bc9dc7a906f42351 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 30 Apr 2003 21:38:55 +0000 Subject: [PATCH] gas/ 2003-04-30 H.J. Lu * 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 * gas/ia64/ia64.exp: Add real. * gas/ia64/real.s: New file. * gas/ia64/real.d: Likewise. --- gas/ChangeLog | 8 ++++++++ gas/config/tc-ia64.c | 26 +++++++++++++++++++++----- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/ia64/ia64.exp | 2 ++ gas/testsuite/gas/ia64/real.d | 10 ++++++++++ gas/testsuite/gas/ia64/real.s | 8 ++++++++ 6 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 gas/testsuite/gas/ia64/real.d create mode 100644 gas/testsuite/gas/ia64/real.s diff --git a/gas/ChangeLog b/gas/ChangeLog index 3417eb236eb..64d6df70b28 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2003-04-30 H.J. Lu + + * 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 * 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 2a7b9703193..13ff8a0b173 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 381233ce737..fa654428139 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2003-04-30 H.J. Lu + + * gas/ia64/ia64.exp: Add real. + + * gas/ia64/real.s: New file. + * gas/ia64/real.d: Likewise. + 2003-04-29 Nick Clifton * gas/elf/elf.exp: Invoke symver test. diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp index 88ed2cfb8f2..aaaa9bee03b 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 00000000000..36ceecb116d --- /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 00000000000..f5248da6268 --- /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 -- 2.30.2